summaryrefslogtreecommitdiff
path: root/plugins
AgeCommit message (Collapse)Author
2026-11-05Merge pull request #6835 from anthropics/mhegazy/sg-secret-rename-pairingMohamed Hegazy
security-guidance: keep a renamed file paired with its old name in the Stop review
2026-11-05Merge pull request #6965 from anthropics/mhegazy/sg-agentic-stop-on-authMohamed Hegazy
security-guidance: stop the commit reviewer on refused credentials, end hung reviews in time
2026-11-05Merge pull request #6627 from anthropics/mhegazy/sg-review-sessions-not-savedMohamed Hegazy
security-guidance: do not save review runs as session transcripts
2026-11-05Merge pull request #6998 from anthropics/mhegazy/sg-count-unmatched-bash-startsMohamed Hegazy
security-guidance: count Bash hook starts that match no commit or push
2026-11-05Merge pull request #6922 from anthropics/mhegazy/sg-prompt-snapshotMohamed Hegazy
security-guidance: take the turn baseline without git stash create
2026-11-05Merge pull request #6919 from anthropics/mhegazy/sg-add-failure-fixMohamed Hegazy
security-guidance: keep new files in the Stop review when git add -N fails
2026-11-05Merge pull request #6930 from anthropics/fix/sg-blank-base-urlMohamed Hegazy
security-guidance: treat a blank ANTHROPIC_BASE_URL as unset
2026-11-05Merge pull request #6918 from anthropics/mhegazy/sg-launcher-alias-real-pathMohamed Hegazy
security-guidance: stop starting the packaged Python alias on every hook
2026-11-05Merge pull request #6999 from anthropics/mhegazy/sg-windows-cli-pathMohamed Hegazy
security-guidance: on Windows, name the CLI for the Agent SDK by its full path
2026-11-05Merge pull request #7001 from anthropics/mhegazy/sg-state-dir-owner-onlyMohamed Hegazy
security-guidance: keep the state folder to its user
2026-11-05Merge pull request #7002 from anthropics/mhegazy/sg-git-log-signature-offMohamed Hegazy
security-guidance: read git log output without signature checks
2026-11-05Merge pull request #7003 from anthropics/mhegazy/sg-project-config-filesMohamed Hegazy
security-guidance: read project config files only as real files
2026-11-05security-guidance: keep the native install in sessions started above the ↵mhegazy/sg-windows-cli-pathMohamed Hegazy
home folder Co-authored-by: mhegazy <mhegazy@anthropic.com>
2026-11-04security-guidance: make the git stand-in in the add failure tests work on ↵mhegazy/sg-add-failure-fixMohamed Hegazy
Windows Co-authored-by: mhegazy <mhegazy@anthropic.com>
2026-11-04security-guidance: name new files the Stop review could not seeMohamed Hegazy
When git add -N fails on both tries or times out, wake Claude once per set of files with their names, so the review no longer ends as "no changes". A timed-out add now keeps the tracked files' diff, so a timeout on every turn cannot stop their reviews. Private object directory cleanup no longer chmods through a link. Fixes #6996 Co-authored-by: mhegazy <mhegazy@anthropic.com>
2026-11-04security-guidance: run the empty-name test as off Windows on every systemMohamed Hegazy
Co-authored-by: mhegazy <mhegazy@anthropic.com>
2026-11-04security-guidance: end a commit or push review's single-shot review at the ↵mhegazy/sg-agentic-stop-on-authMohamed Hegazy
hook's time limit A single-shot review that follows a fast agentic failure, or runs with the agentic review off, had no deadline: with no answer it ran 739 s, past Claude Code's 600 s kill, so the session heard nothing. It now ends at 570 s into the hook with the usual notice. The limit counts from hook start, so a push review's wait and the work before the review count. Failed push rows keep inflight_wait_s, and CLAUDE_CODE_REMOTE is read the same way in both places. Co-authored-by: mhegazy <mhegazy@anthropic.com>
2026-11-04security-guidance: start git by its full path on Windowsmhegazy/sg-git-program-from-pathMohamed Hegazy
A bare program name on Windows is looked up in the working directory before PATH, and the hooks run in the project. Name the first git.exe on PATH, leaving out relative entries, the working directory and folders inside the project, as the claude lookup already avoids that search. Co-authored-by: mhegazy <mhegazy@anthropic.com>
2026-11-04security-guidance: keep the state folder to its usermhegazy/sg-state-dir-owner-onlyMohamed Hegazy
Create ~/.claude/security with mode 0700 from every place that makes it, and narrow the default folder on the next run, so a umask such as 002 does not leave the reviewer's venv group-writable. The in-place state write replaces a link instead of following it, and creates a 0600 file. Co-authored-by: mhegazy <mhegazy@anthropic.com>
2026-11-04security-guidance: read project config files only as real filesmhegazy/sg-project-config-filesMohamed Hegazy
A project guidance or pattern file that is a link, or sits under a .claude that is one, is skipped, and so is anything that is not a regular file. Guidance that cannot be decoded no longer drops the other guidance files, and a closing tag in guidance text no longer ends the block that holds it. Co-authored-by: mhegazy <mhegazy@anthropic.com>
2026-11-04security-guidance: run the shell pattern test with a working bashmhegazy/sg-count-unmatched-bash-startsClaude
On Windows the bash on PATH can be the WSL launcher. Use the bash shipped with git there, and skip when no bash answers.
2026-11-04security-guidance: on Windows, name the CLI for the Agent SDK by its full pathMohamed Hegazy
On Windows the plugin named no CLI for the Agent SDK unless SG_AGENTIC_CLI_PATH was set, so the SDK chose one. With none named, the plugin now chooses there itself and passes a full path: the CLI bundled with the SDK, else the claude.exe in the native installer's folder, else a claude.exe on PATH. When there is none, it passes the bundled path and the start fails. Folders that are not given as full paths are skipped, and so are the working directory, the project root and folders inside them. The macOS and Linux install paths are no longer probed on Windows. The hooks also set NoDefaultCurrentDirectoryInExePath on Windows when it is absent. Co-authored-by: mhegazy <mhegazy@anthropic.com>
2026-11-04security-guidance: read git log output without signature checksmhegazy/sg-git-log-signature-offMohamed Hegazy
With log.showSignature set, git log and git show verify every signed commit, which adds lines to the output the hooks parse and starts gpg.program. Set it off for the hooks' git and for the commit reviewer's environment. Co-authored-by: mhegazy <mhegazy@anthropic.com>
2026-11-04security-guidance: count Bash hook starts that match no commit or pushClaude
Measurement only. One Bash call in ten that starts the hook without a commit or push reports bash_no_match, and precheck_skip when a plain text check on the hook input could have told so before Python started. precheck_miss marks a reviewed command that such a check would have dropped. Nothing is skipped and no review changes.
2026-11-04security-guidance: count a push review's wait against the hook's time limitMohamed Hegazy
2026-10-31security-guidance: stop the commit reviewer on refused credentials, end hung ↵Mohamed Hegazy
reviews in time
2026-10-28security-guidance: treat a blank ANTHROPIC_BASE_URL as unsetfix/sg-blank-base-urlMohamed Hegazy
A set but empty value left the request URL as /v1/messages, so urllib raised and every Stop, push and single-shot commit review failed. The SDK and Claude Code read a blank value as the default endpoint; the plugin now does too.
2026-10-27security-guidance: take the turn baseline without git stash createmhegazy/sg-prompt-snapshotMohamed Hegazy
stash create checks the work tree on one thread. add -u into the throwaway index copy, write-tree and commit-tree produce the same commit and use git's index preload instead, which matters where each file status is slow. See #6854.
2026-10-27Merge branch 'main' into mhegazy/sg-review-sessions-not-savedmhegazy/sg-review-sessions-not-savedMohamed Hegazy
2026-10-27security-guidance: keep new files in the Stop review when git add -N failsMohamed Hegazy
Retry the add with a private object directory for users who cannot write the object store. Drop the pathspec settings git refuses alongside literal pathspecs, which hid new files since 2.0.16. When a failure stays and nothing is reviewed, keep the files for a later turn.
2026-10-27security-guidance: stop starting the packaged Python alias on every hookmhegazy/sg-launcher-alias-real-pathmhegazy
On Windows with the Python Install Manager, python, python3 and py are packaged aliases under ...\Microsoft\WindowsApps, and each start of one makes Windows run an App Installer update check for the package. The launcher started the chosen alias twice per hook (probe, then the hook), on every Edit, prompt and Stop. See anthropics/claude-code#98929. When the name that answers is such an alias and its interpreter is a regular python*.exe elsewhere, the launcher now checks that interpreter once (same version, reads the hook script when started by itself), runs the hook with it, and keeps its path in the state folder for a day. Later hooks start it directly: one process, none through the alias. The remembered path is used only while PATH and the hook folder are unchanged and the file is still there. A hook that fails on it empties the entry so the next hook searches again. Not used while VIRTUAL_ENV is set. Other systems, regular installs and Microsoft Store Python are unchanged. Hooks report launcher_direct (1 remembered, 2 just checked) as the last metric key on rows they already send.
2026-10-27Merge remote-tracking branch 'origin/main' into mhegazy/sg-secret-rename-pairingmhegazy/sg-secret-rename-pairingMohamed Hegazy
# Conflicts: # plugins/security-guidance/hooks/diffstate.py
2026-10-27Merge pull request #6906 from anthropics/add-plugin-versionsMohamed Hegazy
Give ten plugins explicit versions
2026-10-27Merge pull request #6905 from anthropics/port-code-review-from-claude-codeMohamed Hegazy
code-review: bring in the newer command from anthropics/claude-code
2026-10-26Merge pull request #6908 from anthropics/mhegazy/sg-bump-2.0.17Mohamed Hegazy
security-guidance: bump version to 2.0.17
2026-10-26Merge pull request #6875 from anthropics/mhegazy/sg-inflight-windows-lockMohamed Hegazy
security-guidance: hold in-flight review markers on native Windows too
2026-10-27security-guidance: bump version to 2.0.17mhegazy/sg-bump-2.0.17mhegazy
2026-10-26Merge remote-tracking branch 'origin/main' into HEADmhegazy/sg-inflight-windows-lockClaude
2026-10-26Merge remote-tracking branch 'origin/main' into HEADmhegazy/sg-reviewer-stage-metricsClaude
2026-10-26Merge pull request #6861 from anthropics/mhegazy/sg-add-fail-metricMohamed Hegazy
security-guidance: count failed git add -N calls in the Stop review
2026-10-26Merge pull request #6839 from anthropics/mhegazy/sg-network-failure-classMohamed Hegazy
security-guidance: report why a review call got no HTTP response
2026-10-26Merge pull request #6836 from anthropics/mhegazy/sg-diff-seen-countMohamed Hegazy
security-guidance: count reviews of a diff that was already reviewed
2026-10-26code-review: add version 1.0.1port-code-review-from-claude-codeClaude
Without a version, every commit to this repository counts as a new version of the plugin. 1.0.1 sits above the old copy's 1.0.0, so existing installs of that copy update to this one. Co-authored-by: mhegazy <mhegazy@anthropic.com>
2026-10-26Give ten plugins explicit versionsadd-plugin-versionsClaude
Without a version, every commit to this repository counts as a new version of a plugin, so users get no-op updates. Each version sits above the one in the old anthropics/claude-code copy, so existing installs of that copy update to this one. From now on, a change to these plugins reaches existing installs only when its version is bumped. Co-authored-by: mhegazy <mhegazy@anthropic.com>
2026-10-26code-review: bring in the newer command from anthropics/claude-codeClaude
This copy was behind the one in anthropics/claude-code, which adds inline review comments, a --comment flag and dedicated bug-finding agents. Reviews now print to the terminal unless --comment is passed. Co-authored-by: mhegazy <mhegazy@anthropic.com>
2026-10-26security-guidance: report how many turns and how much model time a commit ↵Mohamed Hegazy
review took review_ms says how long an agentic commit review took but not why. Add one count-only key, rv_effort, on rows where the agentic reviewer ran: the turns it took and the time it spent waiting on the model, summed over all stages and packed as turns * 10,000,000 + model ms. It is emitted after every other key, so it never displaces one at the metric key cap. No behaviour change.
2026-10-23security-guidance: hold in-flight review markers on native Windows tooMohamed Hegazy
A commit or push review marks the commits it is reviewing by holding a lock on .git/sg-inflight-<sha>, so a push made meanwhile waits for that review instead of reviewing the same commit again. The lock was flock only. Native Windows Python has no fcntl, so there were no markers there and a push right after a commit still ran a second full review. On Windows the same shared/exclusive, never-waiting lock is now taken with LockFileEx, on a byte far past the end of the empty marker so that reading or copying the file is never refused. Windows will not delete an open file, so a marker is closed before it is deleted there, with a short retry while another review has it open; what cannot be deleted is left unlocked and swept once old, as before. Also: one marker that cannot be opened, or whose last holder deletes it between this review's open and lock, no longer costs the review its claim on the remaining commits. The in-flight tests no longer require fcntl, so they run on Windows.
2026-10-23security-guidance: count failed git add -N calls in the Stop reviewmhegazy/sg-add-fail-metricMohamed Hegazy
A failed add leaves new files out of the diff with no sign of it. Measure only; behaviour is unchanged.
2026-10-22security-guidance: report where a slow prompt's time goesmhegazy/sg-prompt-capture-timeMohamed Hegazy
Prompts that wait a second or more in the UserPromptSubmit hook send one metrics row: total, baseline and untracked listing time, index size, and whether the repository is on a Windows drive under WSL. Measures only; capture is unchanged. See #6854.
2026-10-22security-guidance: stand-in CLI in the session transcript tests logs as UTF-8Mohamed Hegazy
The commit reviewer's system prompt has a character the Windows default encoding cannot write, so on Windows the stand-in failed before logging the review launch and three tests saw no launch.