[Coverage Report] Test Coverage Report — 2026-06-22 #5372
Closed
Replies: 1 comment
-
|
This discussion was automatically closed because it expired on 2026-06-29T03:26:04.189Z.
|
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
146 source files instrumented. Branches are the primary coverage gap.
Security-Critical File Coverage
host-iptables.tshost-iptables-rules.tshost-iptables-shared.tshost-iptables-cleanup.tssquid-config.tssquid/config-generator.tssquid/config-sections.tsdocker-manager.tsdomain-patterns.tsdomain-matchers.tsdomain-validation.tscli.tsTop Branch Coverage Gaps
cli.tsservices/agent-volumes/etc-mounts.ts/etcisolation boundaryworkdir-setup.tssquid-log-reader.tsconfig-writer.tspid-tracker.tssquid/config-sections.tslogs/log-parser.tsdomain-patterns.tsNotable Findings
host-iptables-*,docker-manager.ts,domain-validation.ts) are fully covered.cli.tsentry-point has a 50% branch gap: Only 1 of 2 conditional branches in the main entry point is exercised. The uncovered branch most likely represents an unhandled startup error path — a risk if the firewall silently fails to initialize.etc-mounts.tsis the highest-risk gap: This file governs which/etcfiles are selectively bind-mounted into the agent container (the/etcisolation boundary). With 9/28 branches uncovered (67.85%), there are untested code paths in filesystem access control logic that could allow unintended file exposure.Recommendations
🔴 High —
cli.tsentry-point branchThe main entry point (
src/cli.ts) covers only 1 of 2 branches (50%). Add a test that exercises the uncovered conditional — likely an error or early-exit path during CLI initialisation. This is the top orchestration layer; an untested failure path could cause the firewall to exit silently without blocking network traffic.🔴 High —
etc-mounts.ts/etcisolation coveragesrc/services/agent-volumes/etc-mounts.tshas 67.85% branch coverage (9 uncovered branches). This file determines which host/etcfiles are exposed inside the agent container. Missing branch coverage here means untested conditions around file selection, which directly affects the confidentiality of host system files (e.g.,/etc/shadowmust never be mounted). Target ≥90% branch coverage.🟡 Medium —
squid/config-sections.tsACL generation branchessrc/squid/config-sections.tshas 82.75% branch coverage (5 uncovered branches) despite 100% line coverage. The uncovered branches in the Squid config generator could produce subtly malformed ACL rules under edge-case inputs (e.g., empty domain lists, unusual upstream-proxy combinations). Add parameterised tests for boundary conditions in config section assembly.Beta Was this translation helpful? Give feedback.
All reactions