Skip to content

test(web): lock SSRF resolution-bypass cases (IPv6 spelling + public sibling DNS) #1495

Description

@groupthinking

Summary

`apps/web/src/lib/ssrf-guard.ts` correctly rejects private destinations that hide behind alternate IPv6 spellings or public sibling DNS records, but nothing on `main` asserts those paths. A regression would be silent: `assertPublicHttpUrl` would return a URL and the caller would fetch it.

Acceptance

  • Dedicated regression tests cover at least:
    1. Private destination via alternate IPv6 spelling must reject
    2. Private destination behind a public sibling DNS record must reject
  • Tests target the merged API on `main` (no dependency on the superseded `SsrfGuardError` shape from test(security): cover SSRF private-address detection main's tests miss #1428)
  • No production behavior change — tests only

Context

Detection cases salvaged from #1428 after #1381 landed the security outcome first. Related: #1484 / #1486 (IPv6 literal range-check + first module tests).

Activity

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

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions