<feed xmlns='http://www.w3.org/2005/Atom'>
<title>claude-plugins-official.git/plugins/security-guidance/hooks/gitutil.py, branch main</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: skip other repositories whose settings change what git runs</title>
<updated>2026-11-19T19:38:13+00:00</updated>
<author>
<name>Claude</name>
<email>noreply@anthropic.com</email>
</author>
<published>2026-11-19T19:38:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=ff2b81351ae2778c9cda5f5b600269410fd0331c'/>
<id>ff2b81351ae2778c9cda5f5b600269410fd0331c</id>
<content type='text'>
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 &lt;mhegazy@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;mhegazy@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'origin/main' into mhegazy/sg-commit-diff-memory</title>
<updated>2026-11-18T00:11:54+00:00</updated>
<author>
<name>Claude</name>
<email>noreply@anthropic.com</email>
</author>
<published>2026-11-18T00:11:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=bdbd27da1d3b535eabfdf7dc5bf2e308858d7d3a'/>
<id>bdbd27da1d3b535eabfdf7dc5bf2e308858d7d3a</id>
<content type='text'>
Co-authored-by: mhegazy &lt;mhegazy@anthropic.com&gt;

# Conflicts:
#	plugins/security-guidance/hooks/security_reminder_hook.py
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: mhegazy &lt;mhegazy@anthropic.com&gt;

# Conflicts:
#	plugins/security-guidance/hooks/security_reminder_hook.py
</pre>
</div>
</content>
</entry>
<entry>
<title>security-guidance: read commit and push diffs without holding them</title>
<updated>2026-11-16T18:19:35+00:00</updated>
<author>
<name>Claude</name>
<email>noreply@anthropic.com</email>
</author>
<published>2026-11-16T18:19:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=a5576bbfa2a13729122803fc8e3adf370f99d37a'/>
<id>a5576bbfa2a13729122803fc8e3adf370f99d37a</id>
<content type='text'>
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 &lt;mhegazy@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;mhegazy@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>security-guidance: leave renamed key lists out of the review</title>
<updated>2026-11-16T17:43:40+00:00</updated>
<author>
<name>Claude</name>
<email>noreply@anthropic.com</email>
</author>
<published>2026-11-16T17:43:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=8ee48731324352570a0b8d366b9c9b015bc62808'/>
<id>8ee48731324352570a0b8d366b9c9b015bc62808</id>
<content type='text'>
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 &lt;mhegazy@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;mhegazy@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>security-guidance: review text files renamed to code names</title>
<updated>2026-11-13T00:22:21+00:00</updated>
<author>
<name>Claude</name>
<email>noreply@anthropic.com</email>
</author>
<published>2026-11-13T00:22:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=cf694f613b8d4568b74ce55aa306aad7cf2327a7'/>
<id>cf694f613b8d4568b74ce55aa306aad7cf2327a7</id>
<content type='text'>
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 &lt;mhegazy@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;mhegazy@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Keep git out of folders without a .git entry on older git versions</title>
<updated>2026-11-12T22:18:36+00:00</updated>
<author>
<name>Claude</name>
<email>noreply@anthropic.com</email>
</author>
<published>2026-11-12T22:18:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=141a7256071c54e00afaee4c9f6455ed745be841'/>
<id>141a7256071c54e00afaee4c9f6455ed745be841</id>
<content type='text'>
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 &lt;mhegazy@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;mhegazy@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>security-guidance: only run git in ordinary checkouts</title>
<updated>2026-11-12T15:01:04+00:00</updated>
<author>
<name>Claude</name>
<email>noreply@anthropic.com</email>
</author>
<published>2026-11-12T15:01:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=7122fc93f8f13f06e6f413ed68d0e0cd8a9541d0'/>
<id>7122fc93f8f13f06e6f413ed68d0e0cd8a9541d0</id>
<content type='text'>
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 &lt;mhegazy@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;mhegazy@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #7047 from anthropics/mhegazy/sg-push-merge-base</title>
<updated>2026-11-11T19:38:34+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>8000722+mhegazy@users.noreply.github.com</email>
</author>
<published>2026-11-11T19:38:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=e64aee1fb4a256eefa5152ac9d1ef7c13a553509'/>
<id>e64aee1fb4a256eefa5152ac9d1ef7c13a553509</id>
<content type='text'>
security-guidance: push review of a merge reviews what the push added</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
security-guidance: push review of a merge reviews what the push added</pre>
</div>
</content>
</entry>
<entry>
<title>security-guidance: push review of a merge reviews what the push added</title>
<updated>2026-11-09T17:52:07+00:00</updated>
<author>
<name>Claude</name>
<email>noreply@anthropic.com</email>
</author>
<published>2026-11-09T17:52:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=67f8c646e7cb50b4e28e042d13932efca6dc5f50'/>
<id>67f8c646e7cb50b4e28e042d13932efca6dc5f50</id>
<content type='text'>
The reviewed prefix could end on the merged-in branch, so the diff held
everything the first parent has that the branch lacks. Keep the base on
HEAD's first-parent line. A merge whose history is all reviewed is sent as
its combined diff, so only its conflict resolutions and hand edits are read.

Co-authored-by: mhegazy &lt;mhegazy@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The reviewed prefix could end on the merged-in branch, so the diff held
everything the first parent has that the branch lacks. Keep the base on
HEAD's first-parent line. A merge whose history is all reviewed is sent as
its combined diff, so only its conflict resolutions and hand edits are read.

Co-authored-by: mhegazy &lt;mhegazy@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>security-guidance: count commits that no commit hook saw</title>
<updated>2026-11-07T02:01:31+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>mhegazy@anthropic.com</email>
</author>
<published>2026-11-07T02:01:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=5d1c0f596415311a60adc55d0c0fa1d5f4ac27d8'/>
<id>5d1c0f596415311a60adc55d0c0fa1d5f4ac27d8</id>
<content type='text'>
A commit review starts from a hook on the Bash tool, so a commit made any
other way starts none. The Stop row now carries turn_commits: how many
commits the turn made, how many have no review, and how many of those no
commit hook saw. Count only; what is reviewed does not change, and no hook
entry is added.

Co-authored-by: mhegazy &lt;mhegazy@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A commit review starts from a hook on the Bash tool, so a commit made any
other way starts none. The Stop row now carries turn_commits: how many
commits the turn made, how many have no review, and how many of those no
commit hook saw. Count only; what is reviewed does not change, and no hook
entry is added.

Co-authored-by: mhegazy &lt;mhegazy@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
