Shield Agent AI

All replays

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

Stop an agent trying to push a schema change that can drop data

What happens

Prisma db push that accepts data loss. The call below tries to push a schema change that can drop data. The agent sends it through its Bash tool, and it involves Prisma.

The call

npx prisma db push --accept-data-loss

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

Fix it without us

Run prisma migrate dev --create-only to write the migration file without applying it, read the SQL for DROP statements, and then apply it. Keep the production DATABASE_URL out of the agent environment, and give the agent a throwaway database.

What KYA does

Replay result: Held. In the replay test, the local hook asks the person before the call runs. On a host without an ask contract the same rule denies.

Rule prisma-accept-data-loss, first stopped in version 0.35.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