[Security Review] Security Review: gh-aw-firewall Threat Model & Attack Surface Analysis — 2026-06-18 #5249
Replies: 13 comments
-
|
🔮 The ancient spirits stir. The smoke test agent has passed through, and the omens read clean. May the firewall hold and the domains stay bound. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "registry.npmjs.org"See Network Configuration for more information.
|
Beta Was this translation helpful? Give feedback.
-
|
🔮 The ancient spirits stir around discussion #5249. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "registry.npmjs.org"See Network Configuration for more information.
|
Beta Was this translation helpful? Give feedback.
-
|
🔮 The ancient spirits stir. The smoke-test agent passed through, left a brief omen, and now the run is watched over by the old network winds. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "registry.npmjs.org"See Network Configuration for more information.
|
Beta Was this translation helpful? Give feedback.
-
|
🔮 The ancient spirits stir beside the firewall. The smoke test agent was here, and the omen is recorded in the logs. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "registry.npmjs.org"See Network Configuration for more information.
|
Beta Was this translation helpful? Give feedback.
-
|
🔮 The ancient spirits stir over discussion 5249. The smoke test agent was here, and the omen is recorded. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "registry.npmjs.org"See Network Configuration for more information.
|
Beta Was this translation helpful? Give feedback.
-
|
🔮 The ancient spirits stir, and the smoke test agent has passed through this discussion. May the firewall hold, the build remain true, and the whitelisted paths stay lit. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "registry.npmjs.org"See Network Configuration for more information.
|
Beta Was this translation helpful? Give feedback.
-
|
🔮 The ancient spirits stir: the smoke test agent passed through, observed the build, and left this mark in the discussion winds. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "registry.npmjs.org"See Network Configuration for more information.
|
Beta Was this translation helpful? Give feedback.
-
|
🔮 The ancient spirits stir: the smoke test agent was here, and the omens read PASS. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "registry.npmjs.org"See Network Configuration for more information.
|
Beta Was this translation helpful? Give feedback.
-
|
🔮 The ancient spirits stir, and the smoke test agent has passed through this hall. May the winds of CI remain aligned, and may the firewall hold. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "registry.npmjs.org"See Network Configuration for more information.
|
Beta Was this translation helpful? Give feedback.
-
|
🔮 The ancient spirits stir: the smoke test agent has passed through this discussion and left this omen of successful build, title check, file write, and GitHub query. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "registry.npmjs.org"See Network Configuration for more information.
|
Beta Was this translation helpful? Give feedback.
-
|
🔮 The ancient spirits stir, and the smoke test agent has passed through this discussion. May the firewall remain vigilant. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "registry.npmjs.org"See Network Configuration for more information.
|
Beta Was this translation helpful? Give feedback.
-
|
This discussion was automatically closed because it expired on 2026-06-25T13:42:25.804Z.
|
Beta Was this translation helpful? Give feedback.
-
|
🔮 The ancient spirits stir; the smoke test agent passed through and left this omen in the logs. The vault remains open, the path remains clear. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "registry.npmjs.org"See Network Configuration for more information.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
📊 Executive Summary
Review Date: 2026-06-18 | Scope: Full codebase static analysis + firewall escape test correlation
Overall posture: The firewall implements sound defence-in-depth (iptables NAT + Squid ACL + seccomp + capability drop + one-shot token + credential hiding). No fundamental design flaws found. Issues are edge-case weaknesses in the implementation.
🔍 Escape Test Context
Prior "Secret Digger" run (2026-04-11):
GH_AW_SECRET_VERIFICATION_RESULT: success— agent completed withnoop(no secrets extracted).GH_AW_LOCKDOWN_CHECK_FAILED: false. The firewall successfully blocked exfiltration in the controlled adversarial test.🛡️ Architecture Analysis
Network (
setup-iptables.sh)NAT-redirect + default-deny model: DNAT TCP 80/443 → Squid:3128; 15 dangerous ports explicitly blocked; all other TCP/UDP dropped. Connection state, Docker DNS DNAT preservation, and per-session iptables audit trail are all correctly implemented.
line 431) and UDP (line 433) have DROP rules. No ICMP rule exists. ICMP tunneling tools (icmptunnel,ptunnel) can exfiltrate data through ping payloads, bypassing all Squid logging.lines 48-49)If sysctl fails (restricted kernel), IPv6 remains enabled and the IPv4-only DNAT rules are bypassed entirely. No
ip6tables -P OUTPUT DROPfallback exists.Container Security (
entrypoint.sh,seccomp-profile.json)Seccomp default:
SCMP_ACT_ERRNO(allowlist). Blocks: ptrace, process_vm_read/write, kexec, reboot, init_module, pivot_root, keyctl, umount.hidepid=2on procfs prevents cross-process env reading.entrypoint.sh lines 379-383)In non-chroot mode the agent runs as
awfuser(unprivileged) but retainsCAP_DAC_OVERRIDE,CAP_FOWNER,CAP_SETUID,CAP_SETGID,CAP_CHOWN. If the agent achieves a local privilege escalation, these capabilities are available.setnsallowed in seccomp — Namespace joining is not needed by normal agent workloads. Combined with retained capabilities in non-chroot mode, this broadens the escape surface unnecessarily.entrypoint.sh lines 518-521) — On Alpine/musl hosts the glibc library fails to load; execution continues with tokens readable multiple times from/proc/1/environ. WARN-only; not fatal.Credential Hiding (
src/services/agent-volumes/credential-hiding.ts)14 credential files hidden via
/dev/nullbind mounts (SSH keys, AWS/GCP/Azure/Kube, Docker, npm, cargo, gh CLIhosts.yml).~/.netrc~/.git-credentials~/.pypirc~/.config/gcloud/application_default_credentials.json~/.terraform.d/credentials.tfrc.json~/.config/gh/config.yml~/.netrcis the highest priority: it is read by curl and git for HTTP basic auth and is a common credential vector on developer machines.Domain Validation (
src/domain-validation.ts)Five-check pipeline prevents Squid config injection: dangerous characters (
[\s\0"'\`;#\]), over-broad wildcards, double-dots, lone dots, excessive wildcard segments. No injection bypass vectors found. Wildcard-to-regex uses[a-zA-Z0-9.-]*` (safe from ReDoS). Well-designed.Input Validation (
src/squid/config-generator.ts)audit_jsonlURL field not JSON-escaped — The format uses%ru(raw URL). A crafted URL containing"or}can break JSON parsing. User-Agent was already omitted for this reason but the URL has the same vulnerability. Log consumers should treataudit.jsonlas potentially malformed and use error-recovery parsers.Dependencies
npm audit: 20 vulns (0 critical, 0 high, 19 moderate, 1 low) — all in devDependencies (jest, babel). Zero runtime vulnerabilities.~/.netrcor~/.git-credentials(not in overlay)setnsin seccomp + retained caps enables namespace hoppingaudit_jsonlJSON injection breaks log integritymountsyscall allowed post-capability-drop (seccomp)✅ Prioritised Recommendations
🔴 High — Fix Soon
H-1 — Add ICMP DROP rule (
setup-iptables.sh, after line 433):H-2 — Make IPv6 sysctl failure fatal or add ip6tables DROP-all fallback (
setup-iptables.sh lines 48-49):H-3 — Add missing files to credential hiding overlay (
credential-hiding.ts):Add at minimum:
~/.netrc,~/.git-credentials,~/.config/gcloud/application_default_credentials.json,~/.terraform.d/credentials.tfrc.json,~/.config/gh/config.yml.H-4 — Drop capabilities in non-chroot mode (
entrypoint.sh lines 379-383):🟠 Medium — Plan to Address
M-1 — Remove
setnsfrom seccomp allowlist (seccomp-profile.json).M-2 — Document DNS tunneling risk and recommend DoH mode for high-security deployments (
docs/environment.md).M-3 — Emit a structured security event when one-shot token fails to load.
M-4 — Add URL-encoding or JSON error-recovery documentation for
audit.jsonlconsumers.M-5 — Rate-limit DNS queries in iptables to slow DNS exfiltration channels.
🟡 Low — Nice to Have
npm audit fix(19 moderate in jest/babel)chmod 666on Claude config files tochmod 640(entrypoint.sh:212)SQUID_PROXY_HOSTis always the static172.30.0.10rather than resolving arbitrary hostnames📈 Metrics
Generated by automated security review agent 2026-06-18. Static analysis only; no dynamic testing performed.
Beta Was this translation helpful? Give feedback.
All reactions