-
Notifications
You must be signed in to change notification settings - Fork 9
fix: create /tmp/gh-aw/mcp-logs before Docker mount #707
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -868,6 +868,15 @@ export async function writeConfigs(config: WrapperConfig): Promise<void> { | |
| } | ||
| logger.debug(`Squid logs directory created at: ${squidLogsDir}`); | ||
|
|
||
| // Create /tmp/gh-aw/mcp-logs directory for hiding via /dev/null mount | ||
| // This directory must exist before Docker tries to mount /dev/null over it | ||
| // (selective mounting mode hides this directory to prevent MCP log exfiltration) | ||
| const mcpLogsDir = '/tmp/gh-aw/mcp-logs'; | ||
| if (!fs.existsSync(mcpLogsDir)) { | ||
| fs.mkdirSync(mcpLogsDir, { recursive: true, mode: 0o755 }); | ||
| logger.debug(`MCP logs directory created at: ${mcpLogsDir}`); | ||
| } | ||
|
Comment on lines
+874
to
+878
|
||
|
|
||
| // Use fixed network configuration (network is created by host-iptables.ts) | ||
| const networkConfig = { | ||
| subnet: '172.30.0.0/24', | ||
|
|
||
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.
This test can pass even if
/tmp/gh-aw/mcp-logsalready existed before the test ran, so it may not actually validate the new directory-creation behavior. It also leaves/tmp/gh-aw/mcp-logsbehind after the suite completes. Consider making the test hermetic by ensuring the path does not exist in setup (and cleaning it up in teardown), or by mocking/spying onfs.existsSync/fs.mkdirSyncto assert the creation call happens.