Repository navigation
Keep MCP logs report cache owner-private - #79903
Conversation
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Specification Reviewer completed successfully! Caution agentic threat detected DetailsPotential security threats were detected in the agent output. Detected threat types: prompt injection. Review the workflow run logs for details. PR Specification ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ PR Code Quality Reviewer completed the code quality review. PR Code Quality ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Reviewed the changed lines and found no actionable correctness, security, performance, or maintainability issues blocking merge. The specialist pass was unavailable because its access to the pre-fetched files was blocked; this conclusion is based on the independent static review. No tests were run per the review instructions.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again
Comment MemoryPeek at saved memory (review-history)History |
Comment MemoryPeek at saved memory (spec-review-history)History |
🏗️ Design Decision Gate — ADR RequiredThis PR makes significant changes to core business logic (252 new lines in 📄 Draft ADR committed:
📋 What to do next
Once an ADR is linked in the PR body, this gate will re-run and verify the implementation matches the decision. ❓ Why ADRs Matter
ADRs create a searchable, permanent record of why the codebase looks the way it does. Future contributors (and your future self) will thank you. 📋 Michael Nygard ADR Format ReferenceAn ADR must contain these four sections to be considered complete:
ADRs are stored in
|
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /diagnosing-bugs and /tdd — requesting changes on one integrity gap and one test-coverage regression.
📋 Key Themes & Highlights
Key Themes
- Integrity check is weaker than the name suggests: the content-addressed dedup trusts file size, not content (inline on
mcp_logs_report_cache_unix.go:52). - Test coverage regression on Windows: the
unixbuild tag drops pure-logic tests from Windows runs (inline onmcp_logs_guardrail_test.go:1). - Lifecycle leak: each server process creates a
gh-aw-mcp-logs-*directory that is never removed (inline onmcp_logs_report_cache_unix.go:100). - Silent fallback: an explicit
--userskips the shared-directory env var (inline onstart_mcp_gateway.cjs:1673).
Positive Highlights
- ✅ Owner-only
0700directories and0600exclusive-create files, withos.OpenRootand ancestor validation. This closes the shared-/tmpattack surface well. - ✅ The shared
/tmp/gh-awmount is valid for the agenticworkflows backend (DefaultTmpGhAwMount), so thefile_pathhandoff works. - ✅ The report is not in the agent artifact upload, so the logs do not leak into artifacts.
- ✅ Tests assert the response does not echo report bytes, and the unsafe-cache case is covered.
- ✅ The stale
logs-cachepath has been removed from the code and docs.
The build-tag change is the blocker. The dedup check is a hardening gap rather than an exploitable path, since the directory is 0700 and owned by the process user, but the filename implies a guarantee the code does not enforce. The --user and cleanup items are low-to-medium and can follow up.
Reviewed committed HEAD 190ad5e. Local working-tree edits were not reviewed. go test was not run.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~9 AIC · ⌖ ~2 AIC · ⊞ 6.6K
Comment /matt to run again
There was a problem hiding this comment.
🟡 Changes recommended
The cache’s mode-only permission checks can leave inherited macOS ACL grants intact, allowing other users to read sensitive reports.
5 open issues
What changed in this PR
This PR hardens the gh aw MCP logs report handoff by replacing the legacy public cache with private storage, while preserving report contents and continuation response fields.
Changes:
- Adds owner-only Unix cache directories and files, with fail-closed behavior on other platforms.
- Configures shared report storage for the containerized MCP server.
- Updates tests, workflow guidance, and generated workflow hashes.
| File | Description |
|---|---|
scratchpad/layout.md |
Updates the logs-cache location description. |
pkg/cli/mcp_logs_report_cache_unix.go |
Implements private storage, path validation, and content deduplication. |
pkg/cli/mcp_logs_report_cache_other.go |
Rejects report storage on non-Unix platforms. |
pkg/cli/mcp_logs_guardrail.go |
Delegates report storage to the new cache implementation. |
pkg/cli/mcp_logs_guardrail_test.go |
Tests private permissions, unsafe paths, and report access. |
pkg/cli/mcp_logs_guardrail_integration_test.go |
Restricts storage integration tests to Unix. |
actions/setup/js/start_mcp_gateway.test.cjs |
Updates report-directory expectations and resolves temporary-path aliases. |
actions/setup/js/start_mcp_gateway.cjs |
Sets the shared report directory for the built-in server. |
.github/workflows/daily-rendering-scripts-verifier.md |
Describes the owner-only report handoff. |
.github/workflows/daily-rendering-scripts-verifier.lock.yml |
Refreshes hashes for the workflow prompt edit. |
.github/workflows/daily-cli-tools-tester.md |
Removes the legacy cache-path assumption. |
.github/workflows/daily-cli-tools-tester.lock.yml |
Refreshes hashes for the workflow prompt edit. |
.github/workflows/ci-front-door-researcher.md |
Removes legacy cache enumeration guidance. |
.github/workflows/ci-front-door-researcher.lock.yml |
Refreshes hashes for the workflow prompt edit. |
.github/aw/agentic-workflows-mcp.md |
Documents private storage and same-user shared-mount access. |
Review effort: Max (adaptive)
Co-authored-by: Copilot App <[email protected]>
|
Re: #79903 (comment) No changes were needed for this status update. |
|
Re: #79903 (comment) This status update does not require a change. I did not act on the flagged review output. |
|
Re: #79903 (comment) The actionable findings from this review are addressed in the inline threads. |
|
Re: #79903 (comment) The cache and gateway changes are in 105745c. Each actionable finding has a reply in its inline thread. |
|
Re: #79903 (comment) The collection-state and cursor tests are now separate from the platform-specific cache tests, and the gateway suite covers explicit container users. |
|
Re: #79903 (comment) I updated the generated ADR-79903 to match the implementation and linked it in the PR description. |
|
Re: #79903 (comment) No changes are needed for this review history update. |
|
Re: #79903 (comment) No changes are needed for this specification review history update. |
|
Re: #79903 (comment) The PR description now links to ADR-79903. It documents the storage policy, agent access requirements, and cleanup limits. |
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "031ce6b8f32541c2a6c94584e420972698610e34",
"kind": "requested",
"schema_version": "1",
"state": "2018c470b31982a194f1e304762460003762d8e33a4285e3a61e907f97c5a8af",
"work": [
"27dd8478a1c69cae601141344543346c9946bb02bd6919b7ff03d30f98773933",
"28dacefb25b794401514bcedee586d6fab0a9508a13897e3a19a82ec10fcee31",
"41e6665f2a9a011115fd4b5a0c335b301b776c810a4602020417e728ad129d5d",
"524620784e7a28f8c5d3d43da72d32787f39acc13079f0fbb265f3223bd598d9",
"a6a8b4aa70a46361a7bdde7e418962af3cd995a81a3cb62a21b6242b925e97bb",
"aff03a2ae5ceb5672c993089dbaa79477e64c57d108bfca66f71194b39cb8a63",
"bc21c911b66dcf22baf422c11c9627d75259880dd3f8f8f9103f881f7b9012a9",
"e94e68a693c90454af4ac14c22988d473cf6345edb09521e8bc0ca272f1312aa",
"f6ff60ea9a6185604f378fed6afbb17bc22f2e10b16338f1d2adcaa7d3cc5b70"
],
"workflow": "pr-sous-chef"
}
|
Co-authored-by: Copilot App <[email protected]>
The requested cache and gateway fixes are already present in branch commit |



MCP logs reports can contain sensitive workflow data. Store new reports in an owner-only cache so returning a
file_pathdoes not make the report readable by other local users.On Linux and macOS, the cache uses a fresh
0700directory and exclusively creates0600files. Unsafe paths fail closed, and the legacy cache is neither read nor migrated. The report bytes,file_pathresponse field, and both continuation cursor formats are preserved. Reuse verifies the report's SHA-256 digest, and graceful shutdown removes this server's tracked files. Other platforms fail closed. Reviewed #79834; no caller changes are needed.ADR: ADR-79903: Owner-Private MCP Logs Report Cache
Validation