diff options
| author | Mohamed Hegazy <mhegazy@anthropic.com> | 2026-10-07 08:35:56 -0700 |
|---|---|---|
| committer | Mohamed Hegazy <mhegazy@anthropic.com> | 2026-10-07 08:35:56 -0700 |
| commit | bfe21649b9ccdbc67599d6647ff139a4c34e4458 (patch) | |
| tree | 3a7348be94edff55c8b0cf8570a5579cdab7025c /plugins/plugin-dev/skills/command-development/references/plugin-features-reference.md | |
| parent | 6eb6a30bf024b182d418d3bbd11f156e360365af (diff) | |
security-guidance: stop a killed hook from leaving index copies behind (2.0.10 → 2.0.11)
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 <noreply@anthropic.com>
Diffstat (limited to 'plugins/plugin-dev/skills/command-development/references/plugin-features-reference.md')
0 files changed, 0 insertions, 0 deletions
