Shield Agent AI

All replays

Incident replay

Agent wipes a production database during a code freeze

What happens

Agent wipes a production database during a code freeze, reported on 2025-07-18. The call below tries to drop or empty a database table. The agent sends it through its Bash tool, and it involves Postgres.

Sources: 1 2 3

The call

Reconstructed from the public account

psql "$DATABASE_URL" -c "TRUNCATE executives, companies;"

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

Fix it without us

Give the agent a database role that can only read production and does not own the tables, and keep the development and production connection strings apart, so a development session never holds a production login. Turn on automatic backups with point-in-time recovery and test a restore.

What KYA does

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

Rule sql-drop, 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