[Security Review] Daily Security Review — 2026-04-13 #1962
Closed
Replies: 1 comment
-
|
This discussion was automatically closed because it expired on 2026-04-20T13:11:26.589Z.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
📊 Executive Summary
Review date: 2026-04-13
Reviewer: Automated security agent (Claude Sonnet 4.6)
Scope: Full codebase — network controls, container hardening, input validation, credential handling, supply-chain, dependency health
Security posture: Good — defence-in-depth is well-implemented. No critical vulnerabilities found. Several medium/low items warrant attention.
🔍 Findings from Prior Firewall Escape Test (Secret Digger — Copilot)
Workflow run:
secret-digger-copilot@ 2026-04-11T03:25Conclusion:
success— agent produced onlynoopsafe outputsSecret verification result:
successThe Secret Digger agent was unable to exfiltrate secrets or find exposed credentials, confirming that:
one-shot-tokenLD_PRELOAD +unset_sensitive_tokens) is functioning🛡️ Architecture Security Analysis
Network Security Assessment
Evidence gathered from:
src/host-iptables.ts(703 lines),containers/agent/setup-iptables.sh(460 lines),src/squid-config.ts(855 lines)Host-level (DOCKER-USER chain / FW_WRAPPER):
Container-level DNAT (setup-iptables.sh):
Dangerous ports blocked in Squid config:
Assessment: Network architecture is layered (L3 iptables + L7 Squid) and covers known bypass vectors including raw IP access, IPv6 tunneling, and DNS exfiltration.
Container Security Assessment
Evidence gathered from:
src/docker-manager.ts(2934 lines),containers/agent/entrypoint.sh(911 lines),containers/agent/seccomp-profile.jsonCapability model:
no-new-privileges:
Docker socket access:
UID/GID validation:
Assessment: Container hardening is rigorous. The separation of NET_ADMIN into a dedicated short-lived init container is a strong design decision that eliminates the window during which the agent holds network admin privileges.
Domain Validation Assessment
Evidence gathered from:
src/domain-patterns.ts(343 lines),src/squid-config.tsInjection prevention:
Observation: Backslash (
\) is not included inSQUID_DANGEROUS_CHARSbut is checked separately invalidateDomainOrPattern()per the comment atdomain-patterns.ts:25. Defense is applied at two independent validation layers.Input Validation Assessment
Shell argument escaping:
All
execacalls use array-form arguments (not string-form), so no shell metacharacter injection is possible via exec arguments.no-unsafe-execa suppression (ssl-bump.ts:216):
✅ Recommendations
🔴 Critical
None identified.
🟠 High
H1 — Document and gate
--enable-dindmore aggressivelysrc/cli.ts:1454has a comment noting firewall bypass is possible. Consider adding a required confirmation flag (e.g.--enable-dind-i-understand-firewall-bypass) or an explicit--allow-network-bypassacknowledgement to prevent accidental use in CI pipelines where--enable-dindmight be passed silently.H2 — one-shot-token: statically-linked binary gap
The LD_PRELOAD one-shot-token protection cannot intercept
execveinto statically-linked binaries (e.g., Go binaries, musl-static builds). If an agent spawns a static binary before the unset window completes, that binary can read/proc/1/environdirectly. Mitigation: confirm thatunset_sensitive_tokens()executes before any subprocess is spawned, and document the remaining risk.🟡 Medium
M1 —
--enable-host-accessdefault port list is broadWhen the user specifies
localhostin--allow-domains, 12 dev-server ports are automatically added (3000,3001,4000,4200,5000,5173,8000,8080,8081,8888,9000,9090) viasrc/cli.ts:1041. If the host runs sensitive services on any of these ports, they become reachable from the agent. Recommend logging the auto-added port list atwarnlevel and allowing users to set--allow-host-ports noneto suppress defaults.M2 —
--allow-host-service-portsdocuments dangerous-port bypass without rate-limitingsrc/cli.ts:833: "bypasses dangerous port restrictions for host-local traffic." This is intentional but could allow SSH (22) or database ports to be reached on the host gateway if a user explicitly sets them. Confirm the warning is surfaced clearly in--helpoutput and consider a secondary confirmation mechanism.M3 — Repudiation gap: no per-process attribution in logs
iptables LOG uses
--log-uid(UID) but not PID. Squid logs client IP but not process name. For forensic investigations (e.g., "which subprocess made this blocked connection?"), there is no way to correlate network events to specific process trees. Consider adding auditd or eBPF-based process-to-socket attribution as a future enhancement.🟢 Low
L1 — SSL Bump CA key in workDir on host filesystem
ssl-bump.tssetschmod 0o600on the key, but the workDir/tmp/awf-<ts>is owned by the invoking user. On shared systems (multi-user hosts), if the invoking user is root, the key is adequately protected. On systems where awf runs as a non-root user, the key inherits that user's protections. No change required; document this assumption.L2 —
no-unsafe-execasuppressed in ssl-bump.ts:216The suppressed call passes
-subj /CN=\$\{commonName}wherecommonNameis a hardcoded constant ('AWF Session CA'). The suppression is safe. However, ifcommonNameis ever made configurable, ensure it is validated before use. Add an inline comment explaining this constraint.L3 — Domain file parsing allows comments but no schema validation
parseDomainsFile()(src/cli.ts) strips#comments but does not enforce any maximum domain count or line length. A very large domains file would not fail gracefully. Add a configurable maximum (e.g., 1000 domains) and document the limit.📈 Security Metrics
shell: trueexec callsBeta Was this translation helpful? Give feedback.
All reactions