You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. etc-mounts.ts — partial branch coverage on security-sensitive path (67.85%)
This file controls which /etc files (passwd, group, nsswitch.conf, SSL certs) are bind-mounted into the agent container. Missing branches include the paths where stagedPasswdContent already has the UID entry, and the group file has the GID. Adding tests for "already-present" vs "needs-append" paths would improve both security confidence and branch coverage.
2. network-options.ts — 50% branch coverage on DinD validation logic
Three conditional checks for --docker-host / --docker-host-path-prefix conflict detection have uncovered branches. These guard against misconfigured DinD setups that could silently bypass isolation. Tests for the "valid DinD config" success paths are missing.
3. log-parser.ts — 22 uncovered branches in IPv6 and complex URL parsing (68.57%)
The Squid log parser handles IPv6 addresses ([::1]:port) with multiple nested branches. Malformed or edge-case log entries with unusual dest IP formats are largely untested. Since log parsing feeds the audit and stats commands, errors here could silently drop security events.
4. dind-bootstrap.ts — 11 uncovered branches in DinD setup (66.66%)
Branch gaps are concentrated in cleanup/rollback paths during DinD filesystem staging. If the bootstrap fails mid-way, cleanup paths are not exercised by tests, which could leave the DinD environment in a partial state.
📈 Recommendations
High — etc-mounts.ts branch gaps (src/services/agent-volumes/etc-mounts.ts): Add test cases covering "UID/GID already present in staged file" vs "needs appending" branches in addUidToPasswdFile / addGidToGroupFile. Security-relevant; currently at 67.85% branch.
High — network-options.ts DinD validation (src/commands/validators/network-options.ts): Add tests for the dockerHostCheck.valid = true path and the dindHint && dockerHostPathPrefix success scenario. Currently at 50% branch — only the error paths are covered.
Medium — log-parser.ts IPv6 edge cases (src/logs/log-parser.ts): Add fixture-based tests with IPv6 destination addresses, malformed lines, and the ts vs timestamp field disambiguation paths. 22 uncovered branches at 68.57%.
Low — dind-bootstrap.ts cleanup paths (src/dind-bootstrap.ts): Add tests that simulate mid-bootstrap failures to exercise the rollback/cleanup branches. Currently at 66.66% branch.
📋 Test Suite Statistics
Test files: 108 (vs 141 source files)
Test lines: ~29,558
Recent changes (last 7 days): 1 commit — CI workflow update only (no new source files without tests)
Generated by test-coverage-reporter workflow. Trigger: push | Run: 27239490064
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
📊 Test Coverage Report — 2026-06-09
Overall Coverage
🔴 Critical Gaps (< 50% statement coverage)
None. All 141 source files exceed 50% statement coverage.
🟡 Low Statement Coverage (50–79%)
src/commands/validators/network-options.ts🛡️ Security-Critical Path Status
src/host-iptables.tssrc/host-iptables-rules.tssrc/host-iptables-shared.tssrc/squid-config.tssrc/squid/access-rules.tssrc/squid/acl-generator.tssrc/squid/domain-acl.tssrc/domain-patterns.tssrc/docker-manager.tsAll security-critical paths meet or exceed the ≥ 90% branch coverage threshold.
🔍 Branch Coverage Gaps (< 80%)
The following files have branch coverage below 80% — no statement gaps, but some conditional paths are untested:
src/cli.tssrc/commands/validators/network-options.tssrc/services/api-proxy-service.tssrc/dind-bootstrap.tssrc/services/agent-environment/environment-builder.tssrc/services/agent-volumes/etc-mounts.tssrc/logs/log-parser.tssrc/services/agent-volumes/docker-host-staging.tssrc/logs/audit-enricher.tssrc/commands/validators/log-and-limits.ts🔍 Notable Findings
1.
etc-mounts.ts— partial branch coverage on security-sensitive path (67.85%)This file controls which
/etcfiles (passwd, group, nsswitch.conf, SSL certs) are bind-mounted into the agent container. Missing branches include the paths wherestagedPasswdContentalready has the UID entry, and the group file has the GID. Adding tests for "already-present" vs "needs-append" paths would improve both security confidence and branch coverage.2.
network-options.ts— 50% branch coverage on DinD validation logicThree conditional checks for
--docker-host/--docker-host-path-prefixconflict detection have uncovered branches. These guard against misconfigured DinD setups that could silently bypass isolation. Tests for the "valid DinD config" success paths are missing.3.
log-parser.ts— 22 uncovered branches in IPv6 and complex URL parsing (68.57%)The Squid log parser handles IPv6 addresses (
[::1]:port) with multiple nested branches. Malformed or edge-case log entries with unusual dest IP formats are largely untested. Since log parsing feeds the audit and stats commands, errors here could silently drop security events.4.
dind-bootstrap.ts— 11 uncovered branches in DinD setup (66.66%)Branch gaps are concentrated in cleanup/rollback paths during DinD filesystem staging. If the bootstrap fails mid-way, cleanup paths are not exercised by tests, which could leave the DinD environment in a partial state.
📈 Recommendations
High —
etc-mounts.tsbranch gaps (src/services/agent-volumes/etc-mounts.ts): Add test cases covering "UID/GID already present in staged file" vs "needs appending" branches inaddUidToPasswdFile/addGidToGroupFile. Security-relevant; currently at 67.85% branch.High —
network-options.tsDinD validation (src/commands/validators/network-options.ts): Add tests for thedockerHostCheck.valid = truepath and thedindHint && dockerHostPathPrefixsuccess scenario. Currently at 50% branch — only the error paths are covered.Medium —
log-parser.tsIPv6 edge cases (src/logs/log-parser.ts): Add fixture-based tests with IPv6 destination addresses, malformed lines, and thetsvstimestampfield disambiguation paths. 22 uncovered branches at 68.57%.Low —
dind-bootstrap.tscleanup paths (src/dind-bootstrap.ts): Add tests that simulate mid-bootstrap failures to exercise the rollback/cleanup branches. Currently at 66.66% branch.📋 Test Suite Statistics
Generated by test-coverage-reporter workflow. Trigger:
push| Run: 27239490064Beta Was this translation helpful? Give feedback.
All reactions