[Security Review] 🔐 Daily Security Review — gh-aw-firewall (2026-07-16) #6294
Replies: 7 comments
|
🔮 The ancient spirits stir: the smoke test agent was here. The omens point to a passing run. Warning Firewall blocked 2 domainsThe following domains were blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"
- "registry.npmjs.org"See Network Configuration for more information.
|
|
🔮 The ancient spirits stir, and the smoke test agent has passed through the veil to mark this discussion. The registry winds were unkind, but the omen is recorded. Warning Firewall blocked 2 domainsThe following domains were blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"
- "registry.npmjs.org"See Network Configuration for more information.
|
|
Warning Firewall blocked 2 domainsThe following domains were blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"
- "registry.npmjs.org"See Network Configuration for more information.
|
|
🔮 The ancient spirits stir around this smoke test, and the oracle records a brief visit in the discussion threads. Warning Firewall blocked 2 domainsThe following domains were blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"
- "registry.npmjs.org"See Network Configuration for more information.
|
|
🔮 The ancient spirits stir around this smoke test; the agent has walked the path and left its trace. Warning Firewall blocked 2 domainsThe following domains were blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"
- "registry.npmjs.org"See Network Configuration for more information.
|
|
🔮 The ancient spirits stir: the smoke test agent passed through, leaving a brief sign in the logs and a quiet blessing on this discussion. Warning Firewall blocked 2 domainsThe following domains were blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"
- "registry.npmjs.org"See Network Configuration for more information.
|
|
This discussion was automatically closed because it expired on 2026-07-23T09:14:36.840Z.
|
Uh oh!
There was an error while loading. Please reload this page.
📊 Executive Summary
This is a daily security review of the gh-aw-firewall codebase (
@github/agentic-workflow-firewallv0.23.1), combining static code analysis with complementary context from a prior escape-test run. Overall security posture is strong: defense-in-depth layering is evident, input validation is thorough, and no npm dependency vulnerabilities exist. The prior escape test (secret-digger-copilot) confirmed the agent correctly refused a prompt-injection attack (threat detection AIC 7.327), demonstrating real-world injection resistance.Key metrics: 0 npm vulnerabilities, 8 attack surfaces mapped, 18 STRIDE threats assessed, 1 high + 2 medium improvement areas identified.
🔍 Findings from Firewall Escape Test
Prior run:
secret-digger-copilot(2026-07-13, workflow run #29286879560)noopand reported the injection attemptThe agent behavioural guardrails functioned correctly. The detection system flagged the run as
warning/threat_detected, posted to the detection tracking issue, and no sensitive data was exfiltrated.🛡️ Architecture Security Analysis
Network Security
Squid proxy (L7 filtering)
src/domain-validation.ts) rejects 9 dangerous character classes:[\s\0"';+ "" +#\]`. Whitespace, null bytes, quotes, semicolons, backticks, hash, and backslash are all blocked — preventing Squid config injection.DOMAIN_CHAR_PATTERNcharacter classes instead of.*to prevent ReDoS (src/domain-patterns.ts:94–96).*,*.*,*.*.com) are explicitly rejected (src/domain-validation.ts:51–87).CONNECTmethod — no TLS inspection.iptables (L3/L4 blocking)
containers/agent/setup-iptables.sh: DNAT redirects port 80/443 to Squid as defence-in-depth fallback for proxy-unaware tools.src/host-iptables-rules.ts: Host-level FW_WRAPPER chain; Squid source IP (172.30.0.10) gets unrestricted ACCEPT before the agent chain.8.8.8.8/8.8.4.4); configurable via--dns-servers.Identified gap — proxy-unaware HTTPS tools: Per architecture docs, proxy-unaware tools hitting port 443 get DNAT'd to Squid, but the raw TLS ClientHello is rejected. The connection fails rather than being cleanly blocked — still secure (no leak), but produces confusing TLS errors instead of clear 403s. This is a known design trade-off.
Container Security
Capabilities & privilege drop
capshto dropSYS_CHROOTandSYS_ADMINbefore user code runs (containers/agent/entrypoint.sh:1240).NET_ADMINis never granted to the agent container — only to the iptables-init init container.seccomp-profile.jsonis missing (src/config-writer.ts:164).procfs isolation
hidepid=2mounted at/host/proc(entrypoint.sh:509–520).hidepid=2prevents agent from reading/proc/[pid]/environof other processes, blocking credential extraction via pid-directory traversal.unset_sensitive_tokens()clears tokens from PID 1 environ before agent code runs (race condition mitigation,entrypoint.sh:414–474).Selective bind mounts (not blanket host FS)
/tmp: read-write./etc/shadowand unwhitelisted$HOMEdirs: excluded..cache,.config,.local,.anthropic,.claude,.cargo,.rustup,.npm,.copilot.Identified gap —
--env-allrisk:src/commands/validators/infrastructure-validator.ts:93–94emits only awarnwhen--env-allis used, which passes all host environment variables (bounded byMAX_ENV_VALUE_SIZE = 64KBper var). An operator mistakenly using--env-allin a CI environment withGITHUB_TOKEN,AWS_SECRET_ACCESS_KEY, or other secrets in the environment would expose them inside the agent container. The warning exists but could be strengthened.Domain Validation Assessment
The validation pipeline is layered and auditable:
validateDomainOrPattern→checkDangerousChars→checkOverBroadPattern→checkStructuralValidityassertSafeForSquidConfigprovides a second defence-in-depth check at config interpolation time.*No injection bypasses identified in the current validation logic.
Input Validation Assessment
commanderwith typed options — no rawargvstring concatenation.compose-sanitizer.ts:sanitizeDockerComposeYaml()redactsTOKEN|KEY|SECRETvars in debug logs.src/host-iptables-validation.ts): strict integer range check, rejects leading zeros, enforces1–65535andstart ≤ endfor ranges.execSynccalls inmain-action.ts:383–386use fixeddocker logs/docker inspectargs — not user-controlled strings; low risk.setup-iptables.shDNS rules--dns-serversIPsrc/commands/validators/network-options.tssquid.confbefore Squid reads it/host/etc/passwdor certsentrypoint.shbind mounts/etcfiles bound; shadow excludedsquid-logs:/var/log/squid--env-allleaks CI secrets into agentsrc/env-utils.ts,src/constants.ts:17/proc/1/environpre-unset raceentrypoint.sh:414–474unset_sensitive_tokens();hidepid=2also presentsrc/compose-sanitizer.tsTOKEN/KEY/SECRET; non-standard names could bypasssrc/domain-patterns.ts:94–96.*--env-allsrc/constants.ts:17–21src/compose-network.ts, fixed subnet172.30.0.0/24setup-iptables.shDNAT rulesentrypoint.sh:812–817--enable-dindsrc/types/security-options.ts:69src/squid/domain-acl.ts:assertSafeForSquidConfig172.30.0.30, fixed network🎯 Attack Surface Map
--allow-domainsCLI →src/domain-validation.tssrc/squid/domain-acl.ts:assertSafeForSquidConfigcontainers/agent/setup-iptables.sh--env-allflag →src/env-utils.ts--enable-dindflagsquid-logsDocker volume172.30.0.0/24subnet📋 Evidence Collection
Commands run and key outputs
✅ Recommendations
🔴 Critical
None identified.
🟠 High
H1 — Harden
--env-allto enumerate secrets before passingsrc/commands/validators/infrastructure-validator.ts:93,src/env-utils.ts--env-allfor convenience,GITHUB_TOKEN, AWS keys, etc. could be exposed to a compromised or prompt-injected agent./(TOKEN|KEY|SECRET|PASS|PWD|CREDENTIAL|AUTH)/iand either: (a) emit the explicit list in the warning so the operator sees exactly what will be exposed, or (b) require a separate--env-all-unsafe-confirmflag to proceed.🟡 Medium
M1 — Write-protect Squid log volume from agent container
src/services/agent-service.ts(volume config)squid-logsvolume is currently accessible to the agent container. While logs contain no credentials, an agent could tamper with or truncate them to hide its traffic.squid-logsas read-only (:ro) in the agent container, or restrict the volume exclusively to the Squid service.M2 — Expand compose-sanitizer pattern for non-standard secret env var names
src/compose-sanitizer.ts:4/(TOKEN|KEY|SECRET)/imisses names likeGH_PAT,ANTHROPIC_AUTH,MYAPP_CREDENTIALS, which would appear in plaintext in debug log output./(TOKEN|KEY|SECRET|CREDENTIAL|AUTH|PAT|PWD|PASSWORD|CERT)/i.🟢 Low
L1 — Document HTTPS TLS error behaviour for proxy-unaware tools
README.md/docs/troubleshooting.mdHTTPS_PROXYenvironment variable configuration.L2 — Promote DoH proxy as recommended DNS mode for high-security deployments
docs/,README.mdAWF_DOH_PROXY_IP) addresses this but its use is not prominently documented.📈 Security Metrics
Review conducted: 2026-07-16 · Repository: github/gh-aw-firewall · Workflow run: #29485849161
Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
awmgmcpgSee Network Configuration for more information.
All reactions