Review Cloud Identity Switches
Refuses a matched shell command before it runs.
Acts on
Shell command
When
Before the command runs
Tested
65 of 65 pass
In a git repo
In agent
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.
Chock adds friction. It is not a security boundary.
Its label on each agent
The catalog grades each policy on each agent. Pick an agent to build with this policy:
- Claude Code TestedBlocks Refuses a matched shell command before it runsBuild →
- Cursor TestedAsks Asks before a matched shell command runsBuild →
- Codex TestedAdvisory Not enforced (this client cannot prompt before a shell command)Build →
- GitHub Copilot TestedAsks Asks 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)Build →
- Devin TestedAdvisory Not enforced (this client cannot prompt before a shell command)Build →
- Grok Tested Not graded yet for GrokBuild →
- goose Tested Not graded yet for gooseBuild →
- Antigravity Tested Not graded yet for AntigravityBuild →
- OpenHands Untested Not graded yet for OpenHandsBuild →
- Kimi Code Untested Not graded yet for Kimi CodeBuild →
- Factory Droid Untested Not graded yet for Factory DroidBuild →
See it in action
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
Both examples are this policy's own test cases.
What it misses
Scripts, SDKs, env files, credential_process.
Latest change
0.0.5 · · Title wording only (IR-F40): "Ask Credential Switching" is now "Review Cloud Identity Switches". The id, guard and tests are unchanged.