[Coverage Report] Test Coverage Report — 2026-06-26 #5570
Replies: 1 comment
-
|
🔮 The ancient spirits stir; the smoke test agent has passed through the archive. 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.
-
Summary
Overall test coverage is strong — 98%+ across statements, lines, and functions. Branch coverage at 94.29% is the primary area for improvement, with 177 uncovered branch points across 3,101 total.
Overall Coverage
Security-Critical Paths
host-iptables-rules.tshost-iptables-shared.tshost-iptables-validation.tshost-iptables-chain.tssquid/acl-generator.tssquid/access-rules.tssquid/config-generator.tssquid/config-sections.tssquid/validation.tssquid/domain-acl.tsdomain-patterns.tscli.tsCoverage Gaps (Branch Coverage < 85%)
cli.tsrequire.main === moduleguardconfig-writer.tsworkdir-setup.tshost-env.tspid-tracker.tssquid/config-sections.tsssl-bump.tscommands/preflight.tslogs/log-parser.tsNotable Findings
host-iptables-rules.ts,squid/acl-generator.ts,squid/access-rules.ts,squid/domain-acl.ts, andsquid/validation.tsare fully covered, including all branch points. The highest-risk attack surface has comprehensive test coverage.squid/config-sections.tshas the only security-adjacent branch gap — at 82.75% branch coverage (5 uncovered of 29), the missing branches likely cover SSL certificate error handling and optional cache configuration sections that are only activated by specific CLI flags.domain-patterns.tshas 2 uncovered branch points — at 89.47% branch coverage, the gaps are in domain matching edge cases (e.g., empty input or unusual TLD formats). These patterns govern the domain allowlist, making any gaps worth addressing.cli.ts50% branch coverage is a measurement artifact — the file is 7 lines and the single uncovered branch is therequire.main === moduleguard, which cannot be exercised within the Jest test runner by design.Recommendations
🔴 High — Add tests for
squid/config-sections.tsbranch gapsThe 5 uncovered branches in
squid/config-sections.tscontrol conditional SSL certificate configuration and proxy connection settings. A test that exercises SSL-bump mode with and without upstream proxy configuration would cover these paths. This is the only security-adjacent file below 85% branch coverage.🟡 Medium — Cover the 2 missing
domain-patterns.tsbranchesThe domain allowlist is a primary security control. Adding test cases for edge-case inputs (empty string, numeric-only labels, very long domains) to
domain-patterns.test.tswould bring this file to 100% and harden the allowlist against unexpected inputs.🟢 Low — Address branch gaps in infrastructure helpers (
config-writer.ts,workdir-setup.ts)At 78–80% branch coverage, these files have error-path branches (file write failures, temp directory cleanup failures) that are untested. While not directly security-critical, covering them would prevent silent failures during container setup. Use Jest's
fsmocks to simulate write errors and verify the error is propagated correctly.Beta Was this translation helpful? Give feedback.
All reactions