-
Notifications
You must be signed in to change notification settings - Fork 6
fix: hide /tmp/gh-aw/mcp-config/ from agent containers #716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
PR #706 hid /tmp/gh-aw/mcp-logs/ from agent containers using tmpfs mounts but missed /tmp/gh-aw/mcp-config/, which may contain MCP server configuration with tokens and credentials (CVE-003 from issue #197). Apply the same tmpfs hiding pattern for mcp-config in both normal and chroot modes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
Chroot tests failed Smoke Chroot failed - See logs for details. |
|
💫 TO BE CONTINUED... Smoke Claude was cancelled! Our hero faces unexpected challenges... |
|
🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation... |
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR mitigates CVE-003 by preventing agent containers from reading MCP server configuration files under /tmp/gh-aw/mcp-config/, using the same tmpfs “empty overlay” approach already used for /tmp/gh-aw/mcp-logs/.
Changes:
- Add tmpfs overlays for
/tmp/gh-aw/mcp-configin normal mode. - Add tmpfs overlays for
/tmp/gh-aw/mcp-configand/host/tmp/gh-aw/mcp-configin chroot mode. - Update inline documentation around the tmpfs hiding behavior.
Comments suppressed due to low confidence (1)
src/docker-manager.ts:736
- This introduces new security behavior (hiding
/tmp/gh-aw/mcp-config) but there are integration tests covering only themcp-logstmpfs hiding. Add similar tests to verifymcp-configis hidden in both normal and chroot modes, and that reading a known file path under it fails (tmpfs is empty).
// Hide /tmp/gh-aw/mcp-logs and /tmp/gh-aw/mcp-config directories using tmpfs
// (empty in-memory filesystems) to prevent the agent from accessing MCP server
// logs and configuration (which may contain tokens/credentials).
// For normal mode: hide /tmp/gh-aw/mcp-logs and /tmp/gh-aw/mcp-config
// For chroot mode: hide both paths and their /host/ equivalents
tmpfs: config.enableChroot
? [
'/tmp/gh-aw/mcp-logs:rw,noexec,nosuid,size=1m',
'/host/tmp/gh-aw/mcp-logs:rw,noexec,nosuid,size=1m',
'/tmp/gh-aw/mcp-config:rw,noexec,nosuid,size=1m',
'/host/tmp/gh-aw/mcp-config:rw,noexec,nosuid,size=1m',
]
: [
'/tmp/gh-aw/mcp-logs:rw,noexec,nosuid,size=1m',
'/tmp/gh-aw/mcp-config:rw,noexec,nosuid,size=1m',
],
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| tmpfs: config.enableChroot | ||
| ? [ | ||
| '/tmp/gh-aw/mcp-logs:rw,noexec,nosuid,size=1m', | ||
| '/host/tmp/gh-aw/mcp-logs:rw,noexec,nosuid,size=1m', | ||
| '/tmp/gh-aw/mcp-config:rw,noexec,nosuid,size=1m', | ||
| '/host/tmp/gh-aw/mcp-config:rw,noexec,nosuid,size=1m', | ||
| ] | ||
| : ['/tmp/gh-aw/mcp-logs:rw,noexec,nosuid,size=1m'], | ||
| : [ | ||
| '/tmp/gh-aw/mcp-logs:rw,noexec,nosuid,size=1m', | ||
| '/tmp/gh-aw/mcp-config:rw,noexec,nosuid,size=1m', | ||
| ], |
Copilot
AI
Feb 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In non-chroot mode with allowFullFilesystemAccess enabled, the host filesystem is mounted at /host, so /host/tmp/gh-aw/mcp-config (and /host/tmp/gh-aw/mcp-logs) would still be readable from inside the agent container. If these directories are meant to be hidden regardless of chroot mode, consider adding tmpfs overlays for the /host/... paths whenever /host is mounted (e.g., when allowFullFilesystemAccess is true), not only when enableChroot is true.
This issue also appears on line 721 of the same file.
Go Build Test Results ✅All Go projects built and tested successfully.
Overall: PASS ✅
|
C++ Build Test Results
Overall: PASS All C++ projects built successfully.
|
Smoke Test ResultsLast 2 Merged PRs:
Test Results:
Overall Status: PASS cc @Mossaka
|
Node.js Build Test Results
Overall: PASS ✅ All Node.js projects successfully installed dependencies and passed their test suites.
|
Rust Build Test Results
Overall: PASS ✅ All Rust projects built successfully and all tests passed.
|
Deno Build Test Results
Overall: ✅ PASS All Deno tests completed successfully.
|
.NET Build Test Results
Overall: PASS ✅ All .NET projects successfully restored dependencies, built, and executed.
|
Java Build Test Results ✅All Java projects successfully compiled and tested through AWF firewall.
Overall: PASS Test Detailsgson
caffeine
|
|
Chroot tests failed Smoke Chroot failed - See logs for details. |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation... |
|
💫 TO BE CONTINUED... Smoke Claude failed! Our hero faces unexpected challenges... |
C++ Build Test Results
Overall: PASS ✅ All C++ projects built successfully.
|
Rust Build Test Results
Overall: PASS ✅ All Rust projects built and tested successfully.
|
Bun Build Test Results
Overall: PASS ✅ All Bun projects built and tested successfully.
|
Smoke Test Results ✅Last 2 Merged PRs:
Tests:
Status: PASS cc @Mossaka
|
Go Build Test Results
Overall: PASS All Go projects successfully downloaded dependencies and passed tests.
|
Deno Build Test Results
Overall: ✅ PASS All Deno tests completed successfully.
|
Build Test: Node.js - Results
Overall: ✅ PASS All Node.js projects built and tested successfully.
|
.NET Build Test Results
Overall: PASS ✅ All .NET projects built and ran successfully.
|
✅ Java Build Test Results
Overall: PASS All Java projects successfully compiled and tested through the firewall with Maven proxy configuration.
|
Summary
Addresses CVE-003 from #197 (MCP Server Compromise Test Results).
PR #706 hid
/tmp/gh-aw/mcp-logs/from agent containers using tmpfs overlay mounts, but missed/tmp/gh-aw/mcp-config/, which may contain MCP server configuration files with tokens and credentials. A compromised MCP server or prompt injection attack could read these files to exfiltrate secrets.This PR adds the same tmpfs hiding pattern for
/tmp/gh-aw/mcp-config/in both normal and chroot modes, making the directory appear empty inside the agent container.Changes
/tmp/gh-aw/mcp-config(normal mode) and/host/tmp/gh-aw/mcp-config(chroot mode) alongside the existing mcp-logs mountsIssue #197 Pentest Findings Status
/proc/1/environ--dns-serversrestriction)Test plan
npm run buildpassesnpm testpasses (743 tests)npm run lintpasses (0 errors)🤖 Generated with Claude Code