{{ message }}
test(security): cover IPv6 internal ranges + DNS-pinning fetch in host guard - #2202
Merged
Conversation
…t guard Part of the Round-2 audit swarm (plan 13); full details in the PR description. Co-authored-by: duyetbot <bot@duyet.net>
duyet
enabled auto-merge (squash)
July 3, 2026 01:56
Contributor
☁️ Cloudflare Preview Deployment
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Implements plan 13 from the Round-2 repo audit (
plans/13-*.md), executed by the overnight autonomous swarm.Two security-critical halves of the SSRF host guard had zero coverage: the IPv6 branch of
isInternalIp(ULA/link-local/IPv4-mapped/6to4) andcreateHostValidationFetch(the DNS-pinning fetch wrapper). Adds characterization tests asserting BLOCK for each internal IPv6 class and ALLOW for a public v6, plus the Workers hostname-guard throw and fetch-time internal-address rejection.host-url.tsunchanged (tests only).Test evidence
Verified on the combined swarm tree via the orchestrator's central CI-parity gate:
biome lint .→ clean (1914 files)tsc --noEmit(dashboard) → cleanbun test src/ --isolate→ 4692 pass / 0 fail (243 files, single process — no mock/env cross-contamination)The plan's real test is included and passes on this branch (it fails on
main).Self-review (runbook §5)
main, passes on this branchCHM_*/VITE_*env → OSS defaults).env*; no[vars]re-added towrangler.toml🤖 Part of the overnight audit swarm (one plan = one branch = one PR).
Co-Authored-By: duyetbot bot@duyet.net