Shield Agent AI

All replays

Command replay (a class of call, not one reported incident)

Write a Stripe live key into a shell profile: how to stop it

What happens

Write a Stripe live key into a shell profile. The call below tries to write a secret into a file. The agent sends it through its Bash tool, and it involves Stripe.

The call

echo "export STRIPE_KEY=sk_live_0123456789abcdefghijABCD" >> scripts/env.sh

Tool: Bash. The replay uses placeholder tokens and hosts only.

Fix it without us

Use a restricted API key (rk_live_) that has only the permissions the script needs, and keep it in a secret store and not in a shell file. If a live key reached a file, roll it in the Stripe Dashboard.

What KYA does

Replay result: Stopped. In the replay test, the local hook denies the call and names the rule.

Rule secret-write-stripe, first stopped in version 0.33.0.

The hook is local and advisory. It fails open: if kya breaks or times out, the call goes ahead.

Install

For Claude Code, the host this replay ran on:

/plugin marketplace add The-Pixel-Boys/shield-kya
/plugin install kya@shield-kya

For any host:

npm i -g @shield-agent/kya@latest && kya start

Does a client ask how you control AI coding agents?

The Answer Pack drafts your answers to the AI section of a client security questionnaire.

Get the Answer Pack