<feed xmlns='http://www.w3.org/2005/Atom'>
<title>claude-plugins-official.git/plugins/security-guidance/tests/test_git_index_locks.py, branch bump/cloud-sql-sqlserver</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>security-guidance: take the turn baseline without git stash create</title>
<updated>2026-10-27T21:23:30+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>mhegazy@anthropic.com</email>
</author>
<published>2026-10-27T20:08:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=f1b930f0368e0e0a096442eaa9c1c951b8076b71'/>
<id>f1b930f0368e0e0a096442eaa9c1c951b8076b71</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>security-guidance: stop a killed hook from leaving index copies behind (2.0.10 → 2.0.11)</title>
<updated>2026-10-07T15:35:56+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>mhegazy@anthropic.com</email>
</author>
<published>2026-10-07T15:35:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=bfe21649b9ccdbc67599d6647ff139a4c34e4458'/>
<id>bfe21649b9ccdbc67599d6647ff139a4c34e4458</id>
<content type='text'>
In a clone with a very large git index, 2.0.10 could still fill the disk.
It copies the index for each git call that might write it, and a hook that
Claude Code cancels (SIGTERM, then SIGKILL) never reached its cleanup, so
every cancelled hook left index-sized files in the temp directory for up
to 30 minutes. With several agents in one clone the live copies alone
could take many GB.

- A hook told to terminate removes its copies before it exits.
- A copy's name records the hook's pid; the next run deletes copies whose
  hook is gone instead of waiting for the age limit.
- Diffs no longer need a copy: diff.autoRefreshIndex is off, so they only
  read the index. Only `git stash create` and `git add -N` get one.
- The copy is a hard link where the filesystem allows it.
- Only so many hooks hold a copy at once, fewer as the disk fills. A hook
  that gets no slot within 5 s goes without: the baseline falls back to
  HEAD, or new untracked files are left out of that review.

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In a clone with a very large git index, 2.0.10 could still fill the disk.
It copies the index for each git call that might write it, and a hook that
Claude Code cancels (SIGTERM, then SIGKILL) never reached its cleanup, so
every cancelled hook left index-sized files in the temp directory for up
to 30 minutes. With several agents in one clone the live copies alone
could take many GB.

- A hook told to terminate removes its copies before it exits.
- A copy's name records the hook's pid; the next run deletes copies whose
  hook is gone instead of waiting for the age limit.
- Diffs no longer need a copy: diff.autoRefreshIndex is off, so they only
  read the index. Only `git stash create` and `git add -N` get one.
- The copy is a hard link where the filesystem allows it.
- Only so many hooks hold a copy at once, fewer as the disk fills. A hook
  that gets no slot within 5 s goes without: the baseline falls back to
  HEAD, or new untracked files are left out of that review.

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;
</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>
</feed>
