Skip to content

fix(guardrails): scan Bash-posted GitHub bodies for secrets and machine paths - #12093

Merged
kyle-sexton merged 14 commits into
mainfrom
fix/guardrails-bash-body-secret-scan
Nov 1, 2026
Merged

kyle-sexton merged 14 commits into
mainfrom
fix/guardrails-bash-body-secret-scan

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

No related issue: security gap found by a PR Lane audit

Summary

secret-pattern-detection.sh and hardcoded-path-check.sh ran only on the Write/Edit/NotebookEdit row and the MCP push_files/create_or_update_file row. The Bash|PowerShell row had neither. So a gh pr|issue comment|review|create|edit --body ..., a writing gh api, or a curl POST to the GitHub API, run through Bash, posted its body publicly with no secret or machine-path scan. That was true for a bare command and for one inside a wrapper.

Fix

  • Shared body extraction. block-fix-request-post.sh's parse of what a gh/curl command posts moves into plugins/guardrails/lib/github-post/github-post-body.sh. That covers body words, --body-file/-F/stdin, here-strings, gh api fields and --input, curl data flags, and bash -c/eval operands. The first commit is the move alone, and the fix-request contract test passed unchanged on it.
  • New guard block-github-post-content.sh on the Bash|PowerShell row. It runs the existing pattern sets over the extracted bodies: lib/secret-detection/secret-patterns.sh and lib/path-detection/hardcoded-path-patterns.sh, both sourced, not copied.
    • A secret hit blocks and names the pattern class (for example GitHub PAT), never the value.
    • A machine-path hit blocks the way hardcoded-path-check's GitHub MCP lane does, with the same scan root. hpc_resolve_scan_root moves into the path library as hpp::resolve_scan_root so both use one copy.
    • The path scan reads body files, here-strings, here-doc bodies when the whole command counts toward the post, and the posting command's words with every file path it names removed. It never reads the whole command, so a wrapper script's path, the cwd, or a --body-file operand is not judged. A GitHub-hosted runner's home in a quoted CI log is not judged either.
    • Kill switch block_github_post_content_enabled. secret_pattern_detection_enabled and hardcoded_path_check_enabled also turn off their half.
  • Wrapper unwrap. The library reads the command after -- in a shell-script wrapper (bash gate.sh run|batch|call KEY [quiet] -- CMD [+++ CMD], ./x.sh ... -- CMD) as its own segment, split on bare +++. It also reads curl short flags written together (-sSd) and --expand-data. Both also widen block-fix-request-post.
    • The unwrap lives in the guardrails library, not in hook::bash_parse_segments. Basis: plugins/guardrails/hooks/hook-utils.sh is a generated copy of lib/hook-utils.sh, one of 21 copies listed in scripts/shared-copies.txt (line 441). A change there regenerates 20 plugins' copies, and sync-shared-copies.sh --check-bump then needs a fragment in each of them. That is too wide for one PR.
    • For the same reason, the shared helper lives in a guardrails lib file and not in hook-utils.sh.

Verification

Each suite was run alone in the worktree:

  • block-github-post-content.test.sh: PASS=60 FAIL=0. Each case runs alone and under run-guards.sh behind block-fix-request-post.
    • Deny cases: a bare gh pr comment --body with a runtime-built fake ghp_ token; the same post wrapped in gate.sh run; a gate.sh batch with the token in the second command; ./wrap.sh -- ...; --body-file; a heredoc to --body-file -; a $(cat <<EOF) body; gh api -f; curl -sSd and -d; bash -c; PowerShell. Three home-path deny cases.
    • Stay-quiet cases: a clean body; a gate.sh-wrapped clean post under a home-dir wrapper path; a home-dir --body-file operand; a home path in a here-doc that feeds another command; a hosted-runner path in a quoted CI log; a token in a grep, in an env prefix, in a gh api GET, and in a curl to another host.
    • Every case fails on origin/main, where the guard does not exist. The two review-fix stay-quiet cases and the -sSd deny case were reproduced against 3d41a32 by the review agent: rc=2, rc=2, rc=0.
  • block-fix-request-post.test.sh: PASS=304 FAIL=0, all existing cases plus two new wrapped deny cases (run -- and batch ... +++).
  • hardcoded-path-check.test.sh: PASS=162. run-guards.test.sh: PASS=714. coverage-manifest.test.sh: 32 checks passed. onfailure-rows.test.sh: PASS=3.
  • Passed: scripts/check-affected.sh (13 passed), check-killswitch-hoist, check-hook-slow-shapes, check-hooks-description, check-hook-userconfig-argv, check-test-tmp-cleanup, check-pipefail-grep-q. shellcheck reports nothing.
  • Ready-step review by a fresh-context security reviewer found no HIGH findings. Three MEDIUM findings are fixed in 47562e9: the unrelated here-doc false block, the curl joined-flags bypass, and the runner-path false block. The fourth MEDIUM (other publishing forms such as gh pr merge --body, gh release --notes and gh gist) and the LOW findings are listed as known gaps in the guard header.

Related

  • Changelog fragment: .changes/guardrails/fix-guardrails-bash-body-secret-scan-5b3e91c7.md (minor).

🤖 Generated with Claude Code

kyle-sexton and others added 5 commits November 1, 2026 14:23
…library

block-fix-request-post's parse of what a gh or curl command posts moves to
lib/github-post/github-post-body.sh unchanged, so a second guard can read
the same bodies. The fix-request contract test passes unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ne paths

block-github-post-content joins the Bash and PowerShell row. It reads what a
gh or curl command posts to GitHub through the shared github-post library
and runs the secret-pattern-detection and hardcoded-path-check pattern sets
over it. A secret block names the pattern class, never the value. The path
scan skips the whole command and every file path it names, so a wrapper
script's path or a --body-file operand is not judged.

The library now reads the command a script wrapper runs after `--`
(`bash gate.sh run KEY -- gh ...`, split on bare `+++`), which also closes
that route for block-fix-request-post. hpc_resolve_scan_root moves into the
path pattern library as hpp::resolve_scan_root so both guards share it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rl flags

From the ready-step review: a here-doc is judged only when the whole command
counts toward the post, so one that feeds another command stays quiet; a
GitHub-hosted runner's home in a quoted CI log is not a machine path; and
curl short flags written together (`-sSd`) and `--expand-data` are read as
data flags. The guard header lists the remaining gaps.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 1, 2026 20:54
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T20:55:51.283264Z 47562e9 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 47562e9df7

ℹ️ 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".

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 2cb62f3df64d235c45eb1b8b2710117e1b358edf: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Security review (incremental, abdb7ed → 2cb62f3): no findings

I read every hunk of .claude-lane/incremental.diff for both files in scope: block-github-post-content.sh and its test. For context I also read the hook's secret scan and path scan (L144-204). Neither file matches a TRUSTED PATHS glob.

What changed. The path scan no longer removes a $(cat <f>), $(<f>), $(< f) or `cat f` operand from inside a body word. It now drops a word only when the whole word is one of those four forms (L175-184).

Checked, no finding

  • Fail-safe direction. The new rule drops less text than the old one, because a longer word is now read whole. The old substring removal could hide a home path when a single-quoted body posts $(cat /home/…) as literal text. The new deny case "single-quoted $(cat home path) posted as written" covers that case. Nothing that was scanned before is skipped now.
  • Scope of the drop. It still matches only paths in GHPOST_FILES, which come from the posting segment. The file's own text is still scanned as a file body.
  • Secret scan unaffected. The secret scan at L144-156 reads GHPOST_BODY unchanged.
  • Pattern quoting. _bgpc_f sits inside double quotes in each case pattern, so a path that contains glob characters is matched literally.
  • Tests. One deny case was added; nothing was removed or weakened.

Prior findings: none are open. The one earlier inline finding (-H header skip, discussion_r4437536617) was fixed at abdb7ed and is settled.
Settled threads: the thread on L169-187 asked for the $(cat) operand to be dropped. This increment narrows that drop to whole words and keeps the stay-quiet case for --body "$(cat …)". No new problem there.
Instruction surface: no instruction or block list is removed or narrowed. The hook now blocks in more cases, not fewer.
Manifest: no manifest changed in this increment.
Spend: none.
Embedded text: none in the PR context, settled-threads or prior-findings files.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on 47562e9df7c89113af77d3995b3588175c055cfa; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 2cb62f3df64d235c45eb1b8b2710117e1b358edf: read 2 of 2 changed file(s); 1 finding(s), 0 as inline comments.

Code review: PR #12093, incremental since abdb7ed

This review covers only what changed since abdb7ed. I read every hunk of both changed files in .claude-lane/incremental.diff: block-github-post-content.sh and its test file. I used the full diff and the head file for context.

My last inline finding is fixed (discussion_r4437572730).

  • The substring cuts of $(cat <f>), $(<f>), $(< f) and `cat f` are gone. Each form is now a whole-word case pattern at L178, so a longer body word is read whole.
  • gh pr comment 12 --body 'To repost: … "$(cat /home/alice/…)"' is now blocked again, and the new deny test at block-github-post-content.test.sh:118 covers it.
  • The plain --body "$(cat <home path>)" still passes, through the existing quiet test.
  • The code and its comments agree again: the header at L24-29 lists the whole-word $(cat <path>) drop, and L167-169 still says no text is cut out of a body word.

Findings

  1. The plugin description is still out of date. I'm restating it because a finding with no line anchor is restated each round, and a manifest flag still counts past the round cap. This PR adds a seventeenth guard (block_github_post_content_enabled), but plugins/guardrails/.claude-plugin/plugin.json#L3 still begins "Sixteen toggleable guards". plugin.json hasn't changed since abdb7ed.

Manifest

  • manifest description: flag, it still says "Sixteen toggleable guards" (finding 1).
  • The other manifest items haven't changed since earlier reviews, which passed them.

Notes

  • The round cap applied. The prior-findings file says past the cap: yes (3 rounds with findings, cap 3), so I posted only blocking findings and manifest flags. I dropped one advisory point, uncounted:
    • When a body word is only a single-quoted literal '$(cat /home/…/x)', the word still matches the whole-word drop, and GitHub posts it as written.
    • That's a narrow case, and the file's own text is still judged.
  • This lane has no shell. I did not run the test suites, and the pass counts in the PR body and the owner's replies are the author's claims, which I have not checked.
  • The PR closes no issue. I found no embedded instructions in the PR context, settled-threads or prior-findings files.
  • The settled -H threads (lines changed: no) stay settled.
  • Spend: only local hook compute.

kyle-sexton and others added 7 commits November 1, 2026 16:06
A bug report that names `<drive>:\repos\<repo>` names no user, and earlier
PR bodies cite one routinely, so block-github-post-content no longer blocks
on the Windows repo-path blocks. User homes and this session's own checkout
root still block. A stay-quiet case pins it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Lane-Activity: pr-unblock/resolve-conflicts
Resolves the guardrails README guard table: #12014's fix-request row, then
the block-github-post-content row.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
From the review threads on #12093: a curl `-H 'Authorization: ...'` value is
transport, not posted content, so it no longer counts as a body word. The
path scan now drops only a word that names one of the posting command's own
body files (`<path>`, `--flag=<path>`, `@<path>`, `k=@<path>`), where it
cut every `cat` or body-file name out of the body and title text, which let
a home path through.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on 9fb9effc5b5b9c6d3969bbb1af0ddd278cb88559; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-security-review: 1 inline finding(s) on 9fb9effc5b5b9c6d3969bbb1af0ddd278cb88559; the summary is in this lane's pull request comment.

claude-lane: claude-security-review

…nd shape

From the second round of review threads on #12093: the header skip applies
only to curl and `gh api` and only to a separate `-H <value>` or
`--header=<value>`, so a body that starts with `-H` is read again. The path
scan drops each operand shape the library records a body file from (joined
`-F<path>` and `-d@<path>`, curl `k=@<path>;type=`, `k=<<path>`,
`name@<path>`) and cuts a quoted `$(cat <path>)` out of a body word, so a
clean home-dir body file no longer blocks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on abdb7ed277b737a61fa0f33457dad308d31fcf71; the summary is in this lane's pull request comment.

claude-lane: claude-review

… word

From a review thread on #12093: cutting `$(cat <path>)` out of a longer body
word let a single-quoted, posted-as-written home path through. The path scan
now drops the word only when it is exactly `$(cat <path>)`, `$(<path>)` or
a backtick `cat`, and reads any longer word whole.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 1, 2026
Merged via the queue into main with commit 4676c09 Nov 1, 2026
49 checks passed
@kyle-sexton
kyle-sexton deleted the fix/guardrails-bash-body-secret-scan branch November 1, 2026 23:10
github-merge-queue Bot pushed a commit that referenced this pull request Nov 14, 2026
…ine paths under Bash (#16066)

Refs: #15979

## Summary

`block-github-post-content` refused `gh pr|issue create|comment|edit ...
--attach <local path>` when the attached file sat under a home directory
or the session's project root. It reported the source path as a machine
path that "would be posted". gh posts only the alt text or the file
name. Local gh 2.103.3, `gh issue create --help` and `gh pr comment
--help`: "Alt text for an image follows the path after `#`, as in
`--attach './login.png#The login error state'`. Without it the filename
is used." `gh pr review --help` lists no `--attach` flag.

This change exempts the source path under the Bash tool only. Under the
PowerShell tool every `--attach` operand is still judged whole, exactly
as on main. See Remaining.

## Fix

- `plugins/guardrails/lib/github-post/github-post-body.sh`: under the
Bash tool, a literal `--attach` operand of a `gh pr|issue` segment goes
to a new list, `GHPOST_ATTACH`, and comes out of `ghpost::bodies` as a
new body kind, `attach`, in both the whole-command and the word
branches. It stays in `GHPOST_BODY`, so the secret pass and
`block-fix-request-post` still read the whole operand.
  - "Literal" means no `$`, backtick, `{` or glob character (`*?[`).
- Neither form is captured when the word before `--attach` is a dash
flag without `=`. pflag takes the next word as a flag's value even when
it starts with `-`, so `--body --attach=<home>/x.png` posts
`--attach=<home>/x.png` as the body.
- A joined `--attach=<v>` is also captured only when the word before it
is itself literal. A word that vanishes or splits at run time (an empty
variable, `$IFS`, a brace, an empty `"$@"`, backtick or `$( )`) can
leave a value-taking flag right before the joined word, which then posts
it.
- The spaced form needs no check on the word before it. If a vanished
word leaves a flag right before `--attach`, that flag takes `--attach`
as its value, and the operand becomes a positional argument, which gh
refuses (`gh pr comment [<number> | <url> | <branch>]` takes one) or
reads as the selector, posting it neither way.
- Under the PowerShell tool nothing is captured, and every word is
judged whole as on main. Microsoft's
[about_Parsing](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_parsing)
documents several passing modes for native commands: "The valid values
are `Legacy`, `Standard`, and `Windows`." It also says "PowerShell 7.3
changed the way the command line is parsed for native commands" and "The
new behavior is a **breaking change** from the Windows PowerShell 5.1
behavior." Which exact words gh receives in each mode for the shapes the
reviews found is UNVERIFIED by a real PowerShell run.
- The pending-`--attach` state is a `local` of `ghpost::segment`, so it
never carries into the next segment.
- `plugins/guardrails/hooks/block-github-post-content.sh`: the path pass
judges an `attach` text as the text after its first `#` plus its base
name, split on `/`. The headers are updated: MACHINE PATHS, and the
fail-closed exceptions.
- `plugins/guardrails/README.md` row 99 describes the Bash-only
exemption and the PowerShell whole-word judgment.
- `.changes/guardrails/fix-guardrails-attach-paths-15979-719889a2.md`:
`bump: patch`, `### Fixed`. `plugin.json` is unchanged.

Where this differs from the issue's Plan:

1. The previous-word rule has two parts.
- No capture after a dash flag without `=`. Disabling it fails 4 deny
cases (`--body '--attach=...'`, `--body --attach=...`, `-b
--attach=...`, `--title --attach=...`).
- A joined operand is captured only after a literal word. Without that,
6 Bash deny cases exited 0: an empty variable, an `$IFS` split, a brace
expansion, an empty `"$@"`, an empty backtick substitution and an empty
`$( )`.
2. Both the text after the first `#` and the base name are judged. The
Plan judged only the alt text when a `#` was present. With a `#` after
the last `/`, the default alt text holds text from before the `#`.
3. The base name splits on `/` only. On Linux gh's base name of a
backslash `<win home>\x.png` is the whole string, and gh posts it as the
default alt text.
4. Glob characters count as non-literal.
5. No exemption under the PowerShell tool. The Plan exempted PowerShell
operands too.

Remaining false positives, all failing closed:

- every `--attach` operand under the PowerShell tool;
- under Bash, an operand that follows a bool flag (`--draft --attach
X`);
- under Bash, an operand holding a glob character, `$`, a backtick or
`{`;
- under Bash, a joined `--attach=<v>` after a non-literal word (the
spaced form after `"$X"` passes);
- a Windows Git Bash backslash operand;
- a body reference to the attached file's absolute path.

## Verification

The branch is based on origin/main `709e2b319f`. Every line the issue
cites at `999cb91c1b` still matched.

Run with `env --chdir=<worktree> scripts/run-test-file.sh <file>` on
Linux (WSL2), bash 5:

- `plugins/guardrails/hooks/block-github-post-content.test.sh`: PASS=186
FAIL=0 on the branch head.
- On the first test-only commit (hook equal to main) it gave PASS=127
FAIL=15. Every failure was a `quiet: attach ...` case or `deny: attach
adjacent alt home path`.
  - Each later round's new deny cases were red before their code change:
    - 16 failures for the vanishing-word cases;
    - 8 for the PowerShell double-quote cases;
- 12 for the 6 `deny: PowerShell attach judged whole: ...` cases, run
against the previous head's code.
- The scan-root `quiet` cases (project root under `/tmp`) were red on
main, which proves `CLAUDE_PROJECT_DIR` reaches the hook.
- Mutation checks on Bash code:
  - Disabling the dash-flag rule fails 4 deny cases.
- Making every operand literal fails the brace and `$IFS` deny cases
(run on an earlier head; the array case is PowerShell and now refuses
because PowerShell is judged whole, not because of the literal check).
- Dropping the backtick from the literal check fails the
backtick-substitution case.
- `plugins/guardrails/hooks/block-fix-request-post.test.sh`: PASS=316
FAIL=0 on the branch and on a `git archive` extract of main in the same
checkout. The hook and its test are unchanged.
- `shellcheck -x` is clean on the three shell files. `typos` is clean on
all changed files.
- `scripts/check-changelog-fragments.sh --check` and `--check-required
origin/main` pass.

Before/after measurement: the issue's Baseline script, with its scratch
kept in the output directory. It was run on main (extract) and on the
branch head in one session on the same host (Linux, hyperfine 1.21.0, 5
runs, medians in ms):

| Arm | main exit | main median | main max | branch exit | branch median
| main launches | branch launches |
|---|---|---|---|---|---|---|---|
| a1 direct | 2 | 45 | 46 | 0 | 26 | 21 (15 grep, 4 head, 1 jq, 1 tr) |
10 (9 grep, 1 jq) |
| c0 direct | 0 | 19 | 19 | 0 | 19 | 5 | 5 |
| a1 dispatched | 2 | 47 | 48 | 0 | 30 | - | - |
| c0 dispatched | 0 | 21 | 22 | 0 | 21 | - | - |
| r1 direct, scan root | 2 | 49 | 50 | 0 | 24 | 25 (1 git, 15 grep, 7
head, 1 jq, 1 tr) | 8 (1 git, 6 grep, 1 jq) |

On this host main's r1 count is 25, where the issue's Windows count is
24. The Windows wall-time numbers in the issue were not rerun.

Runner portability:

- Counts: met (a1 10 ≤ 21, r1 8 ≤ 24, c0 5 = 5).
- Wall time on the same host: met. Every branch median is at most main's
slowest run of the same arm.
- Missing tool: not applicable, since hyperfine 1.21.0 was present.
- Windows-only symptoms: no timing claim is made. The PowerShell-tool
deny cases pin the PowerShell behavior.

Done-when status for the final code:

- AC1, AC2, AC3, AC4: met (Bash).
- AC5: met (Bash spaced and adjacent alt text, project root in the alt
text).
- AC6: met.
- AC7: met.
- AC8: partly met.
  - `--body "$X" --attach <home>/x.png` exits 0 under Bash.
  - The PowerShell operand with a home path after `#` exits 2.
- The PowerShell single-quoted `<win home>\...\x.png` operand exits 2,
not 0; it is pinned as a deny case.
- AC9: met (316/316 on both).
- AC10: met. Each round's new cases were red first, and the head exits
0. The PowerShell quiet cases the issue named were turned into deny
cases.
- AC11: met (library header, guard header, README row 99).
- AC12: met. `bash scripts/check-changelog-fragments.sh` with no
argument exits 2 with a usage line, so it was run as `--check` and
`--check-required origin/main`; both pass.
- AC13: met (c0 total=5; a1 10 ≤ 21; r1 8 ≤ 24).
- AC14, AC15: met.
- AC16: partly met. The Baseline rerun and launch counts are done. The
`/code-metrics` complexity, `/code-metrics:audit-duplication` and
`/simplify` passes were not run.
- AC17: not met. `/review:quality-gate` code and security modes were not
run. Three independent review rounds ran on earlier heads; their
findings are addressed and tested, but no quality-gate report exists.

## Remaining

- The PowerShell half of AC8 (a single-quoted `<win home>` operand exits
0), and with it the issue's PowerShell evidence cases p2 and p2a, are
not delivered. Under the PowerShell tool an `--attach` operand is still
judged whole, as on main. Three review rounds each found a PowerShell
shape that would post a home path. The classes were:
  - a word that vanishes or is dropped;
- quote characters that PowerShell's native argument passing does not
escape;
  - the stop-parsing token with an environment-variable expansion;
  - a trailing backslash.

The guard's tokenizer cannot model PowerShell's passing reliably, so the
exemption was withdrawn there.
- AC16's metrics, duplication and `/simplify` passes, and AC17's quality
gate, were not run.

## Related

- #12093 introduced the Bash-posted body scan this narrows.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

session: GitHub Support

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant