Skip to content

feat(scallion): fail-closed exit consent, private-IP blocking, and DNS pinning - #388

Merged
ralyodio merged 5 commits into
masterfrom
feat/scallion-exit-policy
Nov 15, 2026
Merged

ralyodio merged 5 commits into
masterfrom
feat/scallion-exit-policy

Conversation

@ralyodio

Copy link
Copy Markdown
Collaborator

Summary

Third Scallion Network implementation slice after route planning (#383): a deny-by-default exit-target policy to keep ordinary GPU/CPU workers from accidentally becoming open proxies, and to reject internal/private/metadata destinations before any future transport is enabled.

  • Add c0mpute_net::scallion_exit::ExitPolicy (disabled by default; operator must select allowed ports).
  • Require a fully qualified DNS name or unambiguous public IP; reject local/ambiguous DNS names and unsafe address syntaxes.
  • Vet every DNS A/AAAA result, rejecting private/reserved/CGNAT/link-local/benchmark/documentation/IPv4-mapped/transition destinations, even if a public answer is also supplied.
  • Bound DNS answer count, preserve the approved hostname for TLS validation, hand back only approved numeric socket addresses, and check the connected peer against the original approval to prevent DNS rebinding from becoming an SSRF bypass.
  • Unit tests for prohibited destinations, opt-in consent, port allowlist, rebinding, mixed DNS answers and public IPv6.
  • Documentation at docs/protocol/scallion-exit-policy.md.

Boundary

This is a pure policy module: it opens no sockets, performs no DNS, enables no exits, and carries no user traffic. It must be called by an eventual security-reviewed exit implementation. No anonymity, KYC bypass, or unrestricted Internet egress is claimed or enabled.

Validation

cargo test -p c0mpute-net scallion_exit; full workspace CI + security scans on PR. The future exit runtime needs independent security review and adversarial DNS/SSRF integration tests.

Tracks #386. No release required until this policy is wired into an actual opted-in service.

@github-actions

Copy link
Copy Markdown

ThreatCrush Security Scan

14 finding(s)

HIGH/CRITICAL: 2 | MEDIUM: 8 | LOW: 4

Severity Rule Location
HIGH js-ssrf-outbound-request apps/web/public/sw.js:24
HIGH sh-remote-script-execution scripts/install.sh:611
MEDIUM js-unescaped-html-sink apps/web/src/app/blog/[slug]/page.tsx:53
MEDIUM js-unescaped-html-sink apps/web/src/app/layout.tsx:109
MEDIUM sql-template-interpolation apps/web/src/lib/chat/convo-store.ts:116
MEDIUM sql-template-interpolation apps/web/src/lib/chat/convo-store.ts:117
MEDIUM sql-template-interpolation apps/web/src/lib/chat/push.ts:476
MEDIUM js-dynamic-code-execution apps/web/src/lib/router/verify.ts:91
MEDIUM sh-remote-script-execution scripts/dev-setup.sh:25
MEDIUM sh-eval-expansion scripts/dev-setup.sh:35
LOW py-ssrf-outbound-request examples/business-strategist-agent/chat.py:37
LOW py-ssrf-outbound-request examples/business-strategist-agent/train.py:54
LOW secret-generic-credential node/crates/c0mpute-core/src/webhook.rs:1171
LOW py-path-traversal node/crates/c0mpute-core/tests/fixtures/fake-infernet-text:29

Snippets are redacted; ThreatCrush never prints matched credential material.

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