Skip to content

Docs: name the SSRF guard's real mechanism - #1

Merged
SandObserver merged 1 commit into
mainfrom
docs/name-the-real-ssrf-guard
Aug 9, 2026
Merged

SandObserver merged 1 commit into
mainfrom
docs/name-the-real-ssrf-guard

Conversation

@SandObserver

Copy link
Copy Markdown
Owner

Summary

  • Replace the reference to PRIVATE_IP_RE in docs/architecture.md with isPrivateAddress, BLOCKED_IPV4 and BLOCKED_IPV6_RE, the identifiers that exist in api/src/proxy.js. PRIVATE_IP_RE is a hand-written comparison regex in api/test/demo.test.js, used as a second opinion on the guard.
  • List the address categories the guard actually rejects, adding carrier-grade NAT, multicast, reserved and broadcast, benchmarking and IETF protocol assignments to the private/loopback/link-local already documented.
  • State that localhost is refused by name and that IPv4-mapped IPv6 forms are unwrapped before the check.

Testing
All green. No new tests: documentation only, and every identifier named was verified to exist in api/src/proxy.js.

Checklist

  • Stays within the project constraints: one container, no runtime dependencies, no build step (see CONTRIBUTING.md).
  • Tests added or updated for new logic, and the full suite, lint, and typechecks pass.
  • Docs updated if behavior or configuration changed.
  • CHANGELOG.md updated under Unreleased if the change is user-visible.

architecture.md attributed the outbound guard to PRIVATE_IP_RE, which exists
only as an independent comparison regex in a test file. The guard is
isPrivateAddress, built from the BLOCKED_IPV4 CIDR table and BLOCKED_IPV6_RE.

The category list was short as well: it named private, loopback and link-local
but not carrier-grade NAT, multicast, reserved and broadcast, benchmarking or
IETF protocol assignments, nor that localhost is refused by name and
IPv4-mapped IPv6 forms are unwrapped before the check.
@SandObserver SandObserver added the documentation Improvements or additions to documentation label Aug 9, 2026
@SandObserver
SandObserver merged commit 06c52e9 into main Aug 9, 2026
3 checks passed
@SandObserver
SandObserver deleted the docs/name-the-real-ssrf-guard branch August 9, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant