| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
security-guidance: bump version to 2.0.14
|
|
security-guidance: do not review a commit twice while its first review is running
|
|
security-guidance: log each review's token use and estimated cost
|
|
anthropics/mhegazy/sg-launcher-unreadable-plugin-dir
security-guidance: never run a hook with a Python that cannot read it
|
|
The plugin computed a review's usage but kept it only in its metrics.
Each review now writes one line to the plugin's debug log with the kind
of review, the Claude Code session, model, tokens and estimated cost.
|
|
running
A commit review records its commits only once it has a verdict. A push
(or the next commit's reflog scan) that started before then reviewed the
same diff again. A running review now holds a lock file per commit in the
git dir; a push review waits for it and skips what it recorded, and the
reflog scan leaves those commits to it.
|
|
mhegazy/sg-launcher-unreadable-plugin-dir
# Conflicts:
# plugins/security-guidance/hooks/security_reminder_hook.py
|
|
security-guidance: start fewer processes in the hook launcher
|
|
Two count-only metrics, emitted only when nonzero, so the launcher change
can be checked in the field:
- launcher_fallback: the hook ran, but only because the launcher started
the interpreter by its real path (the names on PATH could not read the
plugin files). Added to the hook's and the SessionStart bootstrap's
existing metrics.
- launcher_unreadable: no interpreter could read the hook script. No
Python runs in that case, so the launcher prints the metrics line
itself before exiting 1.
|
|
sg-python.sh runs on every hook, and under Git Bash each command
substitution is a new Windows process, whether or not the interpreter it
probes exists (#6470). On a machine with only `python` it started 13
processes before the hook; it now starts 1.
- Skip interpreter names that are not on PATH (a builtin lookup) before
probing them.
- The probe execs the interpreter in its subshell instead of forking
again from it.
- Remember the first Python below 3.10 seen in pass 2 instead of probing
the same names a second time in pass 3.
- Convert drive paths (/c/Users/...) to Windows form in-shell under Git
Bash / MSYS2; mount points and Cygwin still go through cygpath.
Interpreter order and the choice made are unchanged.
|
|
On Windows, python/python3/py can be packaged launcher aliases (Microsoft
Store Python, Python Install Manager). Started through the alias, the
interpreter answers `-c` but has a different view of %APPDATA% and cannot
see a plugin staged there. sg-python.sh picked it, CPython failed with
"can't open file ... [Errno 2]" and exit code 2, and exit 2 from the
asyncRewake Stop hook was delivered to the model as review findings. The
model's reply ran the Stop hook again, so the session looped without ever
reviewing anything (#6251, #5781).
The launcher's probe now also checks that the interpreter can read the
hook script. When no name on PATH qualifies, it tries the other
python3/python entries on PATH by full path and the real executable each
alias reports. If nothing can read the script it says so and exits 1, so
a launch failure is never reported as findings.
|
|
security-guidance: report commit reviewer context in review telemetry
|
|
# Conflicts:
# plugins/security-guidance/hooks/security_reminder_hook.py
|
|
security-guidance: give the commit reviewer only read tools
|
|
security-guidance: read diffs the same whatever the user's prefix settings
|
|
security-guidance: keep the session state when a save is cut short
|
|
security-guidance: skip the untracked-file listing when the Stop review is off
|
|
security-guidance: find user-level policy files under CLAUDE_CONFIG_DIR
|
|
security-guidance: leave Claude Code only fields out of hook output on other hosts
|
|
security-guidance: start fewer hook processes per Bash call
|
|
security-guidance: print one JSON document from the SessionStart hook on other hosts
|
|
mhegazy/sg-skip-untracked-listing
|
|
|
|
|
|
|
|
Count-only keys on agentic review rows: Read/Grep/Glob calls made, how
many came back as errors, and whether the reviewer's directory was
missing before or during the review. Appended last in the row so they
never displace an existing key.
|
|
mhegazy/sg-fewer-bash-hook-entries
|
|
security-guidance: recognize more git global options before commit and push
|
|
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
|
|
|
|
|
(#6541)
* security-guidance: stop re-reviewing untracked files past the snapshot cap
The untracked-file snapshot stops at 2,000 entries. Every pre-existing untracked file past the cap looked new on each turn, so the same files were reviewed again and again.
Record when a capped snapshot was taken and treat unlisted files older than that as pre-existing.
* security-guidance: test the metric that shows the capped-snapshot path
preexisting_untracked_excluded stays at the 2,000 cap before this fix and rises above it after, which is how the fix can be confirmed from metrics. No new key.
|
|
* security-guidance: keep secret-shaped files out of reviews
The Stop review covers every dirty file in the work tree, including ones the user changed and Claude never opened. Key files, credential files and encrypted dotfile sources were sent along with the code.
Skip files that are secret stores by naming convention: .env variants, SSH private keys, common credential files, and chezmoi private/encrypted sources.
* security-guidance: report how many secret-shaped files were skipped
The Stop hook now reports secret_shaped_skipped (a count, never names, only when nonzero) so the skip can be confirmed after release and watched for over-matching.
|