Repository navigation
review_checks: fail closed on scanner output, guard dash filenames, batch semgrep - #1978
Merged
Merged
Conversation
…atch semgrep Scanner JSON that is missing, empty, malformed or the wrong shape now produces a "not run" line instead of reading as zero findings, a semgrep `errors` array is reported as a partial scan, and crash exit codes from gitleaks, osv-scanner, semgrep, shellcheck, ruff, pyflakes, tsc and go vet are surfaced rather than swallowed (findings codes such as shellcheck 1 or osv-scanner 1 are not crashes). Changed files reach the linters, gitleaks and osv-scanner as ./path so a leading-dash name is never parsed as an option, the gitleaks report is cleared before every run, and semgrep runs once per 200 changed files after `--` instead of once per file. SKILL.md routes the whole-app security reference lazily. Tests: 32/32 (19 in test-review-checks-security-folds.sh, 13 existing) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014QNFFPWVcPUbeuvwM5fk2Z
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.
Supersedes #1975, rebuilt as one squashed commit. Same change, plus the fix for the failed size-ratchet check: the SKILL.md line is shorter (+9 bytes) and has a
size-budget-raiseline inchangelog.d/security-folds.md.Local CI repro on this commit: size-ratchet ok, mustload ok, all
scripts/ci-tests.dpass.test-ci-gates.shshows 293 passed and 9 failed; the 9 are the known sandbox-only failures (dcr-gates opt-in, peer pains, reap_own pgrep, tracker socket bind).Hardens the whole-app security scan (
review_checks.sh, from #1970) so that a scanner that crashed, timed out or returned malformed output can no longer read as a clean result.not run: <tool>line instead of zero findings.errorsarray are surfaced as a partial-scan line next to the findings. Files go to semgrep in chunks of 200 per call, each with its own timeout and--../nameor after--, so a tool cannot read them as options.Tests: 32/32 (19 new in scripts/test-review-checks-security-folds.sh plus 13 existing). 13 of the 19 new checks fail on the pre-change script, run through the
REVIEW_CHECKSoverride. The other 6 check that the new code does not over-block. Independent review found no blocking issues and 6 warnings; all 6 are fixed here.🤖 Generated with Claude Code
https://claude.ai/code/session_014QNFFPWVcPUbeuvwM5fk2Z