DET-173 · agent · confidence High

Agent Edits to Its Own Guardrails

Alert when an agent process writes to its settings, hooks, rules or permission files, or starts with permission-skipping flags.

Guardrails that live in files can be removed by the agent they guard. EDR file events attributed to the agent process, plus command lines that include flags that skip approvals, show when an agent switches off its own checks.

Treat any hit as high priority. Restore the file from a known good copy, review what the agent did after the change, and check whether the same edit was committed to the repo where it would affect other users. Repo-level settings changes in agent commits should also go through review.

Data sources
EDR file and process eventsGit commit diffsAgent platform audit logs
Platforms
macOSWindowsLinuxAI Platform

Logic

1. File writes by agent processes (claude, cursor, codex, copilot agent, aider) to `.claude/settings*.json`, `.claude/hooks/**`, `.cursor/rules/**`, `.vscode/settings.json`, `.github/copilot-instructions.md`.
2. Diff for added `"allow"` wildcards such as `Bash(*)`, removed `hooks` entries, or `sandbox` set to false.
3. Process command lines containing `--dangerously-skip-permissions`, `--yolo`, `--full-auto` or `--no-sandbox` where the parent is another agent process.

False positives

Developers editing their own settings by hand in the same session.

Catches 2 techniques