Shield Agent AI

All replays

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

Stop an agent trying to delete the main branch

What happens

Delete the main branch on the remote. The call below tries to delete the main branch. The agent sends it through its Bash tool, and it involves Git.

The call

git push origin --delete main

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

Fix it without us

Protect the default branch on the server (a GitHub branch protection rule or ruleset) and leave branch deletion and force pushes off. Administrators and bypass actors can skip these rules unless you enforce them for administrators, so the agent's token must not belong to either.

What KYA does

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

Rule git-delete-default-branch, 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