test(security): cover IPv6 internal ranges + DNS-pinning fetch in host guard by duyet · Pull Request #2202 · chmonitor/chmonitor · GitHub
Skip to content

test(security): cover IPv6 internal ranges + DNS-pinning fetch in host guard - #2202

Merged
duyet merged 1 commit into
mainfrom
advisor/13-ssrf-guard-tests
Jul 3, 2026
Merged

test(security): cover IPv6 internal ranges + DNS-pinning fetch in host guard#2202
duyet merged 1 commit into
mainfrom
advisor/13-ssrf-guard-tests

Conversation

@duyet

@duyet duyet commented Jul 3, 2026

Copy link
Copy Markdown
Member

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) and createHostValidationFetch (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.ts unchanged (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) → clean
  • full bun test src/ --isolate4692 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)

  • Real test fails on main, passes on this branch
  • No core monitoring feature gated behind cloud mode (self-hosted stays whole)
  • Fail-closed to OSS (unset/junk CHM_*/VITE_* env → OSS defaults)
  • No destructive/DDL auto-apply by the agent; recommendations only
  • No secrets in committed .env*; no [vars] re-added to wrangler.toml
  • Docs updated in the same PR if user-facing
  • Diff scoped to the plan; no drive-by refactors

🤖 Part of the overnight audit swarm (one plan = one branch = one PR).

Co-Authored-By: duyetbot bot@duyet.net

…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
duyet enabled auto-merge (squash) July 3, 2026 01:56
@github-actions github-actions Bot added the app: dashboard Changes to the apps/dashboard TanStack Start app label Jul 3, 2026
@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

☁️ Cloudflare Preview Deployment

App Preview URL
Dashboard https://preview.dash.chmonitor.dev
MCP https://preview.dash.chmonitor.dev/api/mcp
Landing https://preview.chmonitor.dev
Docs https://preview.docs.chmonitor.dev
Property Value
Commit 484f88a
Deployed at 2026-07-03T01:59:29.869Z

Previews are automatically updated on every push to this PR.
Unchanged apps keep their previous preview (path-filtered deploys).

@duyet
duyet merged commit 49174a4 into main Jul 3, 2026
20 checks passed
@duyet
duyet deleted the advisor/13-ssrf-guard-tests branch July 3, 2026 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: dashboard Changes to the apps/dashboard TanStack Start app

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant