Skip to content

feat(docker): plan pinned egress allowlists - #47

Merged
senamakel merged 4 commits into
epic/7328-security-busfrom
tinybox-allowlist-7328
Oct 23, 2026
Merged

senamakel merged 4 commits into
epic/7328-security-busfrom
tinybox-allowlist-7328

Conversation

@senamakel

@senamakel senamakel commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Refs tinyhumansai#27
Part of tinyhumansai/openhuman#7328

Scope

Adds a public, deterministic planning API that resolves each distinct allowlisted hostname once and retains the resulting host, IP, and TCP port combinations. It rejects empty DNS answers, loopback and metadata answers, and IPv6 link-local addresses that cannot be pinned without an interface scope. The planner is isolated from DNS and covered with fixed resolver fixtures.

Docker creation continues to refuse NetworkPolicy::Allowlist before invoking Docker. This is partial planning and refusal groundwork; resolver-pinned firewall enforcement and a live allow/deny proof remain open. No firewall-mutating test was run on the shared host.

Validation

  • cargo fmt --all -- --check
  • cargo test -p tinybox-docker egress
  • cargo test -p tinybox-docker allowlist
  • cargo check -p tinybox-docker
  • cargo clippy -p tinybox-docker --all-targets --all-features -- -D warnings
  • cargo llvm-cov -p tinybox-docker --lib --summary-only (egress.rs line coverage: 94.74%)

senamakel and others added 4 commits October 23, 2026 21:19
Wire up a new egress test module behind cfg(test) so the egress
behaviour can be covered by unit tests.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The egress module is now compiled unconditionally and re-exports its resolver and pinned plan types so callers outside the crate can plan allowlists. The sandbox test for unenforceable allowlists now also asserts that Docker is never invoked, confirming the refusal happens up front.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add an `# Errors` section to the `EgressResolver::resolve` doc comment
noting that it returns an error when the hostname cannot be resolved.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add tests asserting that public IPv6 resolver answers are accepted into the
egress plan and that a resolver error surfaces as a backend failure naming the
offending host.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
@senamakel
senamakel merged commit 95e623a into epic/7328-security-bus Oct 23, 2026
17 of 19 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