<feed xmlns='http://www.w3.org/2005/Atom'>
<title>claude-plugins-official.git/plugins/security-guidance/hooks/diffstate.py, branch bump/stackhawk-api</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 remote-tracking branch 'origin/main' into HEAD</title>
<updated>2026-10-26T23:13:53+00:00</updated>
<author>
<name>Claude</name>
<email>noreply@anthropic.com</email>
</author>
<published>2026-10-26T23:13:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=a3c2f20c0f46e3b0a76ef6e69fcc13c6faca763a'/>
<id>a3c2f20c0f46e3b0a76ef6e69fcc13c6faca763a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #6836 from anthropics/mhegazy/sg-diff-seen-count</title>
<updated>2026-10-26T23:02:51+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>8000722+mhegazy@users.noreply.github.com</email>
</author>
<published>2026-10-26T23:02:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=ced0aa953bf0689e48308de3405bf276421dce63'/>
<id>ced0aa953bf0689e48308de3405bf276421dce63</id>
<content type='text'>
security-guidance: count reviews of a diff that was already reviewed</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
security-guidance: count reviews of a diff that was already reviewed</pre>
</div>
</content>
</entry>
<entry>
<title>security-guidance: hold in-flight review markers on native Windows too</title>
<updated>2026-10-23T11:31:29+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>mhegazy@anthropic.com</email>
</author>
<published>2026-10-23T11:31:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=51b34378d6c2efb5897120c322438e17763854fc'/>
<id>51b34378d6c2efb5897120c322438e17763854fc</id>
<content type='text'>
A commit or push review marks the commits it is reviewing by holding a
lock on .git/sg-inflight-&lt;sha&gt;, 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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A commit or push review marks the commits it is reviewing by holding a
lock on .git/sg-inflight-&lt;sha&gt;, 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.
</pre>
</div>
</content>
</entry>
<entry>
<title>security-guidance: report where a slow prompt's time goes</title>
<updated>2026-10-22T17:11:25+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>mhegazy@anthropic.com</email>
</author>
<published>2026-10-22T17:11:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=22aea1e9b9b4e4efa98237d4d52154f973b47fec'/>
<id>22aea1e9b9b4e4efa98237d4d52154f973b47fec</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'main' into mhegazy/sg-diff-seen-count</title>
<updated>2026-10-22T00:12:11+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>mhegazy@anthropic.com</email>
</author>
<published>2026-10-22T00:12:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=de9e075c828f2c4438d26571dc6046472381a085'/>
<id>de9e075c828f2c4438d26571dc6046472381a085</id>
<content type='text'>
Keeps both sides in emit_metrics: diff_seen stays after the other review
tail keys, and the launcher probe keys stay after everything else.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Keeps both sides in emit_metrics: diff_seen stays after the other review
tail keys, and the launcher probe keys stay after everything else.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #6837 from anthropics/mhegazy/sg-index-copy-gitlinks</title>
<updated>2026-10-21T23:58:27+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>8000722+mhegazy@users.noreply.github.com</email>
</author>
<published>2026-10-21T23:58:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=234c3a4a443e3aa79dfe9ac86e931d50fc43e6da'/>
<id>234c3a4a443e3aa79dfe9ac86e931d50fc43e6da</id>
<content type='text'>
security-guidance: keep nested repositories out of the index copy</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
security-guidance: keep nested repositories out of the index copy</pre>
</div>
</content>
</entry>
<entry>
<title>security-guidance: find the earlier version of a file reached through a symlinked folder</title>
<updated>2026-10-20T23:24:19+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>mhegazy@anthropic.com</email>
</author>
<published>2026-10-20T23:24:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=218862e1b0814b66361e9d215c409a10df2304ae'/>
<id>218862e1b0814b66361e9d215c409a10df2304ae</id>
<content type='text'>
When the tool's path and the session directory name the same repo through
different symlinks (/tmp and /var on macOS), the relative path between the two
spellings left the repo and the lookup found nothing, so a rewrite re-reported
code that was already in the file. The lookup now tries again with both paths
resolved. The first attempt is unchanged.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the tool's path and the session directory name the same repo through
different symlinks (/tmp and /var on macOS), the relative path between the two
spellings left the repo and the lookup found nothing, so a rewrite re-reported
code that was already in the file. The lookup now tries again with both paths
resolved. The first attempt is unchanged.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'main' into mhegazy/sg-baseline-subdir</title>
<updated>2026-10-20T23:09:46+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>mhegazy@anthropic.com</email>
</author>
<published>2026-10-20T23:09:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=8d582c39ac3868b5d85cd5a06497b3a02e11c5dd'/>
<id>8d582c39ac3868b5d85cd5a06497b3a02e11c5dd</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: keep nested repositories out of the index copy</title>
<updated>2026-10-20T23:00:54+00:00</updated>
<author>
<name>Claude</name>
<email>noreply@anthropic.com</email>
</author>
<published>2026-10-20T23:00:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=a00d13d77ba7bf13a9d2ae0db5f7e24aeb4b12b2'/>
<id>a00d13d77ba7bf13a9d2ae0db5f7e24aeb4b12b2</id>
<content type='text'>
The hooks run `git stash create` (the turn baseline) and
`git add --intent-to-add` (untracked files) on a throwaway copy of the
index. A nested repository that the index records is a gitlink entry
there. `git stash create` takes no --ignore-submodules option and
`git add` reads the gitlinks its paths cover, so both started a second
git inside that directory.

Before anything runs on the copy, remove the gitlink entry of every
nested repository from the copy, never from the real index. If that
removal fails, do not use the copy at all: the baseline falls back to
HEAD and runs no stash create, and the diff reads the real index with
--ignore-submodules=all. A gitlink whose directory has no `.git` (a
submodule that is not checked out) stays; git starts nothing there.

Run the intent-to-add `git add` with literal pathspecs, in that one
call's environment only.

The index file is scanned for a gitlink's mode bytes first, so a
repository without one starts no extra git process.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The hooks run `git stash create` (the turn baseline) and
`git add --intent-to-add` (untracked files) on a throwaway copy of the
index. A nested repository that the index records is a gitlink entry
there. `git stash create` takes no --ignore-submodules option and
`git add` reads the gitlinks its paths cover, so both started a second
git inside that directory.

Before anything runs on the copy, remove the gitlink entry of every
nested repository from the copy, never from the real index. If that
removal fails, do not use the copy at all: the baseline falls back to
HEAD and runs no stash create, and the diff reads the real index with
--ignore-submodules=all. A gitlink whose directory has no `.git` (a
submodule that is not checked out) stays; git starts nothing there.

Run the intent-to-add `git add` with literal pathspecs, in that one
call's environment only.

The index file is scanned for a gitlink's mode bytes first, so a
repository without one starts no extra git process.
</pre>
</div>
</content>
</entry>
<entry>
<title>security-guidance: count reviews of a diff that was already reviewed</title>
<updated>2026-10-20T22:59:48+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>mhegazy@anthropic.com</email>
</author>
<published>2026-10-20T22:59:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=437cb57a9d19329a8e6ef3ed79e19adb45e83d50'/>
<id>437cb57a9d19329a8e6ef3ed79e19adb45e83d50</id>
<content type='text'>
A change that comes back under a new commit (undo and re-commit, rebase
before the first push) is unknown to the reviewed-shas record, so the
commit or push review runs on it again. Nothing says how often.

Each commit and push review now notes a hash of every hunk it is sent in
.git/sg-reviewed-diffs, once when it starts and once when it has a
verdict, and reports one new metric, diff_seen:

  0  some hunk was never reviewed in this clone
  1  all were seen, but a review of one has no verdict (yet)
  2  all had a finished review, on different repo contents
  3  all had a finished review, on the same tree
 -1  the record could not be read or written

Count only: no review is skipped, delayed or changed. The record is
bounded (1 MB, 7 days), is not written in portable output mode, and its
lock is never waited on for more than half a second.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A change that comes back under a new commit (undo and re-commit, rebase
before the first push) is unknown to the reviewed-shas record, so the
commit or push review runs on it again. Nothing says how often.

Each commit and push review now notes a hash of every hunk it is sent in
.git/sg-reviewed-diffs, once when it starts and once when it has a
verdict, and reports one new metric, diff_seen:

  0  some hunk was never reviewed in this clone
  1  all were seen, but a review of one has no verdict (yet)
  2  all had a finished review, on different repo contents
  3  all had a finished review, on the same tree
 -1  the record could not be read or written

Count only: no review is skipped, delayed or changed. The record is
bounded (1 MB, 7 days), is not written in portable output mode, and its
lock is never waited on for more than half a second.
</pre>
</div>
</content>
</entry>
</feed>
