[Coverage Report] Test Coverage Report — 2026-06-20 #5326
Closed
Replies: 2 comments
-
|
This discussion was automatically closed because it expired on 2026-06-27T15:43:50.720Z.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
|
🔮 The ancient spirits stir, and the smoke test agent has passed through this discussion. The omens are recorded, and the firewall remains watched. 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.
-
Overall Coverage Summary
Test suite: 116 test files (67 in
src/, 5 insrc/squid/, 9 insrc/logs/, 35 intests/)Security-Critical File Coverage
squid-config.tshost-iptables.tshost-iptables-rules.tshost-iptables-shared.tshost-iptables-cleanup.tshost-iptables-network.tsdocker-manager.tsdomain-patterns.tssquid/policy-manifest.tscli.tslogs/log-streamer.tsNotable Findings
Excellent security-core coverage: All primary enforcement paths —
squid-config.ts,host-iptables-rules.ts,host-iptables-shared.ts,host-iptables-cleanup.ts,docker-manager.ts— are at 96–100% across all metrics. Domain ACL filtering, iptables rule generation, and container lifecycle are robustly tested.squid/policy-manifest.tshas 3 untested functions (70% function coverage): This module validates policy rules and dangerous-port configurations passed to Squid. Missing coverage for 3 of 10 functions leaves validation edge-cases untested in a security-gating component.logs/log-streamer.tsbranch coverage is 77.77% (8/36 uncovered branches): Error-handling and fallback paths in log streaming are under-tested. While not on the firewall enforcement path, log omissions can hide security-relevant traffic in post-incident analysis.cli.tsentry-point has 50% branch coverage (1/2 branches): The top-level entrypoint is a 7-statement file — one conditional branch (likely a process-env guard or error path) is never exercised by the test suite.Recommendations
🔴 High — Add tests for uncovered functions in
squid/policy-manifest.tsThree functions in
policy-manifest.tshave no test coverage. Because this module controls which domains and ports Squid is allowed to forward, gaps here are security-relevant. Action: Identify the 3 uncovered functions (e.g., viacoverage/src/squid/policy-manifest.ts.html) and add unit tests for port-blocking validation and edge-case domain rules.🟡 Medium — Improve
logs/log-streamer.tsbranch coverage from 77.77% → 90%+Eight uncovered branches in
log-streamer.tsare likely in error-handling paths (file-not-found, parse failures, empty log files). Gaps here mean post-incident forensics could silently fail. Action: Add tests that simulate missing log files, malformed Squid access-log lines, and log-stream EOF conditions.🟢 Low — Close the single open branch in
cli.tsThe entrypoint has one untested branch (1/2 branches, 85.71% statement coverage). This is a cosmetic gap in a tiny file, but 100% entry-point coverage is a low-effort baseline. Action: Inspect
coverage/src/cli.ts.html, identify the uncovered branch (likely anif (require.main === module)or error guard), and add a targeted test or mock.Beta Was this translation helpful? Give feedback.
All reactions