[Security Review] ๐ Daily Security Review โ 2026-07-20 #6419
Replies: 3 comments
-
|
๐ฎ The ancient spirits stir. A smoke-test agent passed through, leaving a brief trace in the flame and a quiet blessing on the 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.
|
Beta Was this translation helpful? Give feedback.
-
|
The ancient oracle stirs: this smoke test agent passed through, the build held, and GitHub opened cleanly. 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.
|
Beta Was this translation helpful? Give feedback.
-
|
๐ฎ The ancient spirits stir: the smoke test agent was here. 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.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
๐ Executive Summary
This daily security review analyzed the gh-aw-firewall (AWF) codebase across network security, container isolation, domain validation, and input sanitization. The system demonstrates a defense-in-depth architecture with multiple overlapping controls. Overall security posture is strong, with no critical vulnerabilities identified. The complementary escape test (workflow
secret-digger-copilot, run 29286879560) confirmed the agent correctly refused a prompt-injection attack attempting credential exfiltration โ the threat detection system (GH_AW_THREAT_DETECTION_AIC: 7.327) flagged and logged it appropriately.Key metrics:
๐ Findings from Firewall Escape Test
From
escape-test-summary.txt(runsecret-digger-copilot, 2026-07-13):noopwith explicit refusal messageGH_AW_DETECTION_CONCLUSION: warning,GH_AW_DETECTION_REASON: threat_detectedAssessment: The threat detection pipeline (AIC scoring, detection issue creation, noop enforcement) functioned correctly. No firewall escape was demonstrated; the attack vector was at the AI-layer, not network layer.
๐ก๏ธ Architecture Security Analysis
Network Security Assessment
Evidence gathered:
Findings:
sysctl net.ipv6.conf.all.disable_ipv6=1(setup-iptables.sh)iptables -t nat ... -j DNAT --to-destination $SQUID_IP:3128AWF_DNS_SERVERSenv, iptables allow only those IPs:53--dst-type MULTICAST,169.254.0.0/16,224.0.0.0/4iptables -p udp -j REJECTafter DNS rulesforwarded_for delete; via offin squid.confMedium concern โ IPv6 sysctl failure silent:
setup-iptables.shuses|| echo "WARNING: failed to disable IPv6"โ if sysctl fails (e.g., container doesn't have the permission), IPv6 egress could bypass iptables DNAT rules. The code does checkip6tablesavailability and drops IPv6 via sysctl as fallback, but there is no hard fail-closed behavior if both approaches fail.Medium concern โ ICMP not explicitly blocked:
Outbound ICMP (ping) is not explicitly restricted. While Squid's
pinger_enable offremoves the proxy's ICMP use, agents could still use raw ICMP for covert channel or host discovery. The seccomp profile blocksptracebut not raw socket creation for ICMP.Container Security Assessment
Evidence gathered:
Findings:
cap_sys_chroot,cap_sys_admindropped before user code viacapshNET_ADMINSCMP_ACT_ERRNO; blocks ptrace, kexec, pivot_root, umount, keyctl, etc./host/procmounted withhidepid=2โ other PIDs' environ hidden/etc/shadowexcludedMedium concern โ LD_PRELOAD compatibility probe:
entrypoint.shcopiesone-shot-token.soto/host/tmp/awf-lib/and probes it withchroot /host /bin/sh -c 'LD_PRELOAD=... /bin/true'. If the probe fails, the library is silently skipped and API keys remain in the environment. This is a conditional security control โ its effectiveness depends on libc compatibility.Low concern โ seccomp profile coverage:
341 syscalls are explicitly allowed (SCMP_ACT_ALLOW) with a default-deny policy. The allowed set is broad (includes
mount,socket,clone, etc.). While this is reasonable for general agent workloads, the profile provides minimal restriction beyond the specific blocked list. No formal CIS Docker Benchmark comparison was performed against this allowed set.Domain Validation Assessment
Evidence gathered:
Findings:
assertSafeForSquidConfig()rejects spaces, newlines, quotes, semicolons, backticks, null bytesDOMAIN_CHAR_PATTERN = '[a-zA-Z0-9.-]*'instead of.*(redacted)https://` prefix parsing for fine-grained controlacl dst_ipv4 dstdom_regex ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$+ deny.domain.com) added to ACLLow concern โ Unicode domain normalization:
parseDomainWithProtocol()trims whitespace and strips trailing slashes but does not normalize Unicode (IDN/punycode). A domain likegithub.com(Cyrillici) would be treated as a distinct domain fromgithub.com. This is a defense-in-depth gap โ a misconfigured allowlist with a lookalike domain would not be caught.Input Validation Assessment
Evidence gathered:
Findings:
joinShellArgs()for multi-arg commands; single-arg passes through to container shellparseValidPortSpecs()+ bashis_valid_port_spec()dual-validationexeca('iptables', [...])avoids shell interpolationMedium concern โ single-argument shell passthrough:
When
awfreceives a single quoted argument (e.g.,awf -- 'echo $HOME'), it passes the string verbatim to the container shell (/bin/sh -c). This is intentional (documented inmain-action.tslines 170-194) to allow shell variable expansion inside the container. However, it means the command string is not sanitized before shell execution inside the container, which is the expected trust boundary. The risk is contained to the container's sandbox.172.30.0.30directly without authcontainers/api-proxy/server.jsโ no intra-container authsetup-iptables.shDNS allowlist--allow-domainssrc/squid/domain-acl.ts:28assertSafeForSquidConfig()setup-iptables.shIPv6 disable/var/log/squid/access.logentrypoint.sh:541-554/proc/<pid>/environvisibleentrypoint.shhidepid=2containers/api-proxy/body-handler.js:29containers/api-proxy/rate-limiter-window.test.jscapshor setuid binary in chrootentrypoint.sh:398-412cap_sys_chrootbefore user codeseccomp-profile.jsonescape-test-summary.txt๐ฏ Attack Surface Map
src/squid/config-generator.tscontainers/agent/setup-iptables.shAWF_DNS_SERVERSenv,setup-iptables.shsrc/squid/domain-acl.ts:28,src/domain-patterns.tsassertSafeForSquidConfig(), ReDoS-safe regexsrc/commands/main-action.ts:194containers/api-proxy/server.js, ports 10000-10003containers/agent/entrypoint.shselective bind mounts/etc/shadowexcluded, home dir allowlist, read-only system mountscontainers/agent/seccomp-profile.jsonsocket(AF_INET, SOCK_RAW)capshin entrypoint.shcap_sys_chroot,cap_sys_admindropped before user code๐ Evidence Collection
Network security commands and outputs
Command:
grep -n "DANGEROUS_PORTS\|is_valid_ipv4\|disable_ipv6" containers/agent/setup-iptables.shCommand:
grep -n "forwarded_for\|via off" src/squid/config-generator.tsCommand:
grep -n "dst_ipv4\|dst_ipv6\|deny" src/squid/config-generator.tsContainer security commands and outputs
Command:
python3 seccomp analysisCommand:
grep -n "CAPS_TO_DROP" containers/agent/entrypoint.shDomain validation commands and outputs
Command:
grep -n "assertSafeForSquidConfig" src/squid/domain-acl.tsCommand:
grep -n "DOMAIN_CHAR_PATTERN" src/domain-patterns.tsโ Recommendations
๐ด Medium Priority
Fail-closed on IPv6 disable failure
containers/agent/setup-iptables.sh(IPv6 disable section)sysctl net.ipv6.conf.all.disable_ipv6=1fails ANDip6tablesis unavailable, IPv6 egress is unblockedif ! sysctl ... && ! has_ip6tables; then echo "FATAL: Cannot disable IPv6"; exit 1; fiBlock outbound ICMP explicitly
containers/agent/setup-iptables.shandsrc/host-iptables-rules.tsiptables -A OUTPUT -p icmp -j REJECTafter DNS rules in both host and container chainsHarden one-shot-token fallback
containers/agent/entrypoint.sh:541-554[WARN] one-shot-token not active โ API keys remain in agent environmentwarning and consider surfacing it inawfoutput๐ก Low Priority
Add IDN/punycode normalization to domain parsing
src/domain-patterns.ts(parseDomainWithProtocol)url.domainToASCII()before processingDocument seccomp allowed-set rationale
containers/agent/seccomp-profile.jsonseccomp-profile.mdexplaining why specific syscalls are needed (e.g.,mountfor procfs,clonefor thread creation)Consider blocking raw socket creation in seccomp
containers/agent/seccomp-profile.jsonsocket(AF_INET, SOCK_RAW, IPPROTO_ICMP)is allowed (not in blocked list), enabling ICMP ping and potential raw packet craftingsocketwithAF_PACKETandSOCK_RAWwhere feasible, or rely on capability restriction (agent lacksCAP_NET_RAW)CAP_NET_RAWis not granted to the agent, which already prevents most raw socket abuse โ this is defense-in-depth๐ Security Metrics
Review conducted: 2026-07-20 | Reviewer: GitHub Copilot CLI (claude-sonnet-4.6) | Workflow run: 29731737702
Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
awmgmcpgSee Network Configuration for more information.
Beta Was this translation helpful? Give feedback.
All reactions