Skip to content

[awf] --allow-host-ports hardcoded to 80,443,(mcp-port); allowHostServicePorts never wired up #7132

Description

@lpcox

Problem
Agents sandboxed by AWF cannot reach GitHub Actions services: containers (e.g. postgres on 5432) even with --enable-host-access, because --allow-host-ports is hardcoded to 80,443,<mcp-gateway-port> by the gh-aw compiler and AWF's allowHostServicePorts config field is never populated by any caller.

Context
github/gh-aw#51433

Root Cause
On the gh-aw compiler side, pkg/workflow/awf_command_builder.go only emits host-access flags in legacy security mode, and even then the port list is a fixed string 80,443,<mcp-gateway-port> with no path to add declared services: ports. On the AWF side, awf-config.schema.json defines allowHostServicePorts but no code path in gh-aw ever writes it into the generated awf-config.json, and AWF has no test coverage confirming the field is honored end-to-end when populated.

Proposed Solution

  1. Verify/harden AWF's handling of allowHostServicePorts in awf-config.json — ensure it maps to concrete iptables/DNAT allow rules for the named ports, with an integration test using a mock service container.
  2. Coordinate with gh-aw maintainers so the compiler derives this list from the workflow's services: block and emits it under strict security (not just legacy mode).
  3. Add an integration test in docs/INTEGRATION-TESTS.md coverage exercising allowHostServicePorts against a running service.

Generated by Firewall Issue Dispatcher · auto · 26.4 AIC · ⊞ 8.9K ·

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions