Chock.sh Build your plugin

Policies

Review Cloud Identity Switches

Review Cloud Identity Switches: what it does, its label on each agent, what it misses, and examples.

Catalog policy ask-credential-switching, version 0.0.5, labelled blocks on Claude Code.

What it does

Best effort, ask only. Asks a person before a shell command switches the identity later commands act as: aws --profile, AWS_PROFILE= or AWS keys (also $env:), sts assume-role, configure set of a key; gcloud account, configuration, login or impersonation; az account set, az login as a principal or identity; kubectl use-context or set-credentials; writes to ~/.aws, ~/.config/gcloud, ~/.azure. Names in .chock/credential-allowlist.json pass. Misses: scripts, SDKs, env files, credential_process.

On each agent

AgentLabelWhat it does there
Claude CodeBlocksRefuses a matched shell command before it runs
CursorAsksAsks before a matched shell command runs
CodexAdvisoryNot enforced (this client cannot prompt before a shell command)
GitHub CopilotAsksAsks before a matched shell command runs in VS Code. Not enforced in Copilot CLI, because it cannot prompt there. If the hook errors, the action goes through (not witnessed; the vendor's row is only partly live-run)
DevinAdvisoryNot enforced (this client cannot prompt before a shell command)
GrokNot gradedNot graded yet for Grok
gooseNot gradedNot graded yet for goose
AntigravityNot gradedNot graded yet for Antigravity
OpenHandsNot gradedNot graded yet for OpenHands
Kimi CodeNot gradedNot graded yet for Kimi Code
Factory DroidNot gradedNot graded yet for Factory Droid

What it misses

Scripts, SDKs, env files, credential_process.

Examples from its eval suite

Asks: A request lists a bucket as another AWS profile.

aws s3 ls --profile prod

Allowed: A request lists a bucket with the default identity.

aws s3 ls

More

Built from engine 5a4b6287a46e and catalog 1e60d211c1bb.