Repository navigation
Skip private MCP cache during artifact redaction #65368
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 3 commits
ca83c93
a318c5e
2068f0f
163822f
4c52bd1
3557234
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 |
|---|---|---|
|
|
@@ -27,6 +27,9 @@ function findFiles(dir, extensions) { | |
| const entries = fs.readdirSync(dir, { withFileTypes: true }); | ||
| for (const entry of entries) { | ||
| const fullPath = path.join(dir, entry.name); | ||
| // MCP tool downloads are a private runtime cache, not an artifact source. | ||
| // The sandbox may own this directory with permissions the runner cannot traverse. | ||
| if (entry.isDirectory() && fullPath === "/tmp/gh-aw/aw-mcp") continue; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [/diagnosing-bugs] This fix only skips the hardcoded 💡 Suggested fixCompute both roots explicitly, e.g.: const SANDBOX_MCP_CACHE_DIRS = new Set([
"/tmp/gh-aw/aw-mcp",
path.join(process.env.RUNNER_TEMP || "/tmp", "gh-aw/aw-mcp"),
]);
...
if (entry.isDirectory() && SANDBOX_MCP_CACHE_DIRS.has(fullPath)) continue;Also worth considering: rather than a single exact-path check, catching @copilot please address this.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated in
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [/codebase-design] The 💡 Suggested fixThis file already imports from @copilot please address this.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated in
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
@copilot please address this.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated in |
||
| if (entry.isSymbolicLink()) { | ||
| fs.unlinkSync(fullPath); | ||
| core.warning(`Removed symbolic link before artifact upload: ${fullPath}`); | ||
|
|
||
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.
Updated in
4c52bd1: removed the subtree skip so readable MCP logs are redacted. Added coverage for both direct and broad safe-artifact declarations; they remain included because their files are still scanned.