Skip to content

fix(core): reject loopback aliases in egress allowlists - #51

Merged
senamakel merged 3 commits into
epic/7328-security-busfrom
tinybox-27-loopback-validation
Oct 24, 2026
Merged

senamakel merged 3 commits into
epic/7328-security-busfrom
tinybox-27-loopback-validation

Conversation

@senamakel

Copy link
Copy Markdown
Owner

Summary

Reject explicit loopback destinations and normalize cloud metadata names before accepting an egress allowlist. This includes scoped IPv6 loopback, legacy numeric IPv4 spellings commonly interpreted by resolvers, DNS case, and terminal root dots. The check is syntactic and deterministic; it makes no DNS or network calls.

The native allowlist refusal contract remains in place for backends without enforcement. This change does not add allowlist enforcement or DNS-rebinding coverage. Windows CPU support remains deferred and reported as Unsupported.

Validation

  • Regression tests failed on the prior epic tip for 127.0.0.1 and 0251.0376.0251.0376, then passed after the validator change.
  • cargo fmt --all -- --check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo build --all-targets --all-features
  • cargo test --all-features
  • RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features
  • git diff --check

Refs tinyhumansai#27
Part of tinyhumansai/openhuman#7328

senamakel and others added 3 commits October 24, 2026 00:30
Extend the allowlist validation tests with additional metadata host
spellings such as octal, hex, and trailing-dot forms, and add a new test
asserting that loopback targets including IPv6, localhost variants, and
integer-encoded addresses are refused.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
…lowlist

The allowlist validator now rejects entries that name loopback addresses or
aliases, and metadata host matching handles trailing root dots, scoped IPv6,
and the legacy numeric IPv4 forms resolvers accept. This closes bypasses where
an entry could reach a metadata endpoint or local service despite the policy.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The egress allowlist spec now states that explicit loopback destinations are refused during validation, covering IPv4/IPv6 literals, IPv4-mapped and scoped IPv6 loopback, localhost names, and legacy numeric IPv4 forms. Metadata endpoint refusals were clarified to include DNS case and root-dot variants plus legacy numeric spellings, and the per-backend status section was updated to reflect that the native Docker Linux controller enforces pinned allowlist addresses.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
@senamakel
senamakel merged commit 0e60686 into epic/7328-security-bus Oct 24, 2026
20 checks passed
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