Repository navigation
Centralize sensitive-path masking across runtimes - #9220
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Missing paths can evade Cloud Hypervisor masking, and NVX runs omit the promised audit artifact.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Centralizes sensitive-path masking and auditing across Docker and Cloud Hypervisor, while declaring future NVX applicability.
Changes:
- Adds a shared sensitive-path registry and audit artifact.
- Derives Docker and Cloud Hypervisor masks from the registry.
- Adds runtime parity, masking, classification, and audit tests.
| File | Description |
|---|---|
src/sensitive-paths.ts |
Defines paths, exemptions, resolution, and Docker masks. |
src/sensitive-paths.test.ts |
Tests registry behavior. |
src/sensitive-path-audit.ts |
Writes the audit artifact. |
src/config-writer.ts |
Records Docker mask audits. |
src/config-writer.test.ts |
Verifies Docker audit output. |
src/services/agent-service.ts |
Uses registry-derived Docker tmpfs mounts. |
src/services/agent-security-config.test.ts |
Tests generated security configuration. |
src/services/agent-volumes-security.test.ts |
Tests compose-level masks. |
src/cloud-hypervisor/filesystem-write-enforcement.ts |
Plans Cloud Hypervisor masks and classifications. |
src/cloud-hypervisor/filesystem-write-enforcement.test.ts |
Tests masking and classification. |
src/cloud-hypervisor/runtime-boot-loop.ts |
Writes Cloud Hypervisor audits and warnings. |
src/cloud-hypervisor-runtime-backend.test.ts |
Verifies runtime integration. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| .filter((entry): entry is { export: CloudHypervisorDirectoryExport; mask: ResolvedSensitivePath } => | ||
| entry !== undefined && isExistingRealDirectory(entry.mask.path)); |
| JSON.stringify(policyManifest, null, 2) | ||
| ); | ||
|
|
||
| if (!config.cloudHypervisor && !config.nvx) { |
|
@copilot address review feedback |
Addressed both review findings in commit |
|
✅ Copilot review passed with no inline comments. @copilot Add the |
|
| Metric | Base | PR | Delta |
|---|---|---|---|
| Lines | 92.70% | 92.71% | ➡️ +0.01% |
| Statements | 91.20% | 91.22% | 📈 +0.02% |
| Functions | 89.21% | 89.29% | 📈 +0.08% |
| Branches | 84.34% | 84.32% | 📉 -0.02% |
📁 Per-file Coverage Changes (5 files)
| File | Lines (Before → After) | Statements (Before → After) |
|---|---|---|
src/cloud-hypervisor/filesystem-write-enforcement.ts |
100.0% → 96.6% (-3.41%) | 100.0% → 95.9% (-4.09%) |
src/nvx/one-shot-adapter.ts |
83.5% → 82.9% (-0.60%) | 80.3% → 79.8% (-0.56%) |
src/cloud-hypervisor/runtime-boot-loop.ts |
96.3% → 96.5% (+0.30%) | 96.3% → 96.6% (+0.30%) |
src/config-writer.ts |
89.5% → 89.9% (+0.37%) | 89.1% → 89.6% (+0.47%) |
src/log-directory-setup.ts |
96.2% → 100.0% (+3.78%) | 96.3% → 100.0% (+3.71%) |
✨ New Files (2 files)
src/sensitive-path-audit.ts: 100.0% linessrc/sensitive-paths.ts: 100.0% lines
Coverage comparison generated by scripts/ci/compare-coverage.ts
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅
|
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.
|
|
🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation... Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "clients2.google.com"See Network Configuration for more information.
|
|
Smoke Cloud Hypervisor completed. Cloud Hypervisor + Copilot passed.
|
|
❌ Smoke Copilot BYOK AOAI (Entra) reports failed. AOAI BYOK (Entra) mode investigation needed...
|
|
🔌 Smoke Services — All services reachable! ✅
|
|
✅ Build Test Suite completed successfully!
|
|
🚀 Security Guard has started processing this pull request |
|
❌ Smoke Claude failed
|
|
❌ Smoke Copilot BYOK AOAI (api-key) reports failed. AOAI BYOK (api-key) mode investigation needed...
|
|
🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤
|
|
❌ Smoke Gemini reports failed. Facets need polishing...
|
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓
|
|
EGRESS_RESULT allow=pass deny=pass
|
|
Smoke Copilot: PASS
PR: "Centralize sensitive-path masking across runtimes" —
|
Cloud Hypervisor + Copilot Smoke Test
Overall: 2 PASS, 2 FAIL. Curl invocations were blocked at the tool-permission layer rather than returning an HTTP status, so network checks are inconclusive rather than confirmed-blocked.
|
|
Services smoke test:
Overall: PASS
|
|
Smoke OTEL tracing (pre-step outputs unavailable; verified directly)
|
Chroot Version Comparison
Result: Not all tests passed (Node.js version mismatch), so the
|
🏗️ Build Test Suite Results
Overall: 5/8 ecosystems passed — FAIL Failures:
|
Smoke Test: Copilot BYOK (Direct) Mode ✅ PASSRunning in direct BYOK mode ( Test Results:
All checks passed.
|


Sensitive
/tmp/gh-awpaths were masked independently per runtime, allowing protections to drift. This change establishes a shared registry and records the resolved masks for each supported runtime./hostvariants from it.sensitive-paths.json. Document/tmp/gh-aw/mcp-payloadsas intentionally readable.NVX applicability is declared in the registry; its enforcement remains deferred.