<feed xmlns='http://www.w3.org/2005/Atom'>
<title>claude-plugins-official.git/plugins/security-guidance/tests/test_gateway_sign_in.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: let the tests that start a stand-in claude run on Windows</title>
<updated>2026-10-19T21:53:45+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>mhegazy@anthropic.com</email>
</author>
<published>2026-10-19T20:57:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=8680640bffd91d9a7fc33ad1ede46a031d36abef'/>
<id>8680640bffd91d9a7fc33ad1ede46a031d36abef</id>
<content type='text'>
The tests' stand-ins for claude were files with a #! line, which Windows
cannot start, so the gateway sign-in tests and the inner-CLI warning test
failed there. On Windows a stand-in is now an .exe built the way pip
builds a console script, and the gateway one writes its call log as
UTF-8. Two tests that move the home directory also set USERPROFILE, and
the one test that needs the Agent SDK without saying so is skipped
without it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The tests' stand-ins for claude were files with a #! line, which Windows
cannot start, so the gateway sign-in tests and the inner-CLI warning test
failed there. On Windows a stand-in is now an .exe built the way pip
builds a console script, and the gateway one writes its call log as
UTF-8. Two tests that move the home directory also set USERPROFILE, and
the one test that needs the Agent SDK without saying so is skipped
without it.
</pre>
</div>
</content>
</entry>
<entry>
<title>security-guidance: keep a turn's review when the gateway sign-in check gives no answer</title>
<updated>2026-10-19T17:05:01+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>mhegazy@anthropic.com</email>
</author>
<published>2026-10-19T17:05:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=5ffcb09d596798a7531fc8651336dff478852061'/>
<id>5ffcb09d596798a7531fc8651336dff478852061</id>
<content type='text'>
When `claude auth status` gives no usable answer, the Stop hook skipped
the review and dropped the turn's changes, so they were never reviewed
even once the check answered. They are now kept for the next Stop
review, as for other transient skips.

A gateway review that runs out of time is no longer tried again on
Sonnet: what makes it do so (a rejected sign-in, an unreachable gateway)
does not depend on the model, and the second attempt doubled the wait.
The timeout's log line now says which API statuses the CLI retried, and
includes the CLI's stderr.

The new tests no longer share one state file across sessions when run
inside a remote session.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When `claude auth status` gives no usable answer, the Stop hook skipped
the review and dropped the turn's changes, so they were never reviewed
even once the check answered. They are now kept for the next Stop
review, as for other transient skips.

A gateway review that runs out of time is no longer tried again on
Sonnet: what makes it do so (a rejected sign-in, an unreachable gateway)
does not depend on the model, and the second attempt doubled the wait.
The timeout's log line now says which API statuses the CLI retried, and
includes the CLI's stderr.

The new tests no longer share one state file across sessions when run
inside a remote session.
</pre>
</div>
</content>
</entry>
<entry>
<title>security-guidance: review through Claude Code in a Claude apps gateway sign-in</title>
<updated>2026-10-19T17:05:01+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>mhegazy@anthropic.com</email>
</author>
<published>2026-10-19T15:37:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=e0d9e154cc7c8d545f5d78c2f51fb9c0dc655b08'/>
<id>e0d9e154cc7c8d545f5d78c2f51fb9c0dc655b08</id>
<content type='text'>
In a Claude Code session signed in to a Claude apps gateway with /login,
Claude Code gives plugin hooks no credential, so the Stop, commit, push
and agentic commit reviews were all skipped.

When the plugin has no credential of its own, it now asks the user's
installed claude (`claude auth status --json`) whether the session is
signed in to a gateway. A yes or no is kept for the session; when the CLI
gives no usable answer, the next hook asks again. If apiProvider is
"gateway" and loggedIn is true, the reviews run through that same CLI,
which restores the stored sign-in by itself, so no credential enters the
plugin. A review the CLI cannot complete counts as a failed review, never
a clean one. The reviews run even with
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC set, as they do on Bedrock and
Vertex: the gateway docs suggest setting it, and the review goes through
the gateway like the session's own requests.

The CLI is found the way the agentic reviewer already finds it:
SG_AGENTIC_CLI_PATH, CLAUDE_CODE_EXECPATH, then fixed install paths, with
no PATH search, and it must be a full path. The reviews use Claude Code's
opus and sonnet aliases, which resolve to the ids Claude Code itself uses
on a gateway, and get the 120 s a direct review gets. Review rows set bit
4 of gateway_cfg, so this route's failure rate can be read apart from
first-party reviews.

Every Claude Code the plugin starts for a review, on any provider, now
runs with SECURITY_GUIDANCE_DISABLE=1. If policy settings enable the
plugin inside that CLI, its hooks there don't start reviews of their own.

The weekly notice that the reviews are not running is no longer shown in
a session signed in to a gateway, since the reviews do run there. The
edit that would show it asks claude first, and the notice marker is
written either way, so that edit waits for claude at most once a week.
Sessions the gateway route cannot review still get the notice, unless,
in the past week, an edit's check found a session signed in to a
gateway. Their skipped reviews still report no_creds.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In a Claude Code session signed in to a Claude apps gateway with /login,
Claude Code gives plugin hooks no credential, so the Stop, commit, push
and agentic commit reviews were all skipped.

When the plugin has no credential of its own, it now asks the user's
installed claude (`claude auth status --json`) whether the session is
signed in to a gateway. A yes or no is kept for the session; when the CLI
gives no usable answer, the next hook asks again. If apiProvider is
"gateway" and loggedIn is true, the reviews run through that same CLI,
which restores the stored sign-in by itself, so no credential enters the
plugin. A review the CLI cannot complete counts as a failed review, never
a clean one. The reviews run even with
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC set, as they do on Bedrock and
Vertex: the gateway docs suggest setting it, and the review goes through
the gateway like the session's own requests.

The CLI is found the way the agentic reviewer already finds it:
SG_AGENTIC_CLI_PATH, CLAUDE_CODE_EXECPATH, then fixed install paths, with
no PATH search, and it must be a full path. The reviews use Claude Code's
opus and sonnet aliases, which resolve to the ids Claude Code itself uses
on a gateway, and get the 120 s a direct review gets. Review rows set bit
4 of gateway_cfg, so this route's failure rate can be read apart from
first-party reviews.

Every Claude Code the plugin starts for a review, on any provider, now
runs with SECURITY_GUIDANCE_DISABLE=1. If policy settings enable the
plugin inside that CLI, its hooks there don't start reviews of their own.

The weekly notice that the reviews are not running is no longer shown in
a session signed in to a gateway, since the reviews do run there. The
edit that would show it asks claude first, and the notice marker is
written either way, so that edit waits for claude at most once a week.
Sessions the gateway route cannot review still get the notice, unless,
in the past week, an edit's check found a session signed in to a
gateway. Their skipped reviews still report no_creds.
</pre>
</div>
</content>
</entry>
</feed>
