Skip to content

feat: grant denied hosts from HITL instead of unsandboxing - #404

Merged
github-actions[bot] merged 1 commit into
mainfrom
feat/host-grant-hitl
Aug 19, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
feat/host-grant-hitl

Conversation

@mohitranka

Copy link
Copy Markdown
Contributor

Summary

gh pr create (and any other first network call) failed because the egress proxy has an empty allow-list. The sandbox HITL then offered an unconfined retry, which does not remember GitHub.

This changes a host denial into a one-time grant:

  • Always allow **.github.com writes host(**.github.com) to the personal permissions.toml and retries confined.
  • Allow this session updates the live proxy only.
  • Don't run is unchanged.

Filesystem sandbox escapes still escalate to an unconfined retry. The system prompt no longer describes Codex permission modes.

Test plan

  • cargo test --package forge-tools --lib host
  • cargo test --package forge-core --lib a_denied_host
  • cargo test --package forge-tui --lib a_denied_host
  • cargo clippy on the touched crates (-D warnings)
  • In a real session, run gh pr create with no host(...) rules; pick Always allow; confirm the retry succeeds still sandboxed and the personal file gained host(**.github.com)
  • Restart Forge and confirm a second gh call does not prompt
  • Confirm a write outside the workspace still offers the unconfined path, not a host grant

A proxy 403 for api.github.com was treated as a sandbox escape, so
gh pr create either failed or ran unconfined. Prompt to allow the
host family once (session or personal permissions.toml) and retry
the same command still confined.
@github-actions
github-actions Bot enabled auto-merge (squash) August 19, 2026 13:38
@github-actions
github-actions Bot merged commit e7cf460 into main Aug 19, 2026
10 of 11 checks passed
mohitranka added a commit that referenced this pull request Aug 21, 2026
A proxy 403 for api.github.com was treated as a sandbox escape, so
gh pr create either failed or ran unconfined. Prompt to allow the
host family once (session or personal permissions.toml) and retry
the same command still confined.
mohitranka added a commit that referenced this pull request Sep 11, 2026
A proxy 403 for api.github.com was treated as a sandbox escape, so
gh pr create either failed or ran unconfined. Prompt to allow the
host family once (session or personal permissions.toml) and retry
the same command still confined.
mohitranka added a commit that referenced this pull request Sep 11, 2026
A proxy 403 for api.github.com was treated as a sandbox escape, so
gh pr create either failed or ran unconfined. Prompt to allow the
host family once (session or personal permissions.toml) and retry
the same command still confined.
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