Skip to content

feat(tools): stop seeding trusted egress hosts - #397

Merged
github-actions[bot] merged 1 commit into
mainfrom
feat/no-seeded-egress-hosts
Aug 18, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
feat/no-seeded-egress-hosts

Conversation

@mohitranka

Copy link
Copy Markdown
Contributor

Summary

Removes the hardcoded egress allow-list of "trusted" package registries. The proxy now fails closed: no host is reachable unless the user allows it.

  • No seeded hosts. crates.io, npm, PyPI, GitHub, and githubusercontent are denied like every other destination.
  • User allow. Personal permissions.toml host(...) rules feed the proxy. host(*) is unrestricted network through the proxy; the filesystem sandbox stays on.
  • Repo files cannot loosen this. Workspace .forge/permissions.toml allow entries are still ignored, including host(*).
  • Session overlay. A session starts deny-all; open_session applies personal host rules after the permission files load.

This matches Codex's stance (empty allow-list, user adds destinations) instead of silently granting first-build ecosystems.

Test plan

  • cargo test --package forge-tools --package forge-core --package forge-session --lib
  • cargo test --package forge-tools --test egress_proxy
  • cargo clippy --package forge-tools --package forge-core --package forge-session --all-targets --locked -- -D warnings
  • cargo fmt --all -- --check
  • cargo test --workspace --all-targets --locked
  • Fresh session: cargo build / npm install / gh fail at the network until a personal host(...) allow is added
  • host(*) in personal permissions.toml lets those commands through the proxy
  • A repo-committed host(*) does not open the network

The proxy allow-list is empty until a personal host(...) rule opens a
destination. crates.io, npm, PyPI, and GitHub are no longer pre-allowed.
host(*) is unrestricted network through the proxy; the filesystem
sandbox stays on. Repo-committed allow rules still cannot loosen egress.
@github-actions
github-actions Bot enabled auto-merge (squash) August 18, 2026 21:56
@github-actions
github-actions Bot merged commit c59f1ac into main Aug 18, 2026
8 checks passed
mohitranka added a commit that referenced this pull request Aug 21, 2026
The proxy allow-list is empty until a personal host(...) rule opens a
destination. crates.io, npm, PyPI, and GitHub are no longer pre-allowed.
host(*) is unrestricted network through the proxy; the filesystem
sandbox stays on. Repo-committed allow rules still cannot loosen egress.
mohitranka added a commit that referenced this pull request Sep 11, 2026
The proxy allow-list is empty until a personal host(...) rule opens a
destination. crates.io, npm, PyPI, and GitHub are no longer pre-allowed.
host(*) is unrestricted network through the proxy; the filesystem
sandbox stays on. Repo-committed allow rules still cannot loosen egress.
mohitranka added a commit that referenced this pull request Sep 11, 2026
The proxy allow-list is empty until a personal host(...) rule opens a
destination. crates.io, npm, PyPI, and GitHub are no longer pre-allowed.
host(*) is unrestricted network through the proxy; the filesystem
sandbox stays on. Repo-committed allow rules still cannot loosen egress.
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