fix: symlink traversal, staged-content bypass, notifier test coverage#4
Closed
bokiko wants to merge 6 commits into
Closed
fix: symlink traversal, staged-content bypass, notifier test coverage#4bokiko wants to merge 6 commits into
bokiko wants to merge 6 commits into
Conversation
…can_staged, and notifier test coverage - SEC-001: scan_directory now skips symlinks and verifies files resolve within repo root - BUG-001: _scan_staged reads staged index content via `git show :<path>` instead of working tree files - TEST-001: add tests/test_notifier.py with 14 tests covering send_email, create_github_issue, and notify() Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Owner
Author
|
Closing: conflicts with PR #3 (now merged). The symlink traversal and staged-content bypass fixes from this PR should be re-evaluated on the updated main branch via a fresh |
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
scan_directorynow explicitly skips symlinks and verifies each file resolves within the repo root — prevents reading files outside the repo via symlinks (e.g./etc/passwd,~/.ssh/)_scan_stagednow reads staged content viagit show :<path>instead of the working-tree copy — closes the bypass where staging a secret then editing it away caused the pre-commit hook to approve the committests/test_notifier.py(14 tests) coveringsend_email,create_github_issue, andnotify()— including dry-run, missing credentials, 403/404 handling, deduplication, and DB markingTest plan
pytest tests/test_engine.py— all existing engine tests still passpytest tests/test_notifier.py— all 14 new notifier tests passpytest— full suite (143 tests) passes🤖 Generated with Claude Code