Repository navigation
Protect agent step summary publication from symlink traversal - #76958
Conversation
Require successful built-in and custom redaction before publishing summaries, fail inaccessible scans closed, and reuse descriptor-safe regular-file snapshots. Regenerate only the required summary publication conditions in workflow locks. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
✅ 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.
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
|
✅ PR Specification Reviewer completed successfully! Commit pushed: 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. ✅
|
|
✅ 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.
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Design Decision Gate 🏗️Outcome: 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.
|
There was a problem hiding this comment.
Reviewed the changed lines and found no actionable correctness, security, or maintainability issues. The redaction gating and guarded summary publication changes are consistent with the accompanying tests and documentation. Static review only; tests were not run per review instructions.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~4 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Reviewed PR head be5e340d4f7cc5f8437c5cb07d75bbe22df39c20 against the compiler threat-detection contracts. The implementation and evidence align with the existing CTR-017 secret-leakage/publication boundary: summary publication is gated on successful masking, redaction fails closed, and guarded Linux no-follow reads reject unsafe files and races. No blocking conformance finding identified. Synchronized and queued specs/compiler-threat-detection-spec.md to v1.0.100 and its changelog; commit 8cc559c is queued for the same-repository PR branch. Static review only; tests were not run by this reviewer.
Generated by PR Specification Reviewer for #76958 · copilot · gpt50 · ~9 AIC · ⌖ ~2 AIC · ⊞ 1.6K
Comment /review-specs to run again
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /diagnosing-bugs and /tdd. Requesting changes on one contract mismatch in the publisher; the rest of the hardening looks sound.
📋 Key Themes & Highlights
Key Themes
- Missing-summary contract: off Linux,
withGuardedDirectorythrows before theENOENTno-op can run, so a missing summary fails the step. This contradicts the README and PR body. - Behavior change: removing the EACCES/EPERM skip in
redact_secrets.cjsis intended fail-closed, but it needs a release note. - Lock drift: not cited. Local
archie.lock.ymldiffers from HEAD, but the Go source emits the correct gated condition.
Positive Highlights
- ✅ Descriptor-pinned reads with
O_NOFOLLOWand dev/ino checks, plus a 10 MiB cap. - ✅ Fail-closed on unlink failure during redaction.
- ✅ Tests cover source and ancestor symlinks, FIFOs, directories, and descriptor-race replacement.
- ✅ The gating test now expects the summary step among the three uploads.
Open Question
I could not confirm which shell runs the summary step on Windows. It is a plain run: bash with no shell: override. If it runs under Git Bash, process.platform is win32 and the publisher fails on every run. Please confirm.
@copilot please address the review comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~7 AIC · ⌖ ~2 AIC · ⊞ 6.6K
Comment /matt to run again
| try { | ||
| let content; | ||
| try { | ||
| content = readGuardedFile(path.join(process.env.GH_AW_TMP_DIR || "/tmp/gh-aw", "agent-step-summary.md")); |
There was a problem hiding this comment.
[/diagnosing-bugs] The missing-summary no-op is bypassed off Linux. withGuardedDirectory throws an assetValidationError with no ENOENT code on non-Linux, so this catch rethrows and the step exits 1 even when agent-step-summary.md does not exist. That conflicts with the README and the PR body, which say missing or empty summaries remain a no-op.
💡 Suggested fix
Check for the file before the platform check, for example with an lstat that returns early on ENOENT, so the fail-closed path applies only when a summary is present. Alternatively, add a non-Linux test for the missing-file case and confirm that no non-Linux runner executes this step.
@copilot please address this.
| if (isErrnoCode(error, "EACCES", "EPERM")) { | ||
| core.warning(`Skipping inaccessible directory during secret redaction: ${currentDir}`); | ||
| continue; | ||
| } | ||
| throw error; |
There was a problem hiding this comment.
[/diagnosing-bugs] Removing the EACCES/EPERM skip is a deliberate fail-closed change, but it can turn previously green runs red when a directory in the scan tree is unreadable. The new tests cover the failure path, but nothing shows that a readable tree behaves as before, and the behavior change is not called out for users.
💡 Suggested follow-up
Add a release note explaining why unreadable directories now block publication. Consider a test that confirms readable trees still redact normally after the change.
@copilot please address this.
There was a problem hiding this comment.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Note
This error may be related to your runner configuration. You can now configure runners for Copilot code review separately from Copilot cloud agent by creating a copilot-code-review.yml file with your setup steps. Read the docs for details.
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
🎉 This pull request is included in a new release. Release: |
Summary
Addresses AI Scan alert 1093: agent-controlled summary symlinks could reach host files when secret redaction failed or silently skipped inaccessible directories.
continue-on-error. Inaccessible scans now fail redaction closed.The 365 regenerated workflow locks contain only the required summary condition change from
always()toalways() && steps.redact_secrets.outcome == 'success'. Workflow Markdown sources, including upstream-managed sources, are unchanged; locks were regenerated bymake recompile, not manually edited.Validation
make agent-report-progresspassed, including build, scoped lint, impacted tests, typecheck, and workflow drift checks.Related alert dispositions
No alerts were dismissed or suppressed, and no workflows were dispatched.