fix(claude-config): add scan denominator to permission-rule-check - #2409
fix(claude-config): add scan denominator to permission-rule-check#2409kyle-sexton wants to merge 1 commit into
Conversation
…an bill Fixes #2283 (row A5). Clean output now states how many frontmatter files and allow rules were scanned; finding runs emit the same counts on stderr. Tests: permission-rule-check.test.sh (91 checks). Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
|
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 54s —— View job Security Review
No security issues found. This PR only adds scan counters (
Nothing further to report. |
|
Claude finished @kyle-sexton's task in 2m 26s —— View job Reviewing PR #2409
SummaryThis is a small, well-scoped fix: Static review of the diff (
Two minor, non-blocking maintainability nits posted as inline comments:
Verification note: the PR body's "91 checks passed" test-run result is author-claimed; my sandboxed environment here didn't have approval to execute No correctness bugs or security concerns found in the scan-counting logic itself. |
| @@ -306,12 +306,24 @@ assert_eq "relocated config root produces exactly one finding" "1" \ | |||
| "$(run_with_config_dir "$D8C" "$RELOCATED" "$FAKE_HOME" --count)" | |||
|
|
|||
| # --- Case 8e: an unresolvable user scope is announced, never silently skipped -- | |||
There was a problem hiding this comment.
This PR drops the three-line comment that used to sit above Case 8e explaining why the test exists ("A silent skip would let \"No fragile permission grants found.\" rest on a scope that was never opened."). That's understandable since the quoted string is now stale (the clean-bill line carries a denominator suffix), but deleting the rationale entirely rather than updating the quoted string loses context for future readers about why this case matters. Consider re-adding a version of the comment with the quote refreshed (or paraphrased) instead of removing it outright.
Not a functional issue — flagging for maintainability only.
| | warning | Interpreter/runner-led grant whose broad forms auto mode drops, or an inert self-grant (P1, P3) | | ||
|
|
||
| A clean scan ("No fragile permission grants found.") is a valid outcome — report it as such. | ||
| A clean scan (the detector's "No fragile permission grants found …" line, which now includes |
There was a problem hiding this comment.
This summary says the clean-bill line "now includes how many frontmatter files and allow rules were scanned," but the actual detector message (permission-rule-check.sh:350) also reports a third quantity — the number of settings files scanned (... across %d settings file(s).). Worth naming all three here so this doc stays a complete description of what the line reports.
|
Claude has reviewed this PR 1 time. The lane skips further automatic reviews after 5; deleting this comment resets the count. |
Fixes #2283 (row A5).
The detector's clean-bill line now reports how many frontmatter files with
allowed-toolsand how manypermissions.allowrules across how many settings files were scanned, so a zero-finding run after scanning nothing is distinguishable from a zero-finding run after a real scan.Verification
permission-rule-check.test.sh: 91 checks passedRelated