{
  "schema_version": 1,
  "id": "ask-credential-switching",
  "track": "coding",
  "name": "Review Cloud Identity Switches",
  "version": "0.0.5",
  "sha256": "28d85889796c2523766518aa638bba4bde443a9feddbe7d8234ff1b3bb6318a8",
  "sha256_v1": "0a8113a9c8f8b3c2ffe64c4ec80aa83acca86ea2966a67766061509d18e5f3f6",
  "keyword": "block",
  "word": "blocks",
  "says": "refuses a matched shell command before it runs",
  "description": "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.",
  "misses": "scripts, SDKs, env files, credential_process.",
  "where": [
    "command"
  ],
  "groups": [],
  "eval_cases": 65,
  "eval_executed": 65,
  "latest": {
    "version": "0.0.5",
    "date": "2026-10-27",
    "change": "Title wording only (IR-F40): \"Ask Credential Switching\" is now \"Review Cloud Identity Switches\". The id, guard and tests are unchanged."
  },
  "agent_labels": {
    "claude-code": {
      "keyword": "block",
      "says": "refuses a matched shell command before it runs"
    },
    "cursor": {
      "keyword": "ask",
      "says": "asks before a matched shell command runs"
    },
    "codex": {
      "keyword": "advise",
      "says": "not enforced (this client cannot prompt before a shell command)"
    },
    "copilot": {
      "keyword": "ask",
      "says": "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)"
    },
    "devin": {
      "keyword": "advise",
      "says": "not enforced (this client cannot prompt before a shell command)"
    },
    "grok": {
      "keyword": "ungraded",
      "says": "Not graded yet for Grok"
    },
    "goose": {
      "keyword": "ungraded",
      "says": "Not graded yet for goose"
    },
    "antigravity": {
      "keyword": "ungraded",
      "says": "Not graded yet for Antigravity"
    },
    "openhands": {
      "keyword": "ungraded",
      "says": "Not graded yet for OpenHands"
    },
    "kimi-code": {
      "keyword": "ungraded",
      "says": "Not graded yet for Kimi Code"
    },
    "factory-droid": {
      "keyword": "ungraded",
      "says": "Not graded yet for Factory Droid"
    }
  },
  "source_url": "https://github.com/open-coder-ai/chock-catalog/tree/1e60d211c1bb767152c6ab0167932da06ab3a10f/base/ask-credential-switching",
  "enforces": "best-effort (pre-tool-use, once hooks are installed; fails open if the hook crashes)",
  "examples": [
    {
      "word": "Asks",
      "prompt": "A request lists a bucket as another AWS profile.",
      "command": "aws s3 ls --profile prod"
    },
    {
      "word": "Allowed",
      "prompt": "A request lists a bucket with the default identity.",
      "command": "aws s3 ls"
    }
  ]
}
