Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions src/docker-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -718,17 +718,22 @@ export function generateDockerCompose(
dns_search: [], // Disable DNS search domains to prevent embedded DNS fallback
volumes: agentVolumes,
environment,
// Hide /tmp/gh-aw/mcp-logs directory using tmpfs (empty in-memory filesystem)
// This prevents the agent from accessing MCP server logs while still allowing
// the host to write logs to /tmp/gh-aw/mcp-logs/ (e.g., /tmp/gh-aw/mcp-logs/safeoutputs/)
// For normal mode: hide /tmp/gh-aw/mcp-logs
// For chroot mode: hide both /tmp/gh-aw/mcp-logs and /host/tmp/gh-aw/mcp-logs
// 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-logs:rw,noexec,nosuid,size=1m',
'/tmp/gh-aw/mcp-config:rw,noexec,nosuid,size=1m',
],
Comment on lines 726 to +736
Copy link

Copilot AI Feb 12, 2026

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.

Copilot uses AI. Check for mistakes.
depends_on: {
'squid-proxy': {
condition: 'service_healthy',
Expand Down
Loading