JD Pruett has published a single prompt that turns a coding agent into an auditor of its own working environment. His cover-your-ais repo went up on 21 November 2026, and the post announcing it claims that 80 to 90 per cent of major AI incidents that cause real harm have no attacker, just an agent tripping over a poor codebase.
What the prompt makes the agent do
You paste it into your coding agent before giving that agent broad access. The opening rules set the order of work: audit, report, wait.
Audit first and change nothing. Never print secret values or use any credential; show names and paths only.
prompt text, jdpru/cover-your-ais
Each finding comes back with a file and line number, the reason it’s dangerous and a fix. The agent then waits for approval, applies only fixes inside the repo, and lists anything outside it (accounts, tokens, settings) as manual steps. It finishes by ranking every fix by blast radius, top three first.

The 11 checks
| Check | Looks for | Fix |
|---|---|---|
| 1 | Tests, dev or preview configs pointing at a non-local or production database | Point tests at a local DB and abort if the host isn’t local |
| 2 | Production or broad-scope credentials the shell can read, and a production default context | Remove committed keys; rotate exposed ones; make non-prod the default |
| 3 | Recursive deletes whose target comes from a variable, glob or link | Guard variables, resolve with realpath, add a dry run |
| 4 | Infrastructure one command can destroy, and backups the same token can delete | Add deletion protection; keep backups out of the agent’s reach |
| 5 | Rules that exist only as prose in AGENTS.md or CLAUDE.md | Back each rule with a deny rule, read-only role or branch protection |
| 6 | Unprotected main branch and over-scoped GitHub tokens | Branch protection and a fine-grained token |
| 7 | Repos inside iCloud, Dropbox or OneDrive, and placeholder files | Move the repo out; verify copies before deleting a source |
| 8 | Unpinned MCP servers, unknown hooks, permission-bypass flags, hidden Unicode | Pin versions, remove unknowns, use read-only tokens |
| 9 | CI workflows that run an agent on untrusted input with secrets in reach | Least-privilege permissions; no pull_request_target for agents |
| 10 | Auto-approve modes and safety nets the agent doesn’t load, such as a shell alias | Turn off bypass for destructive commands; sandbox the agent |
| 11 | Tools that send money or messages with no cap, allowlist or confirmation | Per-call cap, recipient allowlist, human confirmation |
A closing instruction asks for a warning in the output of any risky command that has to stay, such as “WARNING: DATABASE_URL is production; this DROPS tables”. The prompt says the study behind it found that kind of warning cut agent harm far more than restating a rule. It doesn’t name the study.
Where the 80 to 90 per cent comes from
The post doesn’t link its research either. Two public tallies sit close to the claim. Manifold Security’s Agent Incident Ledger held 66 disclosed incidents on 10 November 2026, and in 57 of them nobody manipulated the agent. That’s 86 per cent. Only 9 involved someone outside steering the agent.
Cyera’s May 2026 analysis counted differently. It screened 7,246 public AI incident reports, verified 344 as relevant to enterprises, and found 188 where an autonomous system caused harm in production systems with no attacker in the chain. That’s 55 per cent of its set, so the 80 to 90 per cent range holds for Manifold’s count and not for Cyera’s.

Three incidents the checks fit
Replit, July 2025. Replit CEO Amjad Masad said on X that its agent, working in development, deleted data from a production database, and that this was “unacceptable and should never be possible”. Replit began rolling out automatic separation of development and production databases. The closest checks are 1 and 5: one database shared by development and production, and a code freeze that lived only in chat.
PocketOS, April 2026. Cyera, citing the Guardian, reports that a coding agent deleted the car-rental software vendor’s production database and then its backups in seconds. Checks 2 and 4 cover a credential the agent could reach and backups it could delete.
Amazon Kiro, December 2025. The Financial Times reported that Kiro chose to “delete and recreate the environment”, causing a 13-hour disruption to AWS Cost Explorer in one mainland China region. Amazon says it was user error, specifically misconfigured access controls, and that the engineer’s role had broader permissions than expected. It added mandatory peer review for production access. Either way, that’s check 2.

Running it safely
Pruett’s README says it plainly: prompts aren’t security boundaries, so start with read-only access, review the findings and approve only the fixes you understand.
There’s a catch the prompt shares with check 5. Its promise not to print secrets or use credentials is an instruction, not a control. I’d run it in the least-privileged shell I had, with production credentials out of reach, so the audit never depends on the agent obeying. The prompt is in the repo to copy.
Discover more from Sulat AI & Tech News
Subscribe to get the latest posts sent to your email.




