Skip to content

feat(egress): re-land iron-proxy credential-injection firewall (revert of #58489) - #70848

Merged
teknium1 merged 2 commits into
mainfrom
hermes/hermes-6e07ea10
Jul 24, 2026
Merged

feat(egress): re-land iron-proxy credential-injection firewall (revert of #58489)#70848
teknium1 merged 2 commits into
mainfrom
hermes/hermes-6e07ea10

Conversation

@teknium1

@teknium1 teknium1 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Re-lands PR #30179

The feature: real API keys never enter the Docker sandbox. Containers receive per-provider stand-in proxy tokens under the standard env names; the managed iron-proxy daemon (MITM at the network boundary) swaps them for real credentials on the way out. Tokens lifted from a compromised sandbox are useless anywhere else. Disabled by default; hermes egress setuphermes egress start.

Changes

  • Revert-of-revert of merge commit 8790adc4c (29 files, +8,363), restoring agent/proxy_sources/iron_proxy.py, hermes_cli/proxy_cli.py (hermes egress install/setup/start/stop/restart/reload/status/disable/config), Docker backend egress wiring, /egress status slash surface, dashboard schema entries, docs (user-guide/egress/, developer-guide/egress-internals.md), and the three test suites.
  • Conflict reconciliation with post-revert main:
    • tools/environments/docker.py: kept the new _container_network_mode reuse guard from #3167dbaee2 AND the egress-aware _find_reusable_container(task, profile, egress_label) signature — both guards now compose on the reuse path.
    • hermes_cli/commands.py: _SLACK_VIA_HERMES_ONLY updated for the /topup rehaul (topup, moa, debug, egress — stale credits/billing entries dropped).
    • tests/hermes_cli/test_web_server.py: kept both sides' new tests (memory-provider schema tests from main + proxy schema lifecycle test).

Validation

Check Result
tests/test_iron_proxy{,_cli,_e2e}.py 142 passed, 0 failed
tests/tools/test_docker_environment.py + web_server/commands/status/unknown_command 772 passed, 0 failed
E2E: hermes egress --help against temp HERMES_HOME full subcommand tree, exit 0
E2E: disabled default → _egress_proxy_args_for_docker() injects nothing (no env, no mounts)
E2E: proxy.enabled: true + daemon down + enforce_on_docker RuntimeError (fail-closed), points at hermes egress setup

Infographic

iron-proxy egress re-land

teknium1 added 2 commits July 24, 2026 09:22
…aware 3-field probe

test_docker_network_config.py landed on main after the #58489 revert and
stubbed docker ps with the 2-field ID\tState format. The re-landed
egress-aware reuse probe requests ID\tState\tEgressLabel when egress is
off, so the fake line failed to parse and the reuse path never fired.
Fixture-only change; production behavior is unchanged.
@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

૮ >ﻌ< ა ci review

ran on 9bbaf40

all good!

@teknium1
teknium1 merged commit 077e413 into main Jul 24, 2026
47 checks passed
@teknium1
teknium1 deleted the hermes/hermes-6e07ea10 branch July 24, 2026 16:49
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/cli CLI entry point, hermes_cli/, setup wizard comp/gateway Gateway runner, session dispatch, delivery backend/docker Docker container execution area/config Config system, migrations, profiles sweeper:risk-security-boundary Sweeper risk: may affect sandboxing, auth, credentials, or sensitive data sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades labels Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Config system, migrations, profiles backend/docker Docker container execution comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/cli CLI entry point, hermes_cli/, setup wizard comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:risk-security-boundary Sweeper risk: may affect sandboxing, auth, credentials, or sensitive data type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants