fix(guardrails): catch Windows drive-root /tmp write targets - #2634
Conversation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Claude finished @kyle-sexton's task in 1m 41s —— View job Security review (
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 60007ac3a2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Last security-reviewed head: |
60007ac to
e810624
Compare
On Windows, POSIX /tmp and drive-root \tmp resolve to <drive>:\tmp rather than %TEMP%, so residue accumulates at the volume root unnoticed (#2594). Add a PreToolUse Bash|PowerShell guard that fails closed on those write targets and redirects operators to the platform temp. Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
Quote-aware redirect matching, per-segment destination binding for copy/move, Copy-Item/Move-Item coverage, SC2016 test fixes, and setup skill evals for the skill-quality gate. Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
e810624 to
8ab3c2f
Compare
|
Claude finished @cursor[bot]'s task in 1m 25s —— View job Code Review — skipped
Per the For reference — this PR's second commit ( |
|
Claude has reviewed this PR 1 time. The lane skips further automatic reviews after 5; deleting this comment resets the count. |
Closes #2594
Summary
On Windows, POSIX
/tmpresolves to a drive-rootC:\tmp(or\tmp) rather than%TEMP%, and nothing caught writes there — residue accumulated silently at the volume root.Fix
Guard Bash/PowerShell write targets of
/tmp,C:\tmp, and drive-root\tmpwith a clear block/redirect message toward the platform temp directory. Legitimate%TEMP%/TMPDIRusage remains allowed.Verification
See guardrails hook tests on PR checks.
Related
Refs #2592 — related PowerShell command-position work.