summaryrefslogtreecommitdiff
path: root/plugins
AgeCommit message (Collapse)Author
39 hoursfeat(theme-examples): add sound to Koi Pond and Falling Sand (#7191)HEADmainChaoshuai Lyu
Squash merge of 1 commit
44 hoursMerge pull request #7143 from anthropics/mhegazy/sg-bump-2021Mohamed Hegazy
security-guidance: bump version to 2.0.21
44 hoursMerge pull request #7176 from anthropics/mhegazy/sg-pyenv-win-probeMohamed Hegazy
security-guidance: keep the interpreter check working through a .bat shim
44 hoursMerge pull request #7177 from anthropics/mhegazy/sg-other-repo-settingsMohamed Hegazy
security-guidance: skip other repositories whose settings change what git runs
46 hoursfeat(theme-examples): add nine interactive shader scenes (#7189)Chaoshuai Lyu
Squash merge of 3 commits
3 dayscode-modernization: look up whether target versions are supported (#7170)claude[bot]
Squash merge of 1 commit
3 daysfix(theme-examples): shorten the /custom-theme description (#7152)Keeley Hammond
Squash merge of 1 commit
3 dayssecurity-guidance: skip other repositories whose settings change what git runsmhegazy/sg-other-repo-settingsClaude
The hooks run git in the session's repository and in those the session moves to. A repository other than the session's own is now skipped when its own config has settings that change what git runs. An index copy made in another repository holds only the entries for files. Co-authored-by: mhegazy <mhegazy@anthropic.com>
3 dayssecurity-guidance: keep the interpreter check working through a .bat shimmhegazy/sg-pyenv-win-probeClaude
pyenv-win's python names end in a batch file. In its released version (3.1.1) cmd.exe read the ">=" in the check as a redirect: every hook left an empty "(3" file in the project, and the interpreter was rejected. With no other Python no hook ran. The check now uses only characters that arrive unchanged. On Windows a name that loses the argument counts as unable to read the hook script, so the launcher goes on to its real interpreter. See #7172. Co-authored-by: mhegazy <mhegazy@anthropic.com>
5 dayssecurity-guidance: let a killed holder's lock be released late in a testmhegazy/sg-commit-diff-memoryClaude
Windows can release a killed process's file lock a moment after the process ended, so the wait that follows may see it held once more. Co-authored-by: mhegazy <mhegazy@anthropic.com>
5 daysMerge remote-tracking branch 'origin/main' into mhegazy/sg-commit-diff-memoryClaude
Co-authored-by: mhegazy <mhegazy@anthropic.com> # Conflicts: # plugins/security-guidance/hooks/security_reminder_hook.py
5 daysMerge pull request #7108 from anthropics/mhegazy/sg-lead-review-keysMohamed Hegazy
security-guidance: keep a review's result and time on full metric rows
5 daysMerge pull request #7105 from anthropics/mhegazy/sg-renamed-into-codeMohamed Hegazy
security-guidance: review text files renamed to code names
5 daysMerge pull request #7102 from anthropics/mhegazy/sg-reviewer-no-proseMohamed Hegazy
security-guidance: tell the commit reviewer its text is not read
5 daysMerge pull request #7103 from anthropics/mhegazy/sg-chained-push-no-verdictMohamed Hegazy
security-guidance: review a commit-and-push again when the commit review gave no verdict
6 dayssecurity-guidance: bump version to 2.0.21mhegazy/sg-bump-2021Claude
Co-authored-by: mhegazy <mhegazy@anthropic.com>
6 dayssecurity-guidance: use the CA file macOS ships when Python has nonemhegazy/sg-macos-ca-fileClaude
A python.org Python on macOS has no CA certificates until its "Install Certificates" command is run, so every review from it failed to verify the API's certificate. Where Python's default TLS context holds no certificate at all, the plugin now adds /etc/ssl/cert.pem, the file Apple's own Python uses. Verification is unchanged. Co-authored-by: mhegazy <mhegazy@anthropic.com>
6 dayssecurity-guidance: read commit and push diffs without holding themClaude
The commit and push reviews captured, decoded and split the whole `git show -p` / `git diff` before looking at the number of files. An import of 5,800 files and 4.6 M lines took 6.4 GB, and the review was then skipped for its file count. Read git's output as it arrives and keep what the review uses: the characters of each file the prompt takes, a count of the added lines after them, and past the file cut-off only the file names. Co-authored-by: mhegazy <mhegazy@anthropic.com>
6 dayssecurity-guidance: keep severity counts on full metric rowsmhegazy/sg-lead-review-keysClaude
With findings, the critical and high counts could be cut from a full row. They now come with the result. commit_review_on and push_sweep_on, which are always true on a reviewed row, go last instead. Co-authored-by: mhegazy <mhegazy@anthropic.com>
6 daysMerge pull request #7107 from anthropics/mhegazy/sg-fewer-false-pattern-warningsMohamed Hegazy
security-guidance: fewer false edit warnings on ordinary JavaScript
6 daysMerge pull request #7106 from anthropics/mhegazy/sg-edit-hook-hangMohamed Hegazy
security-guidance: edit hook no longer waits on App Installer's python alias
6 daysMerge pull request #7104 from anthropics/mhegazy/sg-line-continuationMohamed Hegazy
security-guidance: match git commit and push continued on the next line
6 daysMerge pull request #7101 from anthropics/mhegazy/sg-brace-globsMohamed Hegazy
security-guidance: custom rule globs can use braces
6 dayssecurity-guidance: leave renamed key lists out of the reviewmhegazy/sg-renamed-into-codeClaude
A text file whose name or folder says it holds secrets (api_keys.txt, tokens.txt, secrets/prod.md) was read whole when it was renamed to a code name. It now stays out of the review, and so does a file that recent commits renamed from such a name. Co-authored-by: mhegazy <mhegazy@anthropic.com>
6 dayssecurity-guidance: wait for the original review on a message-only amend, and ↵mhegazy/sg-chained-push-no-verdictClaude
report a failure the push review did not A message-only amend made while the first review was running counted as reviewed at once. When that review then failed, a later push reviewed nothing. The amend now waits for that review. A failed commit review stayed quiet for the push review of its own command, which can itself end quietly (a cap, no network, killed). It now waits for the push review, and reports unless that one got a verdict or told of its own failure. Co-authored-by: mhegazy <mhegazy@anthropic.com>
9 dayssecurity-guidance: leave the output rule out when ↵mhegazy/sg-reviewer-no-proseMohamed Hegazy
ANTHROPIC_DEFAULT_OPUS_MODEL is set The reviewer then runs on the model that variable names, as it does with SG_AGENTIC_MODEL, so the rule is left out there too. The tests clear the variables the rule depends on in their shared fixture, check that the stages ran, and no longer look models up. Co-authored-by: mhegazy <mhegazy@anthropic.com>
9 daysAdd theme-examples: example backdrops for the Claude desktop app (#7116)Daisy S. Hollman
Squash merge of 1 commit
10 dayssecurity-guidance: fewer false edit warnings on ordinary JavaScriptmhegazy/sg-fewer-false-pattern-warningsClaude
Four edit rules matched their word without looking at what stands next to it: - eval: Playwright's and Puppeteer's page.$eval('selector', function) and $$eval got the eval() warning. They run the function they are given. Left out only when the selector is a plain string and the function is written out in the call. AngularJS scope.$eval(expr) and every other $eval( still warn. - new Function: the whole word is needed, so new FunctionRegistry() is quiet. - innerHTML and outerHTML: an assignment is needed, so == and === are quiet. Nothing warns that did not warn before. Co-authored-by: mhegazy <mhegazy@anthropic.com>
10 dayssecurity-guidance: review text files renamed to code namesClaude
git shows no content for a renamed file, so a text or document file renamed to a code name (notes.txt to payload.py) was never read by the commit and push reviews. They now read it whole, behind the files they already review and within a small share of the prompt. Other renames are reviewed as before. Part of #4852 Co-authored-by: mhegazy <mhegazy@anthropic.com>
10 dayssecurity-guidance: match git commit and push continued on the next linemhegazy/sg-line-continuationClaude
`git \` with `commit` or `push` on the next line started the hook, but the command patterns only allowed whitespace between the words, so nothing was reviewed. They now also allow a line continued with a backslash (Bash) or a backtick (PowerShell). Co-authored-by: mhegazy <mhegazy@anthropic.com>
10 dayssecurity-guidance: review a commit-and-push again when the commit review ↵Claude
gave no verdict When one command commits and pushes, the push review left the new commit to the commit review and ended at once. A commit review that then failed, was killed or skipped the commit left it pushed and unreviewed, and no later push covers it. The push review now waits for the commit review's process to end, and reviews the pushed range itself when there is no verdict. Both choose the commit through one helper, so they cannot pick differently. Co-authored-by: mhegazy <mhegazy@anthropic.com>
10 dayssecurity-guidance: keep a review's result and time on full metric rowsClaude
Only the first 20 keys of a hook's metrics are kept. Commit reviews with findings, and failed reviews that used tokens, often have more, so their time and sometimes their result were lost. The result, kind and time of a review now come first. Co-authored-by: mhegazy <mhegazy@anthropic.com>
10 daysMerge pull request #7094 from anthropics/mhegazy/sg-bump-2020Mohamed Hegazy
security-guidance: bump version to 2.0.20
10 daysMerge pull request #7093 from anthropics/mhegazy/sg-ordinary-checkoutsMohamed Hegazy
security-guidance: only run git in ordinary checkouts
10 dayssecurity-guidance: edit hook no longer waits on App Installer's python aliasmhegazy/sg-edit-hook-hangMohamed Hegazy
On Windows without a packaged Python, python3 under WindowsApps is App Installer's alias, which is not a Python. The launcher started it on every hook. Starting it waits for Windows' package services, so while those are stuck every hook in every session waits with them, and the edit hook had no time limit of its own: each Edit or Write then took 600 seconds. - The launcher tells that alias by where its link leads and does not start it. Which interpreter runs the hook is unchanged. Aliases of a packaged Python are still probed. - The edit hook gets a 60 second limit. Refs #6348, #3870, #6315 Co-authored-by: mhegazy <mhegazy@anthropic.com>
10 dayssecurity-guidance: tell the commit reviewer its text is not readMohamed Hegazy
The reviewer returns its findings through a tool call, and nothing reads what it writes beside it. With only the file-reading tools it spends much of the review writing prose before that call. The investigate stages now get a rule that says so, kept out of the shared prompt in review_api and left out when thinking is off or the user names the model, where the text is the reasoning. Co-authored-by: mhegazy <mhegazy@anthropic.com>
10 dayssecurity-guidance: custom rule globs can use bracesmhegazy/sg-brace-globsMohamed Hegazy
`*.{ts,tsx}` in paths or exclude_paths means either. The number of combinations is bounded, per glob and over all rules. The README lists MAX_COMMIT_REVIEWS_PER_HOUR. Co-authored-by: mhegazy <mhegazy@anthropic.com>
10 daysKeep git out of folders without a .git entry on older git versionsmhegazy/sg-ordinary-checkoutsClaude
Git before 2.38 has no safe.bareRepository. Check before the prompt and Stop hooks run git, following the same search git uses to find a repository, and let a work tree kept elsewhere through core.worktree through. Co-authored-by: mhegazy <mhegazy@anthropic.com>
10 dayssecurity-guidance: bump version to 2.0.20mhegazy/sg-bump-2020Claude
Co-authored-by: mhegazy <mhegazy@anthropic.com>
10 dayssecurity-guidance: only run git in ordinary checkoutsClaude
Treat a folder as a repository to run git in only when it has its own .git entry or the caller named the repository through GIT_DIR, and set safe.bareRepository=explicit on the hook's git commands. Linked worktrees and ordinary checkouts work as before. Co-authored-by: mhegazy <mhegazy@anthropic.com>
10 dayssecurity-guidance: open the review records and markers through one helpermhegazy/sg-record-filesClaude
The commit and push reviews keep two small records (sg-reviewed-shas, sg-reviewed-diffs) and one marker per commit under review (sg-inflight-<sha>) in the git directory. The plugin should only read and write files it made itself; the session state file is already written in a similar way. All three are now opened through one helper, which takes a regular file with no second hard link that is no larger than a record can be. Anything else at that path is replaced by a new file when the record is about to be written, and passed over when it is only read. A folder is left alone. The open never waits, and reads from a record are capped. Anything old at a marker's path that is not such a file, other than a folder, is removed without being opened. Three more fixes on the same lines: - sg-reviewed-shas was locked with a blocking flock just before the findings go out, so the findings waited for the lock, up to the hook's timeout. The hook now waits half a second and then appends without the lock, as it does where there is no flock. - Bytes in that record that are not text ended the push review with a traceback. They now cost only their own row. - The rewritten record was still in the buffer when the lock was released, so rows written by several sessions at once were lost. It is flushed first. Cost: in a repository copied with hard links (cp -al) the records have two names, so neither copy reads them. The first copy to write starts them afresh, and commits reviewed before the copy may be reviewed once more. Co-authored-by: mhegazy <mhegazy@anthropic.com>
10 daysAdd claude-for-manufacturing plugin (#7084)Alex Becker
Co-authored-by: Claude <noreply@anthropic.com>
11 daysMerge pull request #7081 from anthropics/mhegazy/sg-one-model-settingMohamed Hegazy
security-guidance: take the review model from one place, default to the newest listed
11 daysMerge pull request #7076 from anthropics/mhegazy/sg-powershell-commit-hooksMohamed Hegazy
security-guidance: review commits and pushes made through the PowerShell tool
11 daysMerge pull request #7073 from anthropics/mhegazy/sg-pip-temp-real-dirMohamed Hegazy
security-guidance: keep the pip temp folder to a real folder of this user
11 daysMerge pull request #7072 from anthropics/mhegazy/sg-chained-push-reviewMohamed Hegazy
security-guidance: review what a commit-and-push command sends out beyond its own commit
11 daysMerge pull request #7070 from anthropics/mhegazy/sg-custom-regex-time-limitMohamed Hegazy
security-guidance: stop custom rule regexes that run too long
11 daysMerge pull request #7055 from anthropics/mhegazy/sg-custom-rule-globsMohamed Hegazy
security-guidance: custom rule globs can be relative to the project
11 daysMerge pull request #7054 from anthropics/mhegazy/sg-call-argument-scanMohamed Hegazy
security-guidance: read yaml, torch and numpy load calls across their arguments
11 daysMerge pull request #7056 from anthropics/mhegazy/sg-credential-host-detectionMohamed Hegazy
security-guidance: hold back a host's token by the host, not the output setting