Skip to content

Proposal: Containerized firewall for agent engines #1056

Closed

Description

@Mossaka

Summary

Move every agent engine (Codex, Claude Code, Copilot CLI, custom) into a containerized execution environment with an outbound HTTP(S) firewall. The design also enforces a deterministic allowlist.

Background

Engine steps currently run on the GitHub Actions host without consistent egress policies. Claude’s hook-based allowlist and the Squid proxy for MCP containers (pkg/workflow/network_proxy.go) solve a subset of scenarios but leave other engines unprotected. The compiler already parses top-level network permissions into NetworkPermissions, yet enforcement is fragmented.

Problem Statement

  • No uniform outbound enforcement for agent engines.
  • Lateral movement risk because engines share the host network namespace.
  • Limited observability: policy violations aren’t surfaced with console-formatted diagnostics.

Proposal

  • Emit engine steps with container: ghcr.io/githubnext/gh-aw-agent-runner:<tag>, keeping existing mounts (/github/workspace, /tmp/mcp-config, /tmp/aw-prompts) so agents still see the repo and generated artifacts.
  • Add a Go-based proxy inside the container that validates Host/SNI against the workflow allowlist; containers only reach 127.0.0.1:${PROXY_PORT} plus required GitHub metadata hosts.
  • Reuse current frontmatter (network.allowed) with compilation helpers that inject allowlists into the container via env/volumes.
  • Introduce pkg/runner/firewall for orchestrator logic, console-formatted deny messages, and optional JSON logs for audit.

Open Questions

  1. Are there engines requiring non-HTTP(S) egress (git+ssh, custom sockets) that need escape hatches?
  2. What runner capabilities are mandatory for self-hosted environments (network namespaces, CAP_NET_ADMIN)?

Activity

  1. self-assigned this
    on Sep 26, 2025
  2. pelikhan commented on Oct 2, 2025

    @pelikhan
    Collaborator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions