summaryrefslogtreecommitdiff
path: root/plugins/code-modernization/scripts
diff options
context:
space:
mode:
authorMohamed Hegazy <mhegazy@anthropic.com>2026-10-19 15:37:53 +0000
committerClaude <noreply@anthropic.com>2026-10-19 17:05:01 +0000
commite0d9e154cc7c8d545f5d78c2f51fb9c0dc655b08 (patch)
treef938e81764e2d9d63d771e9deac6e904f6b393e1 /plugins/code-modernization/scripts
parent303ad63c6a45cee47be5590655e67fe1a1b6611d (diff)
security-guidance: review through Claude Code in a Claude apps gateway sign-in
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.
Diffstat (limited to 'plugins/code-modernization/scripts')
0 files changed, 0 insertions, 0 deletions