[Coverage Report] Test Coverage Report — 2026-06-07 #4494
Closed
Replies: 1 comment
-
|
This discussion was automatically closed because it expired on 2026-06-14T17:59:46.980Z.
|
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.
-
📊 Test Coverage Report — 2026-06-07
105 test files · 139 source files · Data from
coverage/coverage-summary.json(2026-06-07T17:53 UTC)Overall Coverage
🔴 Critical Gaps (< 50% statement coverage)
None. All 139 source files are above 50% statement coverage.
🟡 Low Coverage (50–79% statement coverage)
src/commands/validators/network-options.tsDOCKER_HOSTnever triggered in testsOnly 1 file is in the low-coverage range.
🛡️ Security-Critical Path Status
src/host-iptables.tssrc/squid-config.tssrc/docker-manager.tssrc/domain-patterns.tssrc/cli.tsrequire.main === moduleguard (structural)The four core enforcement modules collectively have 99.3% statement coverage.
🔍 Notable Findings
network-options.ts— DinD warning paths untested (66.66% stmt, 50% branch)Lines 48–74 are uncovered — the three
logger.warn()blocks emitted whendockerHostCheck.valid === false. All require tests that setDOCKER_HOSTto a non-standard socket. The happy path is exercised 37×; no test triggers an invalid host.squid/policy-manifest.ts— HTTP-only / HTTPS-only protocol rule branches untested (70% fn)Three anonymous rule-builder functions (lines 139, 164, 187) for
allow-http-only-regex,allow-https-only-regex, andallow-https-only-plainare never called. These activate only when domains carry(redacted) orhttps://` prefixes. All current tests use protocol-agnostic domain lists.services/agent-volumes/etc-mounts.ts— Error catch blocks untested (82.45% stmt, 67.85% branch)The
try/catchinsynthesizeIdentityFileandreadFileContent(silentundefinedfallback on fs failure) is never exercised. Degraded behaviour under minimal ARC runners (no/etc/passwd) is unverified.logs/audit-enricher.ts— Protocol-matching branches (74.13% branch)The
isHttps === falsepath inprotocolMatchesand the regex-rule path indomainMatchesRuleare uncovered. These affect rule-attribution accuracy inawf logs auditoutput.Recent changes (last 7 days): 200+ files touched in a large refactor — all with companion test files. No new source code was added without tests.
📈 Recommendations
network-options.ts: Add 3 tests withDOCKER_HOSTset to `(redacted) or a non-standard socket to exercise the three DinD/split-filesystem warning branches.policy-manifest.ts: Add tests callinggeneratePolicyManifestwith(redacted) andhttps://`-prefixed domains to cover protocol-specific ACL rule generation (security-relevant).etc-mounts.ts: Mockfs.mkdirSync/fs.readFileSyncto throw; verifysynthesizeIdentityFileandreadFileContentreturnundefinedgracefully.audit-enricher.ts: Add test fixtures with HTTP (non-TLS) log entries and regex-pattern rules to coverprotocolMatchesanddomainMatchesRulebranches.Generated by test-coverage-reporter workflow · Trigger:
push· Run: 27100216990Beta Was this translation helpful? Give feedback.
All reactions