feat(egress): iron-proxy credential-injection firewall for sandboxes

Rebuilds the iron-proxy egress feature cleanly onto current main. The
original feat/iron-proxy branch had diverged from main with an
unmergeable history (no usable merge-base after main history motion),
so the feature's content diff was re-applied onto a fresh main cut and
the three config/docs conflicts (commands.py status/egress, config.py
proxy vs computer_use, slash-commands.md) resolved keeping main's
content plus the egress additions.

Optional, off-by-default TLS-intercepting egress proxy for remote
terminal sandboxes. Sandboxes hold opaque proxy tokens; iron-proxy
swaps them for real provider API keys at the network boundary.

Includes the full review-cycle hardening:
- P0/P1/P2 rounds (GodsBoy, stephenschoettler, arshkumarsingh,
  annguyenNous, maxpetrusenko, sxuff findings)
- v0.39 schema realignment + Docker bridge-bind/listener-role fixes
- Docker UX/enforcement hardening

Salvaged security fixes folded in with credit:
- Three P0 gaps (version-probe env scrub, Bitwarden ImportError
  fail-closed, container-reuse egress-boundary) + Docker v29.5.3
  empty-label edge — kuangmi-bit (#48073)
- P1/P2 (fail-closed replace.require:true, NODE_OPTIONS CA-flag
  conflict, GPG checksum verify, threat-model wording) — Bartok9 (#48076)

Co-authored-by: kuangmi-bit <kuangmi@deeparchi.com>
Co-authored-by: Bartok9 <danielrpike9@gmail.com>
This commit is contained in:
Teknium 2026-06-25 12:42:32 -07:00 committed by teknium1
parent fbfccbb3ee
commit ad978ed962
No known key found for this signature in database
30 changed files with 7451 additions and 29 deletions

View file

@ -32,6 +32,13 @@ def test_status_command_is_available_in_cli_registry():
assert cmd.gateway_only is False
def test_egress_command_is_available_in_cli_registry():
cmd = resolve_command("egress")
assert cmd is not None
assert cmd.gateway_only is False
assert "status" in cmd.subcommands
def test_process_command_status_dispatches_without_toggling_status_bar():
cli_obj = _make_cli()
@ -42,6 +49,20 @@ def test_process_command_status_dispatches_without_toggling_status_bar():
assert cli_obj._status_bar_visible is True
def test_process_command_egress_prints_proxy_status(monkeypatch):
cli_obj = _make_cli()
monkeypatch.setattr(
"hermes_cli.proxy_cli.format_status_text",
lambda: "Egress proxy status\nEnabled: no",
)
assert cli_obj.process_command("/egress") is True
cli_obj.console.print.assert_called()
printed = "\n".join(str(call.args[0]) for call in cli_obj.console.print.call_args_list)
assert "Egress proxy status" in printed
def test_statusbar_still_toggles_visibility():
cli_obj = _make_cli()