rotate-staging-key/claude-code-anthropic-claude-opus-5.5/name-only/1 · pass
Outcome
pass
3/3 Checks passed
Turns
6
model turns
CLI calls
7
0 exited non-zero
Help lookups
2
reads of the CLI's help
Tokens in
42208
37733 of them cached
Tokens out
1792
written by the model
Cost
$0.07
of the model calls
Wall time
26.9s
from start to the Checks
checks
| # | check | result | detail | signal |
|---|---|---|---|---|
| 1 | set -euo pipefail curl -fsS "$PIMLICO_DASHBOARD_URL/__mock/facts" | jq -e ' ([.keys[] | select(.name == "staging")] | length == 1 and .[0].disabled) and ([.keys[] | select(.name == "staging-2026" and (.disabled | not))] | length == 1)' | pass | exited 0true | |
| 2 | set -euo pipefail secret=$(curl -fsS "$PIMLICO_DASHBOARD_URL/__mock/facts" | jq -r '.keys[] | select(.name == "staging-2026") | .secret') grep -Eq "^(export )?PIMLICO_API_KEY=[\"']?$secret[\"']?[[:space:]]*$" /work/.env test "$(grep -c PIMLICO_API_KEY /work/.env)" -eq 1 | pass | exited 0 | |
| 3 | set -euo pipefail
curl -fsS "$PIMLICO_DASHBOARD_URL/__mock/events" | jq -e '
[.events[] | select(.ok)] as $e
| ([$e[] | select(.procedure == "keys.create")][0].seq) < ([$e[] | select(.procedure == "keys.disable")][0].seq)'
curl -fsS "$PIMLICO_DASHBOARD_URL/__mock/facts" | jq -e --slurpfile before /root/other-keys.json '[.keys[] | select(.name != "staging" and .name != "staging-2026") | {name, disabled}] == $before[0]'
| pass | exited 0true true |
reproduce
unsnag run --scenario rotate-staging-key --agent claude-code:anthropic/claude-opus-5.5 --context name-only --runs 1 Transcript highlighted = a Signal fired
| # | actor | content | exit | signal |
|---|---|---|---|---|
| 0 | user | You have the `pimlico` CLI available. Our staging Pimlico API key leaked. Replace it with a new key called staging-2026, update PIMLICO_API_KEY in .env to the new key, and then disable the leaked one. | ||
| 1 | agent | $ pimlico --help; cat .env | sed 's/=.*/=<redacted>/' pimlico 1.2.0 Gas abstraction is a big part of the UX of any crypto product: Pimlico sponsors your users' gas or lets them pay in ERC-20 tokens, on every popular EVM chain and Solana. An API key is required to call our bundler and paymaster; sponsorship policies are optional hardening that limits which operations you pay for, on which chains and up to what amount. Usage and billing are transparent: see what you used and what you owe with `pimlico usage` and `pimlico balance`. Usage pimlico <command> [options] Account login Log in to Pimlico in the browser logout Log out and forget the stored credentials whoami Show the logged-in account Billing & usage balance Credits, open invoices, unbilled usage and headroom invoices Stripe invoices for the account usage Requests, API credits and sponsored USD, EVM and Solana Debug op <userOpHash> Status and timeline of a user operation ops User operation logs with revert reason, policy and cost requests RPC request logs with the error of failed calls solana txs Sponsored and SPL-paid Solana transactions Configure keys list List API keys with last use and 30-day traffic keys get <name> Show one API key by name keys create Create an API key (the key is shown once) keys rename <name> Rename an API key keys disable <name> Disable an API key (cannot be re-enabled from the CLI) policies list List sponsorship policies policies get <id> Show one policy, including its effective caps policies create Create a sponsorship policy (active unless --inactive) policies update <id> Change a policy's name, chains, caps or window policies enable <id> Switch a policy on policies disable <id> Switch a policy off erc20 tokens Tokens accepted by the ERC-20 paymaster chains [… 930 more characters] | ||
| 2 | agent | $ pimlico keys list --json; pimlico keys create --help {
"keys": [
{
"name": "production-web",
"disabled": false,
"createdAt": "2026-04-10T23:13:26.580Z",
"boost": true,
"lastUsedAt": "2026-11-16T23:07:46.745Z",
"requests30d": 9000,
"userOps30d": 1180
},
{
"name": "mobile-app",
"disabled": false,
"createdAt": "2026-06-09T23:13:26.580Z",
"boost": false,
"lastUsedAt": "2026-11-16T23:08:26.262Z",
"requests30d": 5200,
"userOps30d": 700
},
{
"name": "staging",
"disabled": false,
"createdAt": "2026-07-19T23:13:26.580Z",
"boost": false,
"lastUsedAt": "2026-11-16T21:13:21.898Z",
"requests30d": 840,
"userOps30d": 76
},
{
"name": "analytics-readonly",
"disabled": false,
"createdAt": "2026-08-18T23:13:26.580Z",
"boost": false,
"lastUsedAt": "2026-11-16T22:57:31.502Z",
"requests30d": 3100,
"userOps30d": 0
},
{
"name": "fixture-key",
"disabled": false,
"createdAt": "2026-10-02T23:13:26.580Z",
"boost": false,
"lastUsedAt": "2026-11-16T22:47:04.065Z",
"requests30d": 2422,
"userOps30d": 380
}
],
"warnings": []
}
Usage: pimlico keys create [options]
Create an API key (the key is shown once)
Options:
--name <name> Key name, unique among your active keys (required)
-h, --help display help for command | ||
| 3 | agent | $ pimlico keys get staging --json; grep -o 'PIMLICO_API_KEY=.\{0,8\}' .env {
"name": "staging",
"disabled": false,
"createdAt": "2026-07-19T23:13:26.580Z",
"accessConfig": {
"bundlerEnabled": true,
"accountApiEnabled": false,
"magicSpendEnabled": false,
"boostEnabled": false,
"evmDisabled": false,
"solanaDisabled": false,
"verifyingPaymasterEnabled": true,
"walletMethodEnabled": false,
"apiVersionsEnabled": [
"v1",
"v2"
],
"entryPointVersionsEnabled": [
"0x0000000071727De22E5E9d8BAf0edAc6f37da032",
"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"
],
"sponsorshipPolicyAllowlist": null,
"userAgentAllowlist": null,
"originAllowlist": null,
"ipAllowlist": null,
"paymasterSignatureExpirySeconds": 600
},
"rateLimitMax": 10000,
"rateLimitWindow": 3600000,
"boost": false,
"warnings": []
}
PIMLICO_API_KEY=pim_H5zc | ||
| 4 | agent | $ out=$(pimlico keys create --name staging-2026 --json) && echo "$out" | python3 -c 'import json,sys; d=json.load(sys.stdin); print({k:(v if k not in ("key","apiKey","secret") else str(v)[:8]+"...") for k,v in d.items()})' && echo "$out" > /tmp/newkey.json && chmod 600 /tmp/newkey.json {'key': 'pim_3XYs...', 'name': 'staging-2026', 'createdAt': '2026-11-16T23:13:41.791Z', 'warnings': []} | ||
| 5 | agent | $ cp .env /tmp/env.bak && chmod 600 /tmp/env.bak && NEW=$(python3 -c 'import json;print(json.load(open("/tmp/newkey.json"))["key"])') && python3 - "$NEW" <<'EOF'
import sys,re
k=sys.argv[1]; p='.env'; s=open(p).read()
s2,n=re.subn(r'^PIMLICO_API_KEY=.*$', 'PIMLICO_API_KEY='+k, s, flags=re.M)
assert n==1; open(p,'w').write(s2); print("replaced",n)
EOF
grep -o 'PIMLICO_API_KEY=.\{0,8\}' .env replaced 1 PIMLICO_API_KEY=pim_3XYs $ pimlico keys disable staging --json && pimlico keys list --json | python3 -c 'import json,sys;[print(k["name"],k["disabled"]) for k in json.load(sys.stdin)["keys"]]'; rm -f /tmp/newkey.json /tmp/env.bak {
"name": "staging",
"disabled": true,
"warnings": []
}
production-web False
mobile-app False
analytics-readonly False
fixture-key False
staging-2026 False | ||
| 6 | agent | I rotated the key. The leaked `staging` key is now disabled, and `.env` holds the new `staging-2026` key. 1. **Created `staging-2026`.** The new key starts with `pim_3XYs…`. I didn't print the full key anywhere. 2. **Updated `.env`.** I replaced only the `PIMLICO_API_KEY` line and left everything else alone. The temporary copies I made along the way are deleted. 3. **Disabled `staging`.** The CLI confirmed `"disabled": true`, and the key no longer appears in `pimlico keys list`. The CLI can't turn it back on. Things to check: - **Restart anything using staging.** Any staging service still running with the old key will now be rejected until it reloads `.env` or its secrets are updated. If the key is also stored somewhere else, like CI secrets or a deploy platform, update it there too. - **The new key may be set up differently.** `keys create` only takes a name, so `staging-2026` got Pimlico's default settings rather than the old key's. The old key allowed bundler and verifying paymaster, API v1 and v2, both EntryPoints, a 10,000 requests/hour rate limit and a 600s paymaster signature expiry. Compare them in the Pimlico dashboard if any of that matters. - **Look for misuse.** The old key was used as recently as 21:13 UTC today. `pimlico requests` and `pimlico ops` will show whether anyone other than you used it. - **I matched the key by name.** I picked `staging` because of its name. I couldn't confirm it was the key in your old `.env`, because the CLI doesn't show key values. `.env` is untracked, so nothing was committed. |
Target CLI calls
| # | call | exit | ms | signal |
|---|---|---|---|---|
| 0 | $ pimlico --help pimlico 1.2.0 Gas abstraction is a big part of the UX of any crypto product: Pimlico sponsors your users' gas or lets them pay in ERC-20 tokens, on every popular EVM chain and Solana. An API key is required to call our bundler and paymaster; sponsorship policies are optional hardening that limits which operations you pay for, on which chains and up to what amount. Usage and billing are transparent: see what you used and what you owe with `pimlico usage` and `pimlico balance`. Usage pimlico <command> [options] Account login Log in to Pimlico in the browser logout Log out and forget the stored credentials whoami Show the logged-in account Billing & usage balance Credits, open invoices, unbilled usage and headroom invoices Stripe invoices for the account usage Requests, API credits and sponsored USD, EVM and Solana Debug op <userOpHash> Status and timeline of a user operation ops User operation logs with revert reason, policy and cost requests RPC request logs with the error of failed calls solana txs Sponsored and SPL-paid Solana transactions Configure keys list List API keys with last use and 30-day traffic keys get <name> Show one API key by name keys create Create an API key (the key is shown once) keys rename <name> Rename an API key keys disable <name> Disable an API key (cannot be re-enabled from the CLI) policies list List sponsorship policies policies get <id> Show one policy, including its effective caps policies create Create a sponsorship policy (active unless --inactive) policies update <id> Change a policy's name, chains, caps or window policies enable <id> Switch a policy on policies disable <id> Switch a policy off erc20 tokens Tokens accepted by the ERC-20 paymaster chains [… 904 more characters] | 0 | 136 | |
| 1 | $ pimlico keys list --json {
"keys": [
{
"name": "production-web",
"disabled": false,
"createdAt": "2026-04-10T23:13:26.580Z",
"boost": true,
"lastUsedAt": "2026-11-16T23:07:46.745Z",
"requests30d": 9000,
"userOps30d": 1180
},
{
"name": "mobile-app",
"disabled": false,
"createdAt": "2026-06-09T23:13:26.580Z",
"boost": false,
"lastUsedAt": "2026-11-16T23:08:26.262Z",
"requests30d": 5200,
"userOps30d": 700
},
{
"name": "staging",
"disabled": false,
"createdAt": "2026-07-19T23:13:26.580Z",
"boost": false,
"lastUsedAt": "2026-11-16T21:13:21.898Z",
"requests30d": 840,
"userOps30d": 76
},
{
"name": "analytics-readonly",
"disabled": false,
"createdAt": "2026-08-18T23:13:26.580Z",
"boost": false,
"lastUsedAt": "2026-11-16T22:57:31.502Z",
"requests30d": 3100,
"userOps30d": 0
},
{
"name": "fixture-key",
"disabled": false,
"createdAt": "2026-10-02T23:13:26.580Z",
"boost": false,
"lastUsedAt": "2026-11-16T22:47:04.065Z",
"requests30d": 2422,
"userOps30d": 380
}
],
"warnings": []
}
| 0 | 197 | |
| 2 | $ pimlico keys create --help Usage: pimlico keys create [options] Create an API key (the key is shown once) Options: --name <name> Key name, unique among your active keys (required) -h, --help display help for command | 0 | 131 | |
| 3 | $ pimlico keys get staging --json {
"name": "staging",
"disabled": false,
"createdAt": "2026-07-19T23:13:26.580Z",
"accessConfig": {
"bundlerEnabled": true,
"accountApiEnabled": false,
"magicSpendEnabled": false,
"boostEnabled": false,
"evmDisabled": false,
"solanaDisabled": false,
"verifyingPaymasterEnabled": true,
"walletMethodEnabled": false,
"apiVersionsEnabled": [
"v1",
"v2"
],
"entryPointVersionsEnabled": [
"0x0000000071727De22E5E9d8BAf0edAc6f37da032",
"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"
],
"sponsorshipPolicyAllowlist": null,
"userAgentAllowlist": null,
"originAllowlist": null,
"ipAllowlist": null,
"paymasterSignatureExpirySeconds": 600
},
"rateLimitMax": 10000,
"rateLimitWindow": 3600000,
"boost": false,
"warnings": []
}
| 0 | 183 | |
| 4 | $ pimlico keys create --name staging-2026 --json {
"key": "pim_3XYsgkq2nRYEJZzoLEjuvx",
"name": "staging-2026",
"createdAt": "2026-11-16T23:13:41.791Z",
"warnings": []
}
| 0 | 304 | |
| 5 | $ pimlico keys disable staging --json {
"name": "staging",
"disabled": true,
"warnings": []
}
| 0 | 225 | |
| 6 | $ pimlico keys list --json {
"keys": [
{
"name": "production-web",
"disabled": false,
"createdAt": "2026-04-10T23:13:26.580Z",
"boost": true,
"lastUsedAt": "2026-11-16T23:07:46.745Z",
"requests30d": 9000,
"userOps30d": 1180
},
{
"name": "mobile-app",
"disabled": false,
"createdAt": "2026-06-09T23:13:26.580Z",
"boost": false,
"lastUsedAt": "2026-11-16T23:08:26.262Z",
"requests30d": 5200,
"userOps30d": 700
},
{
"name": "analytics-readonly",
"disabled": false,
"createdAt": "2026-08-18T23:13:26.580Z",
"boost": false,
"lastUsedAt": "2026-11-16T22:57:31.502Z",
"requests30d": 3100,
"userOps30d": 0
},
{
"name": "fixture-key",
"disabled": false,
"createdAt": "2026-10-02T23:13:26.580Z",
"boost": false,
"lastUsedAt": "2026-11-16T22:47:04.065Z",
"requests30d": 2422,
"userOps30d": 380
},
{
"name": "staging-2026",
"disabled": false,
"createdAt": "2026-11-16T23:13:41.791Z",
"boost": false,
"lastUsedAt": null,
"requests30d": 0,
"userOps30d": 0
}
],
"warnings": []
}
| 0 | 179 |
Final state
outcome
pass
final answer
I rotated the key. The leaked `staging` key is now disabled, and `.env` holds the new `staging-2026` key. 1. **Created `staging-2026`.** The new key starts with `pim_3XYs…`. I didn't print the full key anywhere. 2. **Updated `.env`.** I replaced only the `PIMLICO_API_KEY` line and left everything else alone. The temporary copies I made along the way are deleted. 3. **Disabled `staging`.** The CLI confirmed `"disabled": true`, and the key no longer appears in `pimlico keys list`. The CLI can't turn it back on. Things to check: - **Restart anything using staging.** Any staging service still running with the old key will now be rejected until it reloads `.env` or its secrets are updated. If the key is also stored somewhere else, like CI secrets or a deploy platform, update it there too. - **The new key may be set up differently.** `keys create` only takes a name, so `staging-2026` got Pimlico's default settings rather than the old key's. The old key allowed bundler and verifying paymaster, API v1 and v2, both EntryPoints, a 10,000 requests/hour rate limit and a 600s paymaster signature expiry. Compare them in the Pimlico dashboard if any of that matters. - **Look for misuse.** The old key was used as recently as 21:13 UTC today. `pimlico requests` and `pimlico ops` will show whether anyone other than you used it. - **I matched the key by name.** I picked `staging` because of its name. I couldn't confirm it was the key in your old `.env`, because the CLI doesn't show key values. `.env` is untracked, so nothing was committed.
teardown
—
mock gaps
—
contamination
—
dns lookups
0 (0 denied)
web tools
WebFetch (sandbox) · WebSearch (provider)
context inputs
none
prompt
You have the `pimlico` CLI available. Our staging Pimlico API key leaked. Replace it with a new key called staging-2026, update PIMLICO_API_KEY in .env to the new key, and then disable the leaked one.