[Coverage Report] Test Coverage Report — Finite-Disclosure Protocol and Firecracker Integration #7164
Closed
Replies: 1 comment
|
This discussion was automatically closed because it expired on 2026-08-16T22:52:35.102Z.
|
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-08-09
This report analyzes test coverage for gh-aw-firewall, a security-critical L7 egress control firewall for agentic workflows. Coverage data was generated from the latest test suite run.
Overall Coverage
🛡️ Security-Critical Path Status
The following security-critical modules require special attention due to network isolation, domain filtering, and container management responsibilities:
src/bounded-execution/finite-disclosure.tssrc/enclave/runtime-preflight.tssrc/firecracker/preflight.tssrc/host-iptables-rules.tssrc/squid/config-generator.tssrc/docker-manager-*.tssrc/domain-patterns.tsKey Finding: Most security-critical network/container modules are well-covered. However, the finite-disclosure protocol (responsible for result validation and information-budget accounting) is severely under-tested.
📋 Coverage Table
Critical/High-Priority Modules
finite-disclosure.tsruntime-preflight.tspreflight.ts(Firecracker)host-iptables-rules.tsconfig-generator.tsdocker-manager-*.tsdomain-patterns.ts🔧 Function Audit
Exported functions in
finite-disclosure.ts(900 lines, 0% test coverage):validateSchema()schemaCardinality()informationChargeForSchema()validateValueAgainstSchema()canonicalizeSchemaValue()strictParseJson()validateEnclaveScriptRequest()parseAndValidateFiniteOutput()Note: The module uses custom recursive-descent parsers instead of
JSON.parseto prevent attacker-controlled inputs from building unbounded parse trees. This security-critical design choice is untested.📅 Recent Source Changes (last 7 days)
The repository has seen active development in the Firecracker/guest execution domain:
feat: add Firecracker guest execution transport— New Firecracker control planeEnforce isolated networking for Firecracker— Network isolation extensionAdd Firecracker control-plane preview— Core Firecracker featureRefactor external agent runtime lifecycle— Runtime lifecycle changesThese changes touch enclave/Firecracker preflight and validation logic, which depend indirectly on finite-disclosure validation. The low coverage in
runtime-preflight.ts(70%) andpreflight.ts(75%) reflects incomplete testing of new features.🔎 Notable Findings
CRITICAL: Finite-Disclosure Protocol Untested — The
src/bounded-execution/finite-disclosure.tsmodule implements the enclave response schema validation and information-budget accounting protocol with 9.26% statement coverage and 0.26% branch coverage. This is the trusted validator that prevents information leakage and schema violations. There is no dedicated test file (finite-disclosure.test.ts). The module contains ~9 exported functions with custom recursive-descent JSON parsing, cardinality computation using BigInt, and result canonicalization — all untested in TypeScript. (A JavaScript mirror exists for the enclave server, tested via integration tests, but the primary TypeScript implementation lacks unit test coverage.)Firecracker / Enclave Integration Tests Missing — Recent commits (PR Add Firecracker control-plane preview #7133–feat: add Firecracker guest execution transport #7135) add Firecracker guest execution and enclave runtime preflight. The
runtime-preflight.ts(70%) andpreflight.ts(75%) modules reflect incomplete branch coverage. These modules handle runtime validation of untrusted guest environments and preflight checks — edge cases and error paths remain undertested.Strong Coverage for Core Network & Container Logic — Host iptables rules, Squid proxy config, and Docker container management all have >12 dedicated test files with strong line and branch coverage. Domain pattern matching, CLI options parsing, and service startup/cleanup are well-tested.
No Regression in Legacy Security Paths — Re-export modules (
src/host-iptables.ts,src/squid-config.ts,src/docker-manager.ts,src/cli.ts) act as API boundaries. Actual implementations in submodules (host-iptables-rules.ts,squid/config-generator.ts,container-lifecycle.ts) have extensive test coverage.🎯 Recommendations
HIGH PRIORITY
src/bounded-execution/finite-disclosure.test.ts— Add dedicated unit tests for all 9+ exported functions. Cover:containers/bounded-execution/finite-disclosure.js) to ensure protocol parity for enclave integration testsMEDIUM PRIORITY
src/enclave/runtime-preflight.tsbranch coverage (46.51% → 70%+) — Add test cases for error paths:src/firecracker/preflight.tsbranch coverage (65.51% → 80%+) — Cover Firecracker-specific validation:LOW PRIORITY
Report Generated: 2026-08-09
Test Files: 260
Source Files: 507
Primary Gap: Finite-Disclosure Protocol Validation (9.26% coverage)
All reactions