[Coverage Report] Test Coverage Report — 2026-06-22 #5392
Closed
Replies: 1 comment
-
|
This discussion was automatically closed because it expired on 2026-06-29T15:16:18.812Z.
|
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.
-
📊 Coverage Overview
🔒 Security-Critical Path Coverage
src/host-iptables.tssrc/squid-config.tssrc/docker-manager.tssrc/domain-patterns.tssrc/cli.ts1 The
cli.ts50% branch gap is a false positive — the sole uncovered branch isif (require.main === module), an intentional top-level execution guard.services/agent-volumes/etc-mounts.ts/etcbind-mounts into agentsrc/domain-patterns.tssrc/config-writer.tscommands/network-setup.tscommands/preflight.tslogs/log-parser.ts💡 Notable Findings
Security-critical network isolation code is well-covered.
host-iptables.ts,squid-config.ts, anddocker-manager.tsall reach 100% across all metrics — the rules that enforce egress control have no untested paths.etc-mounts.tshas a meaningful security gap at 67.85% branch coverage. Three branches are untested: theelsepath ofhasEntryWithName(), and theif (!passwdPath)/if (!groupPath)error branches. These govern how the agent container's/etc/passwdand/etc/groupare constructed; unexpected inputs on a host could silently produce a malformed container environment.domain-patterns.tshas 2 untested branches (89.47%). This file generates the Squid ACL domain allowlist. A latent edge case here could permit an unexpected domain to pass the filter, making coverage improvement here a priority even though the file reads 100% on statements.Overall project health is strong. At 97.83% statement coverage across 5,166 statements, this codebase has a robust test foundation with only targeted gaps remaining.
✅ Recommendations
🔴 High — Add error-path tests for
etc-mounts.tsCover the three missing branches in the
/etcbind-mount logic:if (!passwdPath)/if (!groupPath)(missing host file paths)!hasEntryWithName()else branch (host entry not found in content)These paths determine what the agent container sees as system identity files. Untested failure modes here could produce containers with missing or malformed
/etc/passwd, silently bypassing UID/GID mapping.🟡 Medium — Close branch gap in
domain-patterns.tsRaise branch coverage from 89.47% to 100% by adding tests for the 2 remaining edge cases in domain pattern validation. Since this module drives Squid's ACL allowlist, every uncovered branch is a potential domain-bypass vector that has never been exercised by the test suite.
🟢 Low — Suppress false-positive in
cli.tsAdd
/* istanbul ignore next */before theif (require.main === module)guard. This removes the misleading 50% branch reading and keeps the coverage dashboard signal clean for real gaps.Beta Was this translation helpful? Give feedback.
All reactions