[Coverage Report] Test Coverage Report — 2026-06-16 #5111
Replies: 1 comment
-
|
🔮 The ancient spirits stir; the smoke test agent has passed through the veil and left this omen in the discussion. 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.
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.
-
Overall Coverage Summary
Security-Critical File Status
host-iptables-rules.tshost-iptables-shared.tshost-iptables-cleanup.tssquid/access-rules.tssquid/acl-generator.tssquid/domain-acl.tssquid/validation.tsdomain-validation.tsdomain-patterns.tssquid/policy-manifest.tscommands/validators/network-options.tsservices/agent-volumes/etc-mounts.tsFile-by-File Breakdown (files with < 90% branch coverage)
commands/validators/network-options.tsservices/agent-volumes/etc-mounts.tslogs/log-parser.tsservices/agent-volumes/docker-host-staging.tslogs/audit-enricher.tsservices/agent-volumes/workspace-mounts.tsservices/agent-volumes/system-mounts.tslogs/log-streamer.tscommands/validators/log-and-limits.tsworkdir-setup.tsservices/host-path-prefix.tssquid/config-sections.ts🔍 Notable Findings
1.
logs/log-parser.ts— 68.57% branch coverage (22 branches uncovered)This is the parser that powers
awf logs statsandawf logs summary. Uncovered branches include unusual Squid decision codes (e.g.,TCP_HIT,TCP_REFRESH_*,TCP_MEM_HIT), empty user-agent fields, and domain extraction edge cases where thehostheader andurlfield diverge. A parsing failure silently returnsnulland drops the log entry, creating gaps in security audit output that could mask blocked access attempts from the aggregated report.2.
commands/validators/network-options.ts— 50% branch coverage (5/10)validateNetworkOptionsis called for everyawfinvocation and controls how domain whitelists, DNS servers, and upstream proxies are resolved. The 5 uncovered branches are the warning paths for external Docker hosts and DinD split-filesystem hints. These paths are only triggered in production ARC/DinD deployments — not exercised by current unit tests — meaning misconfiguration warnings could regress silently.3.
services/agent-volumes/etc-mounts.ts— 67.85% branch coverage (9/28 uncovered)This module controls which
/etcfiles (passwd, group, nsswitch.conf, SSL certs, etc.) are bind-mounted into the agent container. The uncovered branches include thesynthesizeIdentityFilefailure path and UID/GID synthesis fallback logic. Regressions here could result in either credential files being excluded (breaking the agent) or over-permissive mounts being added without a test catching it.4.
domain-patterns.ts— 89.47% branch coverage (2/19 uncovered)Two branches in domain pattern normalization and validation are not tested. Since this module drives the Squid ACL and determines whether a domain is allowed or blocked, any edge case here has a direct security impact. The uncovered branches likely involve unusual domain formats (e.g., bare IPs, trailing dots, or wildcard patterns).
📈 Recommendations
🔴 High — Add
log-parser.tsbranch coverageTarget: Bring
logs/log-parser.tsfrom 68.57% to ≥95% branch coverage.Add test cases for:
TCP_TUNNELandTCP_DENIED:TCP_HIT,TCP_MEM_HIT,TCP_REFRESH_MODIFIED,NONE, etc."-"in the user-agent field-and domain must be extracted from the URLWhy it matters: Silent
nullreturns fromparseLogLinemean blocked connections can disappear fromawf logs statsoutput, undermining the primary security audit mechanism.🔴 High — Cover
etc-mounts.tserror and fallback branchesTarget: Bring
services/agent-volumes/etc-mounts.tsbranches from 67.85% to ≥90%.Add test cases for:
synthesizeIdentityFilewhenmkdirSyncorwriteFileSyncfails (should returnundefinedgracefully)readFileContentwhen the file does not exist/etc/passwdis missing the runner's UID entryWhy it matters: This code controls credential file exposure into the agent. Untested error paths could create security regressions that are hard to detect in integration testing.
🟡 Medium — Cover
network-options.tsanddomain-patterns.tswarning/edge branchesTarget: Bring
commands/validators/network-options.tsfrom 50% to ≥90% branch coverage;domain-patterns.tsfrom 89% to 100%.For
network-options.ts:checkDockerHost()to returnvalid: falsewith and without adindHintsetFor
domain-patterns.ts:Why it matters:
network-options.tswarning paths guard against misconfigured ARC/DinD deployments that could break sandbox isolation.domain-patterns.tsedge cases directly affect whether untested domain formats leak through the ACL.Beta Was this translation helpful? Give feedback.
All reactions