Skip to content

Add NVX read-exposure masking for future exports - #9211

Merged
lpcox merged 5 commits into
mainfrom
copilot/nvx-carry-over-cloud-hypervisor
Sep 29, 2026
Merged

lpcox merged 5 commits into
mainfrom
copilot/nvx-carry-over-cloud-hypervisor

Conversation

Copilot AI commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

NVX currently exports only the workspace and optional tool cache, so it does not expose mcpg logs. If a future export includes /tmp/gh-aw, write restrictions alone won’t prevent reading sensitive contents.

  • Mask staged paths: Replace /tmp/gh-aw/mcp-logs, /tmp/gh-aw/sandbox/firewall/logs, and /tmp/gh-aw/sandbox/firewall/audit with root-owned, inaccessible directories.
  • Fail closed: Reject masks that escape an export, resolve through symlinks, cover an entire export, or overlap writable overlays.
  • Preserve payload access: Keep /tmp/gh-aw/mcp-payloads readable for spilled tool responses; guard against overlapping it with masks.
  • Keep copy-back consistent: Exclude masked paths from copy-back and host-conflict snapshots.

Copilot AI changed the title [WIP] Fix NVX to carry over Cloud Hypervisor export read-exposure masking Add NVX read-exposure masking for future exports Sep 29, 2026
Copilot AI requested a review from lpcox September 29, 2026 20:04
@lpcox
lpcox marked this pull request as ready for review September 29, 2026 21:41
Copilot AI balanced review requested due to automatic review settings September 29, 2026 21:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Mask selection misses descendant exports, and mask creation can follow a raced symlink outside the staging tree.

Review effort: Balanced
Findings: 2 High severity

Open (2)
What changed in this PR

Adds safeguards for sensitive paths in potential future NVX exports.

Changes:

  • Masks sensitive log and audit directories while preserving MCP payload access.
  • Excludes masked paths from snapshots and copy-back.
  • Adds masking and fail-closed tests.
File Description
src/​nvx/​workspace-layer.ts Implements read-exposure masking and copy-back exclusions.
src/​nvx/​workspace-layer.test.ts Tests masking, exemptions, and validation failures.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/nvx/workspace-layer.ts Resolved
Comment thread src/nvx/workspace-layer.ts Resolved
lpcox and others added 2 commits September 29, 2026 15:30
@github-actions

Copy link
Copy Markdown
Contributor

✅ Copilot review passed with no inline comments.

@copilot Add the ready-for-aw label to this PR to trigger agentic CI smoke tests.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Coverage Check Passed

Overall Coverage

Metric Base PR Delta
Lines 92.66% 92.69% 📈 +0.03%
Statements 91.15% 91.19% 📈 +0.04%
Functions 89.18% 89.24% 📈 +0.06%
Branches 84.29% 84.30% ➡️ +0.01%
📁 Per-file Coverage Changes (6 files)
File Lines (Before → After) Statements (Before → After)
src/api-proxy-config-domains.ts 100.0% → 99.2% (-0.80%) 99.0% → 98.5% (-0.56%)
src/cloud-hypervisor/mount-tree.ts 98.4% → 97.6% (-0.78%) 98.5% → 97.8% (-0.74%)
src/config-writer.ts 89.7% → 89.5% (-0.13%) 89.7% → 89.1% (-0.53%)
src/nvx/workspace-layer.ts 92.5% → 92.5% (-0.07%) 87.4% → 88.1% (+0.63%)
src/cloud-hypervisor/exports.ts 92.5% → 92.6% (+0.09%) 89.4% → 89.5% (+0.12%)
src/log-directory-setup.ts 96.2% → 100.0% (+3.78%) 96.3% → 100.0% (+3.71%)

Coverage comparison generated by scripts/ci/compare-coverage.ts

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

❌ Smoke Gemini reports failed. Facets need polishing...

💎 Faceted by Smoke Gemini

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

✅ Build Test Suite completed successfully!

Generated by Build Test Suite for #9211

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

❌ Smoke Copilot BYOK AOAI (Entra) reports failed. AOAI BYOK (Entra) mode investigation needed...

🪪 BYOK (AOAI Entra) report filed by Smoke Copilot BYOK AOAI (Entra)

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Security Guard has started processing this pull request

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

📰 BREAKING: Report filed by Smoke Copilot

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓

🔑 BYOK report filed by Smoke Copilot BYOK

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅

📡 OTel tracing validated by Smoke OTel Tracing

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Smoke Cloud Hypervisor completed. Cloud Hypervisor + Copilot passed.

Cloud Hypervisor + Copilot smoke test by Smoke Cloud Hypervisor

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

❌ Smoke Copilot BYOK AOAI (api-key) reports failed. AOAI BYOK (api-key) mode investigation needed...

🔑 BYOK (AOAI api-key) report filed by Smoke Copilot BYOK AOAI (api-key)

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

🔮 The oracle has spoken through Smoke Codex

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅

🛡️ Egress verdict from Smoke Copilot Network Isolation

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

❌ Smoke Claude failed

Generated by Smoke Claude for #9211

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.

Tested by Smoke Chroot

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

🔌 Smoke Services — All services reachable! ✅

🔌 Service connectivity validated by Smoke Services

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Copilot — PR: "Add NVX read-exposure masking for future exports"

  • ✅ GitHub MCP (latest merged: "Expand self-hosted runner diagnostics...")
  • ✅ github.com (HTTP 200)
  • ✅ File write/read
    PASS — @Copilot, assignees @lpcox

📰 BREAKING: Report filed by Smoke Copilot
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: Copilot BYOK (Direct) Mode ✅

Results:

  • ✅ GitHub MCP connectivity: 2 merged PRs fetched
  • ✅ GitHub.com connectivity: HTTP 200
  • ✅ File write/read test: Verified
  • ✅ BYOK inference path: Working (running in direct BYOK mode via api-proxy → api.githubcopilot.com)

Overall Status: PASS

Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY) with api-proxy sidecar.

🔑 BYOK report filed by Smoke Copilot BYOK
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: Cloud Hypervisor + Copilot

  1. PR list (github MCP): PASS — list_pull_requests returned data (1 result), though filter state=merged yielded an open PR (tool-level anomaly, not blocking).
  2. curl https://github.com: FAIL — sandbox tool layer blocked all curl network calls ("Permission denied and could not request permission from user"), including loopback; could not obtain HTTP status.
  3. File write/read /tmp/gh-aw/agent/smoke-cloud-hypervisor-<run_id>.txt: PASS — wrote and read back unique content successfully.
  4. curl (example.com/redacted) (expect blocked): FAIL — same sandbox-level curl block as check 2; could not confirm 000/403 vs firewall.

Note: Checks 2 and 4 could not run because the execution sandbox itself denies curl network access at the tool-permission layer, independent of the AWF firewall being tested. This is an environment limitation, not a firewall result.

Cloud Hypervisor + Copilot smoke test by Smoke Cloud Hypervisor
Add label ready-for-aw to run again

@github-actions github-actions Bot added the smoke-copilot-network-isolation Copilot network-isolation egress smoke test label Sep 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

EGRESS_RESULT allow=pass deny=pass

✅ Allowed domain (api.github.com → 200)
✅ Blocked domain (example.com blocked)
Overall: PASS — @lpcox

🛡️ Egress verdict from Smoke Copilot Network Isolation
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

OTEL smoke test

  • ✅ S1 Module loading: otel.js loads; exports startRequestSpan, setTokenAttributes, setBudgetAttributes, endSpan, endSpanError, shutdown, isEnabled (+ internals).
  • ✅ S2 Tests: 3 suites, 68 tests passed.
  • ✅ S3 Env forwarding: trace ID and parent span ID are forwarded in env-passthrough.ts. OTEL endpoint, headers and trace vars are forwarded in api-proxy-env-config.ts.
  • ✅ S4 Token tracker: the onUsage callback exists in token-tracker-http.js.
  • ✅ S5 Diagnostics: otel.jsonl has 1 line, so a span was written. I did not check the OTLP export.

📡 OTel tracing validated by Smoke OTel Tracing
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

🏗️ Build Test Suite Results

Ecosystem Project Build/Install Tests Status
Bun elysia ❌ not run ❌ FAIL
Bun hono ❌ not run ❌ FAIL
C++ fmt ✅ N/A ✅ PASS
C++ json ✅ N/A ✅ PASS
Deno oak N/A not run ❌ FAIL
Deno std N/A not run ❌ FAIL
.NET hello-world ✅ N/A ✅ PASS
.NET json-parse ✅ N/A ✅ PASS
Go color ✅ pass ✅ PASS
Go env ✅ pass ✅ PASS
Go uuid ✅ pass ✅ PASS
Java gson ✅ 1/1 passed ✅ PASS
Java caffeine ✅ 1/1 passed ✅ PASS
Node.js clsx ✅ pass ✅ PASS
Node.js execa ✅ pass ✅ PASS
Node.js p-limit ✅ pass ✅ PASS
Rust fd ✅ 1/1 passed ✅ PASS
Rust zoxide ✅ 1/1 passed ✅ PASS

Overall: 6/8 ecosystems passed — FAIL

Failures

  • Bun and Deno: the installer commands (curl ... | bash and curl ... | sh) were rejected with "Permission denied and could not request permission from user". Neither runtime was installed and no tests ran.
  • Java: with the default ~/.m2 repository, Maven failed with LocalRepositoryNotAccessibleException. The Java results above come from re-running with -Dmaven.repo.local=/tmp/gh-aw/agent/m2, which passed.
  • All 8 repositories cloned successfully.
  • The build-test label was not added because some ecosystems failed.

Generated by Build Test Suite for #9211 · copilot · auto · 27.6 AIC · ⊞ 11.8K · ◷
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Smoke services: ✅ Redis PONG, ✅ pg_isready, ✅ SELECT 1 — PASS

🔌 Service connectivity validated by Smoke Services
Add label ready-for-aw to run again

@lpcox
lpcox enabled auto-merge (squash) September 29, 2026 22:53
@github-actions

Copy link
Copy Markdown
Contributor

Smoke test summary
Merged PRs: Expand self-hosted runner diagnostics for GHES, orphaned networks, and ARC/DinD logs; Ignore Squid NONE decisions in firewall log aggregation
GitHub merged PR review: ✅
GitHub PR details: ✅
Playwright github.com title check: ❌ blocked by browser policy
File write/read: ✅
Build (npm ci && npm run build): ✅
Overall: FAIL

🔮 The oracle has spoken through Smoke Codex
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Chroot Version Comparison

Runtime Host Version Chroot Version Match?
Python 3.12.14 3.12.14 ✅
Node.js v24.21.0 v22.23.2 ❌
Go go1.22.12 go1.22.12 ✅

Result: failed. Node.js differs between host and chroot, so the smoke-chroot label was not added.

Tested by Smoke Chroot
Add label ready-for-aw to run again

@lpcox
lpcox merged commit 1c21d3f into main Sep 29, 2026
132 of 139 checks passed
@lpcox
lpcox deleted the copilot/nvx-carry-over-cloud-hypervisor branch September 29, 2026 23:01

This branch was previously deployed

1 inactive deployment
aoai-model — 0f436648 Deployed Sep 29, 2026 by lpcox via conclusion #1827
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NVX: carry over Cloud Hypervisor export read-exposure masking when NVX adopts virtiofs

3 participants