<feed xmlns='http://www.w3.org/2005/Atom'>
<title>claude-plugins-official.git/plugins/security-guidance/hooks/gitutil.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>security-guidance: stay out of repositories nested in the work tree</title>
<updated>2026-10-19T17:36:13+00:00</updated>
<author>
<name>Claude</name>
<email>noreply@anthropic.com</email>
</author>
<published>2026-10-19T17:36:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=7a151516fa58fd0160bacaf8fb5966931170bb9c'/>
<id>7a151516fa58fd0160bacaf8fb5966931170bb9c</id>
<content type='text'>
A directory with its own .git inside the work tree (a submodule, a vendored
checkout, an unpacked archive) was added to the throwaway index as a submodule
entry, and git then started a second git inside it to see whether it had
changed. Nothing in such a directory is reviewed.

git status and work-tree git diff now ignore submodule entries, an untracked
nested repository is no longer listed as a changed file or added to the index
copy, and a commit that moves a submodule is always shown as its two commit ids.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A directory with its own .git inside the work tree (a submodule, a vendored
checkout, an unpacked archive) was added to the throwaway index as a submodule
entry, and git then started a second git inside it to see whether it had
changed. Nothing in such a directory is reviewed.

git status and work-tree git diff now ignore submodule entries, an untracked
nested repository is no longer listed as a changed file or added to the index
copy, and a commit that moves a submodule is always shown as its two commit ids.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'origin/main' into mhegazy/sg-diff-prefix-config</title>
<updated>2026-10-15T22:20:59+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>mhegazy@anthropic.com</email>
</author>
<published>2026-10-15T22:19:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=9e4906b18c07462941ff499d47576bf04c40534a'/>
<id>9e4906b18c07462941ff499d47576bf04c40534a</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 secret-shaped files out of reviews (#6537)</title>
<updated>2026-10-15T21:32:14+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>8000722+mhegazy@users.noreply.github.com</email>
</author>
<published>2026-10-15T21:32:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=4c12e0797dafb29971a6f6e5db650e2cf4c5983c'/>
<id>4c12e0797dafb29971a6f6e5db650e2cf4c5983c</id>
<content type='text'>
* security-guidance: keep secret-shaped files out of reviews

The Stop review covers every dirty file in the work tree, including ones the user changed and Claude never opened. Key files, credential files and encrypted dotfile sources were sent along with the code.

Skip files that are secret stores by naming convention: .env variants, SSH private keys, common credential files, and chezmoi private/encrypted sources.

* security-guidance: report how many secret-shaped files were skipped

The Stop hook now reports secret_shaped_skipped (a count, never names, only when nonzero) so the skip can be confirmed after release and watched for over-matching.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* security-guidance: keep secret-shaped files out of reviews

The Stop review covers every dirty file in the work tree, including ones the user changed and Claude never opened. Key files, credential files and encrypted dotfile sources were sent along with the code.

Skip files that are secret stores by naming convention: .env variants, SSH private keys, common credential files, and chezmoi private/encrypted sources.

* security-guidance: report how many secret-shaped files were skipped

The Stop hook now reports secret_shaped_skipped (a count, never names, only when nonzero) so the skip can be confirmed after release and watched for over-matching.</pre>
</div>
</content>
</entry>
<entry>
<title>security-guidance: read diffs the same whatever the user's prefix settings</title>
<updated>2026-10-13T20:57:12+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>mhegazy@anthropic.com</email>
</author>
<published>2026-10-13T20:57:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=eb638fbf680ae279a9e6699d2243344ccddc9624'/>
<id>eb638fbf680ae279a9e6699d2243344ccddc9624</id>
<content type='text'>
With diff.mnemonicPrefix or diff.noprefix set in the user's git config, diff headers no longer read `a/&lt;path&gt; b/&lt;path&gt;`, the parser matched no file, and the review was skipped with nothing shown. mnemonicPrefix switched off the Stop review; noprefix switched off the commit and push reviews as well.

Pass the default prefix settings on every git call the hook makes.

Fixes #4569
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With diff.mnemonicPrefix or diff.noprefix set in the user's git config, diff headers no longer read `a/&lt;path&gt; b/&lt;path&gt;`, the parser matched no file, and the review was skipped with nothing shown. mnemonicPrefix switched off the Stop review; noprefix switched off the commit and push reviews as well.

Pass the default prefix settings on every git call the hook makes.

Fixes #4569
</pre>
</div>
</content>
</entry>
<entry>
<title>security-guidance: count diff headers the parser could not read</title>
<updated>2026-10-12T17:36:29+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>mhegazy@anthropic.com</email>
</author>
<published>2026-10-12T17:36:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=ed2ae7cd72fb60b4b3e58d622745870072cfd2aa'/>
<id>ed2ae7cd72fb60b4b3e58d622745870072cfd2aa</id>
<content type='text'>
A file whose header cannot be parsed is left out of the review without a trace. The Stop hook now reports diff_hdr_unparsed (a count, only when nonzero) so a header shape the parser misses shows up in metrics.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A file whose header cannot be parsed is left out of the review without a trace. The Stop hook now reports diff_hdr_unparsed (a count, only when nonzero) so a header shape the parser misses shows up in metrics.
</pre>
</div>
</content>
</entry>
<entry>
<title>security-guidance: parse diff sections by header line</title>
<updated>2026-10-12T17:19:01+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>mhegazy@anthropic.com</email>
</author>
<published>2026-10-12T17:18:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=ccdb984025c4115b7d534a41a9fdad43a5283f74'/>
<id>ccdb984025c4115b7d534a41a9fdad43a5283f74</id>
<content type='text'>
The diff parser split on the text 'diff --git ' anywhere, so a file whose own content contains it was cut short, and the rest of that file was never reviewed. It also dropped files whose names git quotes (a double quote, backslash or control character in the name).

Split only where a line starts with the header, and decode quoted names.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The diff parser split on the text 'diff --git ' anywhere, so a file whose own content contains it was cut short, and the rest of that file was never reviewed. It also dropped files whose names git quotes (a double quote, backslash or control character in the name).

Split only where a line starts with the header, and decode quoted names.
</pre>
</div>
</content>
</entry>
<entry>
<title>security-guidance: remove stash indexes older releases left in the git directory</title>
<updated>2026-10-07T15:40:40+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>mhegazy@anthropic.com</email>
</author>
<published>2026-10-07T15:40:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=f711194a9ecdf004b655dbc5006610fbb9e7c7bb'/>
<id>f711194a9ecdf004b655dbc5006610fbb9e7c7bb</id>
<content type='text'>
Releases before 2.0.10 ran `git stash create` on the real index. When that
git was killed, it left an `index.stash.&lt;pid&gt;` file the size of the index
in the git directory, and nothing removes those: a clone can hold hundreds.

Before it copies the index, the hook now deletes such files once they are
older than 30 minutes. It only touches regular files of the current user
whose name is exactly `index.stash.&lt;digits&gt;`, and never `index.lock`.

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01QR7edfw5HHkxJvJVgZiWpM
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Releases before 2.0.10 ran `git stash create` on the real index. When that
git was killed, it left an `index.stash.&lt;pid&gt;` file the size of the index
in the git directory, and nothing removes those: a clone can hold hundreds.

Before it copies the index, the hook now deletes such files once they are
older than 30 minutes. It only touches regular files of the current user
whose name is exactly `index.stash.&lt;digits&gt;`, and never `index.lock`.

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01QR7edfw5HHkxJvJVgZiWpM
</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>
<entry>
<title>Harden git invocation and repository hint handling</title>
<updated>2026-09-09T17:42:50+00:00</updated>
<author>
<name>Octavian Guzu</name>
<email>oct@anthropic.com</email>
</author>
<published>2026-09-09T17:42:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=debbe686ab74ec095436a499b1a59864037e46cf'/>
<id>debbe686ab74ec095436a499b1a59864037e46cf</id>
<content type='text'>
:house: Remote-Dev: homespace
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
:house: Remote-Dev: homespace
</pre>
</div>
</content>
</entry>
</feed>
