[Coverage Report] Test Coverage Report — 2026-06-08 #4542
Closed
Replies: 1 comment
-
|
This discussion was automatically closed because it expired on 2026-06-15T17:15:10.347Z.
|
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
🔴 Critical Gaps (< 50% statement coverage)
None. All 134 tracked files exceed 50% statement coverage.
🟡 Low Coverage (50–79% statement coverage)
src/commands/validators/network-options.tsOnly one file in the low-coverage band. The five uncovered branches cover the
!dockerHostCheck.validwarning path, thedindHintdetection, and a compound guard — all require a live TCPDOCKER_HOSTto exercise.🛡️ Security-Critical Path Status
src/host-iptables.tssrc/host-iptables-rules.tssrc/host-iptables-cleanup.tssrc/host-iptables-network.tssrc/host-iptables-shared.tssrc/squid-config.tssrc/squid/access-rules.tssrc/squid/acl-generator.tssrc/squid/config-generator.tssrc/squid/domain-acl.tssrc/squid/policy-manifest.tssrc/docker-manager.tssrc/domain-patterns.tssrc/cli.tssrc/services/agent-volumes/etc-mounts.tssrc/services/agent-volumes/workspace-mounts.tssrc/services/agent-volumes/credential-hiding.tsAll iptables rule generation and Squid ACL modules are at 100% branch coverage. Two files need attention:
src/cli.ts— 1 missed branch: therequire.main === moduleguard (structurally untestable via import).src/services/agent-volumes/etc-mounts.ts— 9 missed branches controlling which host/etcfiles are bind-mounted into the agent sandbox.🔍 Notable Findings
src/services/agent-volumes/etc-mounts.ts— 67.8% branch (9 missed): This file decides which host/etcentries (SSL certs,passwd,group,nsswitch.conf, etc.) are exposed in the sandbox. Missing branches cover absent-source-path fallbacks and non-standard distro layouts. Security-relevant: affects what host files the agent can read.src/logs/log-parser.ts— 67.1% branch (23 missed): IPv6 peer address parsing ([::1]:443format) and the JSON-format fallback path are both uncovered. Important for reliable post-incident log analysis.src/dind-bootstrap.ts— 66.7% branch (11 missed): ARC/DinD bootstrap guards against missing socket paths and failed probes. Gaps here could hide silent setup failures on ARC runners.Recent change:
src/env-utils.ts(commit bd11bbc) —normalizeEnvValuenarrowed to module-local; coverage remains 100%. No regression.📈 Recommendations
High —
src/services/agent-volumes/etc-mounts.ts: Add unit tests mocking the filesystem for missing/non-existent/etcsource paths. Directly affects what host files are exposed in the sandbox.Medium —
src/logs/log-parser.ts: Add test cases for IPv6 peer addresses (e.g.,[::1]:443) and malformed JSON fallback entries to ensure reliable audit-log parsing.Medium —
src/commands/validators/network-options.ts: Inject `DOCKER_HOST=(1.2.3.4/redacted) in a unit test to exercise the external-Docker-host warning branches without Docker.Low —
src/squid/policy-manifest.ts(fn=70%): Three helper functions at 0% coverage; exercise through the manifest-loading code path.Generated by test-coverage-reporter workflow. Trigger:
push. Run ID: 27154011732.Beta Was this translation helpful? Give feedback.
All reactions