Repository navigation
Merged
Conversation
…Bash grant allowlist `_UNSCOPED_COMMANDS` in check_release_tree.py now lists `command`, `nice` and `stdbuf` alongside the existing wrapper commands (#879), and the `..` path-escape check splits on both forward and backslash separators instead of forward slash only. docs/releasing.md's wrapper-command coverage note is corrected to match current coverage rather than claiming it is "not yet" handled. Co-Authored-By: Claude Sonnet 5 <[email protected]>
…oblem
Review (oss:auditor) caught that `paths = [w for w in words if "/" in w]`
still only collected a word as "a path" when it contained a forward
slash, so a grant whose path was entirely backslash-separated (e.g.
`${CLAUDE_PLUGIN_ROOT}\..\..\bin\bash`) skipped the whole per-path loop --
including the just-widened `..` check -- and fell through to `None`.
Widen the membership test to `"/" in w or "\\" in w`, and add the missing
test case.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #950.
check_release_tree.py's bash_grant_problem (the check behind a release-gate Bash-grant audit) missed four unsafe shapes: the command builtin, nice, stdbuf, and a backslash-separated .. path escape -- all four returned None (not flagged) before this fix.
What changed
Tests
Reproduced all cases directly against the module before editing (red: all returned None). After the fix: pytest tests/test_release_branch_preflight_851.py -q -> 220 passed, 1 skipped (pre-existing, unrelated skip). No full-suite run locally; CI is this repo full-suite gate.
Closes #950.
[AI-generated]