Skip to content

feat: support URL input for /v1/validate#52

Open
pasibun wants to merge 1 commit intoitalia:mainfrom
pasibun:feature/support-validate-url-input
Open

feat: support URL input for /v1/validate#52
pasibun wants to merge 1 commit intoitalia:mainfrom
pasibun:feature/support-validate-url-input

Conversation

@pasibun
Copy link
Copy Markdown

@pasibun pasibun commented Mar 11, 2026

Summary

  • add support for url query parameter on /v1/validate when request body is empty
  • fetch and validate remote content over http/https with a 10s timeout
  • keep existing body-based behavior unchanged
  • document URL usage in README
  • add endpoint tests for URL success and failure cases

Why

This allows clients to validate a hosted publiccode.yml directly without first downloading and piping file contents into --data-binary.

Testing

  • go test ./...

@pasibun pasibun closed this Mar 11, 2026
@pasibun
Copy link
Copy Markdown
Author

pasibun commented Mar 11, 2026

#32

@pasibun pasibun reopened this Mar 11, 2026
@bfabio
Copy link
Copy Markdown
Member

bfabio commented Mar 28, 2026

Thanks, nice work!

Before merging I think we should detail a few security risks that come with outbound HTTP fetches from a public endpoint that were mentioned in #32.

I'd list them in that issue so we can track mitigations, WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants