Skip to content

Use lib-util-net for SSRF host validation#1061

Merged
pditommaso merged 1 commit into
masterfrom
extract-ssrf-validator-lib
Jun 15, 2026
Merged

Use lib-util-net for SSRF host validation#1061
pditommaso merged 1 commit into
masterfrom
extract-ssrf-validator-lib

Conversation

@pditommaso

Copy link
Copy Markdown
Collaborator

Summary

Extracts the SSRF host validator from Wave into the reusable, pure-Java library io.seqera:lib-util-net (published as 0.1.0) and consumes it back here.

Changes

  • Add dependency io.seqera:lib-util-net:0.1.0
  • ValidateController now calls io.seqera.util.net.SsrfValidator and maps the library's SsrfValidationException to BadRequestException, preserving the existing HTTP 400 response
  • Remove the in-tree SsrfValidator.groovy and its test (moved to the library)

Notes

  • Behavior is unchanged; the validation logic was ported verbatim to Java (the only addition is a fail-closed null guard after URL host extraction, since Set.of rejects contains(null)).
  • The SSRF tests now live in lib-util-net and pass in libseqera CI.

🤖 Generated with Claude Code

Replace the in-tree SsrfValidator with the reusable io.seqera:lib-util-net library. ValidateController now maps the library SsrfValidationException to BadRequestException, preserving the existing HTTP 400 response.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@pditommaso pditommaso merged commit 783ee27 into master Jun 15, 2026
3 checks passed
@pditommaso pditommaso deleted the extract-ssrf-validator-lib branch June 15, 2026 16:30
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.

1 participant