<feed xmlns='http://www.w3.org/2005/Atom'>
<title>claude-plugins-official.git/plugins/security-guidance/hooks/_base.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 branch 'main' into mhegazy/sg-network-failure-class</title>
<updated>2026-10-22T00:04:40+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>8000722+mhegazy@users.noreply.github.com</email>
</author>
<published>2026-10-22T00:04:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=9b4f7dc7daf42b258e32227e8e5a1cacf5dd109c'/>
<id>9b4f7dc7daf42b258e32227e8e5a1cacf5dd109c</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: report why a review call got no HTTP response</title>
<updated>2026-10-20T23:15:10+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>8000722+mhegazy@users.noreply.github.com</email>
</author>
<published>2026-10-20T23:14:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=073448767f5ef6ea935cded3d6f712e843f5d268'/>
<id>073448767f5ef6ea935cded3d6f712e843f5d268</id>
<content type='text'>
A review call that never gets an HTTP response is reported as api_error -1
whatever the cause, so a certificate failure, a refused connection and a
timeout look the same. Rows whose last call failed that way now carry a
count-only net_err key: the failure class, the TLS verify code, and whether
CA files, a proxy or TLS variables are in play. No behaviour change.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A review call that never gets an HTTP response is reported as api_error -1
whatever the cause, so a certificate failure, a refused connection and a
timeout look the same. Rows whose last call failed that way now carry a
count-only net_err key: the failure class, the TLS verify code, and whether
CA files, a proxy or TLS variables are in play. No behaviour change.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'main' into mhegazy/sg-launcher-probe-timing</title>
<updated>2026-10-20T22:36:29+00:00</updated>
<author>
<name>Claude</name>
<email>noreply@anthropic.com</email>
</author>
<published>2026-10-20T22:36:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=6d4e17c8c4d45de2eba6dce119e56fff18ae43b1'/>
<id>6d4e17c8c4d45de2eba6dce119e56fff18ae43b1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'mhegazy/sg-gateway-login' into mhegazy/sg-sdk-bootstrap-switches</title>
<updated>2026-10-20T20:35:31+00:00</updated>
<author>
<name>Claude</name>
<email>noreply@anthropic.com</email>
</author>
<published>2026-10-20T20:35:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=03bab72cbdce7039f452b15417de84989858b9e0'/>
<id>03bab72cbdce7039f452b15417de84989858b9e0</id>
<content type='text'>
Resolves the overlap with the bootstrap working-directory change and the gateway sign-in route: the import probe keeps the state-dir working directory, and llm.py keeps both imports.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Resolves the overlap with the bootstrap working-directory change and the gateway sign-in route: the import probe keeps the state-dir working directory, and llm.py keeps both imports.
</pre>
</div>
</content>
</entry>
<entry>
<title>security-guidance: run SDK bootstrap subprocesses from the state dir</title>
<updated>2026-10-19T17:11:22+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>mhegazy@anthropic.com</email>
</author>
<published>2026-10-19T17:11:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=1eee6df1f032b8719fecdd987273d908d168f467'/>
<id>1eee6df1f032b8719fecdd987273d908d168f467</id>
<content type='text'>
`python -c` and `python -m` put the working directory first on the import
path, and hooks run in the user's repository. A repository file named
claude_agent_sdk.py, venv.py or pip.py was imported in place of the real
module by the SessionStart check and the venv build. Run those
subprocesses from the plugin's state dir, and make state_dir() return an
absolute path as its docstring says, so a relative override isn't
resolved twice.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`python -c` and `python -m` put the working directory first on the import
path, and hooks run in the user's repository. A repository file named
claude_agent_sdk.py, venv.py or pip.py was imported in place of the real
module by the SessionStart check and the venv build. Run those
subprocesses from the plugin's state dir, and make state_dir() return an
absolute path as its docstring says, so a relative override isn't
resolved twice.
</pre>
</div>
</content>
</entry>
<entry>
<title>security-guidance: do not install the agent SDK for reviews that are off</title>
<updated>2026-10-19T16:29:44+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>mhegazy@anthropic.com</email>
</author>
<published>2026-10-14T16:56:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=49484affa8f5730ec9bcfd6e25c393bc021cdd34'/>
<id>49484affa8f5730ec9bcfd6e25c393bc021cdd34</id>
<content type='text'>
The SessionStart bootstrap and its PostToolUse rescue built a venv of a few
hundred MB for the agent SDK whatever the environment said, including under
SECURITY_GUIDANCE_DISABLE=1, and the rescue started the bootstrap again
every five minutes on machines whose SDK lives in that venv (#5331).

- Nothing is installed when the environment turns off every review that
  loads the SDK: the kill switch, ENABLE_CODE_SECURITY_REVIEW=0, or
  ENABLE_STOP_REVIEW=0 with ENABLE_COMMIT_REVIEW=0. Reported as
  sdk_bootstrap 10. A disabled plugin also no longer shows the
  "reviewer unavailable" notice on a Python below 3.10.
- The rescue leaves a finished install under the state dir alone instead
  of starting the bootstrap for it every five minutes.
- New counts on the bootstrap's metrics row, set only when true and only
  when the install exists: sdk_no_creds and sdk_no_git (the session cannot
  run the reviews the install serves), sdk_venv_py (the venv was built by
  another Python version than the one running the hooks, #5706). They
  size follow-up changes; no behaviour depends on them.

With the reviews on, what is built and when is unchanged.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The SessionStart bootstrap and its PostToolUse rescue built a venv of a few
hundred MB for the agent SDK whatever the environment said, including under
SECURITY_GUIDANCE_DISABLE=1, and the rescue started the bootstrap again
every five minutes on machines whose SDK lives in that venv (#5331).

- Nothing is installed when the environment turns off every review that
  loads the SDK: the kill switch, ENABLE_CODE_SECURITY_REVIEW=0, or
  ENABLE_STOP_REVIEW=0 with ENABLE_COMMIT_REVIEW=0. Reported as
  sdk_bootstrap 10. A disabled plugin also no longer shows the
  "reviewer unavailable" notice on a Python below 3.10.
- The rescue leaves a finished install under the state dir alone instead
  of starting the bootstrap for it every five minutes.
- New counts on the bootstrap's metrics row, set only when true and only
  when the install exists: sdk_no_creds and sdk_no_git (the session cannot
  run the reviews the install serves), sdk_venv_py (the venv was built by
  another Python version than the one running the hooks, #5706). They
  size follow-up changes; no behaviour depends on them.

With the reviews on, what is built and when is unchanged.
</pre>
</div>
</content>
</entry>
<entry>
<title>security-guidance: report how long the launcher waits for interpreter probes</title>
<updated>2026-10-19T16:29:25+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>mhegazy@anthropic.com</email>
</author>
<published>2026-10-15T22:47:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=d2919136660832d06d5260677b256033c7dbdbda'/>
<id>d2919136660832d06d5260677b256033c7dbdbda</id>
<content type='text'>
sg-python.sh asks each candidate interpreter for its version before running a
hook, and waits as long as that takes. Nothing recorded how long.

The launcher now times each probe with bash builtins (no extra process) and
passes the result to the hook, which reports two keys when the probes of one
launch took a second or more together:

- launcher_probe_ms: all probes of this launch
- launcher_probe_max_ms: the slowest one

The keys go last on a row, so they never displace an existing key. Measurement
only: the launcher still waits for every probe and picks the same interpreter.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
sg-python.sh asks each candidate interpreter for its version before running a
hook, and waits as long as that takes. Nothing recorded how long.

The launcher now times each probe with bash builtins (no extra process) and
passes the result to the hook, which reports two keys when the probes of one
launch took a second or more together:

- launcher_probe_ms: all probes of this launch
- launcher_probe_max_ms: the slowest one

The keys go last on a row, so they never displace an existing key. Measurement
only: the launcher still waits for every probe and picks the same interpreter.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #6589 from anthropics/mhegazy/sg-review-cost-log</title>
<updated>2026-10-15T22:41:17+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>8000722+mhegazy@users.noreply.github.com</email>
</author>
<published>2026-10-15T22:41:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=4db747859e151db177af7ed7cd8b5a20c5995ca2'/>
<id>4db747859e151db177af7ed7cd8b5a20c5995ca2</id>
<content type='text'>
security-guidance: log each review's token use and estimated cost</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
security-guidance: log each review's token use and estimated cost</pre>
</div>
</content>
</entry>
<entry>
<title>security-guidance: log each review's token use and estimated cost</title>
<updated>2026-10-15T22:40:35+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>mhegazy@anthropic.com</email>
</author>
<published>2026-10-13T20:52:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=48805c9f91eb029cb49286cad82dde3381ef7e3c'/>
<id>48805c9f91eb029cb49286cad82dde3381ef7e3c</id>
<content type='text'>
The plugin computed a review's usage but kept it only in its metrics.
Each review now writes one line to the plugin's debug log with the kind
of review, the Claude Code session, model, tokens and estimated cost.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The plugin computed a review's usage but kept it only in its metrics.
Each review now writes one line to the plugin's debug log with the kind
of review, the Claude Code session, model, tokens and estimated cost.
</pre>
</div>
</content>
</entry>
<entry>
<title>security-guidance: print one JSON document from the SessionStart hook on other hosts</title>
<updated>2026-10-15T16:31:46+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>mhegazy@anthropic.com</email>
</author>
<published>2026-10-15T16:31:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=ced6733eee6aa246e2af55ce0c71e38c01a50141'/>
<id>ced6733eee6aa246e2af55ce0c71e38c01a50141</id>
<content type='text'>
On a host other than Claude Code the SessionStart hook printed an async
declaration line and then a metrics line. A host that reads hook output as
one JSON document with a closed schema rejects that.

In portable mode the hook now skips the async line and prints one object
with only the standard fields. The portable-mode helpers move to _base.py so
both hook scripts share them, and the mode is decided once at start-up.
Output under Claude Code is unchanged.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On a host other than Claude Code the SessionStart hook printed an async
declaration line and then a metrics line. A host that reads hook output as
one JSON document with a closed schema rejects that.

In portable mode the hook now skips the async line and prints one object
with only the standard fields. The portable-mode helpers move to _base.py so
both hook scripts share them, and the mode is decided once at start-up.
Output under Claude Code is unchanged.
</pre>
</div>
</content>
</entry>
</feed>
