<feed xmlns='http://www.w3.org/2005/Atom'>
<title>claude-plugins-official.git/plugins/security-guidance/hooks/diffstate.py, branch bump/altimate-code</title>
<subtitle>Official Claude Code plugin directory
</subtitle>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/'/>
<entry>
<title>Merge pull request #6588 from anthropics/mhegazy/sg-inflight-reviews</title>
<updated>2026-10-15T22:41:24+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>8000722+mhegazy@users.noreply.github.com</email>
</author>
<published>2026-10-15T22:41:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=18de88a51e19589dbf2524b27eb72919721c3e15'/>
<id>18de88a51e19589dbf2524b27eb72919721c3e15</id>
<content type='text'>
security-guidance: do not review a commit twice while its first review is running</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
security-guidance: do not review a commit twice while its first review is running</pre>
</div>
</content>
</entry>
<entry>
<title>security-guidance: do not review a commit twice while its first review is running</title>
<updated>2026-10-15T22:40:32+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>mhegazy@anthropic.com</email>
</author>
<published>2026-10-13T20:52:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=7e05205b41cbd5d3c8884f7effc8688c10e2cf00'/>
<id>7e05205b41cbd5d3c8884f7effc8688c10e2cf00</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #6605 from anthropics/mhegazy/sg-state-file-save</title>
<updated>2026-10-15T22:28:02+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>8000722+mhegazy@users.noreply.github.com</email>
</author>
<published>2026-10-15T22:28:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=7b2259ba542c313099b1f00be8b670f7aa0c63bb'/>
<id>7b2259ba542c313099b1f00be8b670f7aa0c63bb</id>
<content type='text'>
security-guidance: keep the session state when a save is cut short</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
security-guidance: keep the session state when a save is cut short</pre>
</div>
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'origin/main' into mhegazy/sg-skip-untracked-listing</title>
<updated>2026-10-15T22:21:47+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>mhegazy@anthropic.com</email>
</author>
<published>2026-10-15T22:21:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=f014d4623b59ffc4212ffd43f274ec81dffa35d6'/>
<id>f014d4623b59ffc4212ffd43f274ec81dffa35d6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'origin/main' into mhegazy/sg-state-file-save</title>
<updated>2026-10-15T22:21:43+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>mhegazy@anthropic.com</email>
</author>
<published>2026-10-15T22:19:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=f1a98c9d629ae161d9e5f037983dee84a57b6e6a'/>
<id>f1a98c9d629ae161d9e5f037983dee84a57b6e6a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>security-guidance: stop re-reviewing untracked files past the snapshot cap (#6541)</title>
<updated>2026-10-15T21:32:20+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>8000722+mhegazy@users.noreply.github.com</email>
</author>
<published>2026-10-15T21:32:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=59bb3e8b43a3dbab62933ae404a059bb1258c0ea'/>
<id>59bb3e8b43a3dbab62933ae404a059bb1258c0ea</id>
<content type='text'>
* 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.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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.</pre>
</div>
</content>
</entry>
<entry>
<title>security-guidance: skip the untracked-file listing when the Stop review is off</title>
<updated>2026-10-15T16:31:04+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>mhegazy@anthropic.com</email>
</author>
<published>2026-10-15T16:31:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=8876c9951efd618ef5a889dd1a6479bdb73b70bd'/>
<id>8876c9951efd618ef5a889dd1a6479bdb73b70bd</id>
<content type='text'>
UserPromptSubmit listed every untracked file in the worktree and stored the
result in the session state on each prompt, for a snapshot that only the Stop
review reads. With ENABLE_STOP_REVIEW=0 or ENABLE_CODE_SECURITY_REVIEW=0 the
Stop hook skips before reading it, so the listing is now skipped too. The
stash baseline is still captured for the Write pattern filter.

When the review is switched back on, the next prompt takes a fresh snapshot,
including after an interrupted turn whose baseline is kept.

Refs #6612
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
UserPromptSubmit listed every untracked file in the worktree and stored the
result in the session state on each prompt, for a snapshot that only the Stop
review reads. With ENABLE_STOP_REVIEW=0 or ENABLE_CODE_SECURITY_REVIEW=0 the
Stop hook skips before reading it, so the listing is now skipped too. The
stash baseline is still captured for the Write pattern filter.

When the review is switched back on, the next prompt takes a fresh snapshot,
including after an interrupted turn whose baseline is kept.

Refs #6612
</pre>
</div>
</content>
</entry>
<entry>
<title>security-guidance: keep the session state when a save is cut short</title>
<updated>2026-10-14T16:31:17+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>mhegazy@anthropic.com</email>
</author>
<published>2026-10-14T16:31:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=acc1870f4c4e2be8b3a27763cc6ad8a716e57e37'/>
<id>acc1870f4c4e2be8b3a27763cc6ad8a716e57e37</id>
<content type='text'>
The state file was rewritten in place, so a hook killed during a save left a truncated file that the next hook read as an empty state: the turn baseline, the touched paths and the shown warnings were gone. Write a temporary file and rename it over the state file. Windows keeps writing in place for now: hooks have no state lock there, and a rename can be refused or make a concurrent read fail.

A state file that cannot be decoded no longer stops the hook. The Stop metrics gain two keys, sent only when nonzero: state_resets (the state file was unreadable and the state started over) and state_overwrites (without a lock, a save replaced one made by another hook since the read).

Refs #1944
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The state file was rewritten in place, so a hook killed during a save left a truncated file that the next hook read as an empty state: the turn baseline, the touched paths and the shown warnings were gone. Write a temporary file and rename it over the state file. Windows keeps writing in place for now: hooks have no state lock there, and a rename can be refused or make a concurrent read fail.

A state file that cannot be decoded no longer stops the hook. The Stop metrics gain two keys, sent only when nonzero: state_resets (the state file was unreadable and the state started over) and state_overwrites (without a lock, a save replaced one made by another hook since the read).

Refs #1944
</pre>
</div>
</content>
</entry>
<entry>
<title>security-guidance: leave nothing behind when git is killed (2.0.9 → 2.0.10)</title>
<updated>2026-10-05T16:53:54+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>mhegazy@anthropic.com</email>
</author>
<published>2026-10-05T16:53:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=a22217bb450a6cc00d7a161566e7cc7d96dbf63a'/>
<id>a22217bb450a6cc00d7a161566e7cc7d96dbf63a</id>
<content type='text'>
With a very large git index the hook's git calls hit their time limits and
are killed, so git cannot clean up. Each kill could leave an index-sized
file in the temp directory, index.stash.&lt;pid&gt; files in .git, and a dead
.git/index.lock that fails the user's next git add or commit.

- `git stash create` and the work-tree diff run on a throwaway index copy.
- Every git the hook spawns gets GIT_OPTIONAL_LOCKS=0.
- Copies live in a private per-user folder and are removed together with
  the files git writes next to them.
- Leftovers older than 30 minutes are swept, including existing ones.

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With a very large git index the hook's git calls hit their time limits and
are killed, so git cannot clean up. Each kill could leave an index-sized
file in the temp directory, index.stash.&lt;pid&gt; files in .git, and a dead
.git/index.lock that fails the user's next git add or commit.

- `git stash create` and the work-tree diff run on a throwaway index copy.
- Every git the hook spawns gets GIT_OPTIONAL_LOCKS=0.
- Copies live in a private per-user folder and are removed together with
  the files git writes next to them.
- Leftovers older than 30 minutes are swept, including existing ones.

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Adjust SubagentStop handling and repository precedence</title>
<updated>2026-09-09T16:46:55+00:00</updated>
<author>
<name>Octavian Guzu</name>
<email>oct@anthropic.com</email>
</author>
<published>2026-09-09T16:46:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=f03d41e2c96f30b7b59a05566e998e6236a943e7'/>
<id>f03d41e2c96f30b7b59a05566e998e6236a943e7</id>
<content type='text'>
- SubagentStop reviews without consuming or advancing the session's
  Stop state; an identical diff is not reviewed twice.
- SubagentStop from a different working tree than the project is skipped.
- An explicit `git -C &lt;dir&gt;` / `cd &lt;dir&gt;` naming another repository takes
  precedence over the hook cwd.
- Narrows the `git -C … commit` matcher; keeps Windows path separators
  when tokenizing; adds `--no-textconv` to diff/show invocations.
- Adds tests.

:house: Remote-Dev: homespace
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- SubagentStop reviews without consuming or advancing the session's
  Stop state; an identical diff is not reviewed twice.
- SubagentStop from a different working tree than the project is skipped.
- An explicit `git -C &lt;dir&gt;` / `cd &lt;dir&gt;` naming another repository takes
  precedence over the hook cwd.
- Narrows the `git -C … commit` matcher; keeps Windows path separators
  when tokenizing; adds `--no-textconv` to diff/show invocations.
- Adds tests.

:house: Remote-Dev: homespace
</pre>
</div>
</content>
</entry>
</feed>
