fix(cli): scope review to staged hunks - #8
Merged
Conversation
Agent: vespasian
Contributor
Author
|
[REVIEW] GO — #8 @ 6e47c04 — lens: correctness+security+gates, reviewer Aruns (1 of 1) Reviewed the exact candidate against freshly fetched base What I read:
Commands and exact results:
Blocking P0/P1 findings: none. The reviewed path reads NUL-delimited staged names, snapshots index blobs rather than unstaged working-tree content, invokes Git without a shell, rejects absolute/parent-escaping snapshot paths, filters findings to added hunk lines, and fails closed when Git or scanning fails. The regression tests exercise added-vs-unchanged vulnerable lines, equal coverage for staged test/source files, and staged-index content after later unstaged edits. Non-blocking follow-ups: none. |
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.
Summary
Regression coverage
.test.tsand.tsgit addcannot affect the staged review resultVerification
bun test src/cli/commands/review.test.ts src/scanners/code.test.ts src/scanners/secrets.test.ts --parallel=1: 97 pass, 0 failbun test --parallel=1 --timeout 30000: 436 pass, 0 failbun run test: 435 pass, 1 unchanged five-second timeout under station load above 50bun run typecheck: passbun run check:secrets: 0 violationsgit diff --check origin/main...HEAD: passTodos: SHI-00001 (
d0bb42cb-27a2-42f0-96e4-afcc59f3147e)Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.