cfgaudit

Rules / CFG079

CFG079 autoMode weakens the auto-mode permission classifier

Severity: error (broad allow) · warn (dropped soft_deny defaults) OWASP: LLM03:2026 – Excessive Agency

What cfgaudit checks

When permissions.defaultMode is "auto", Claude Code runs a classifier that decides which actions execute without a confirmation prompt. The autoMode object tunes that classifier — and each of its allow / soft_deny / environment arrays replaces the corresponding built-in classifier section entirely unless the literal string "$defaults" is spliced in as an array entry.

A committed autoMode can therefore silently widen what auto-approves. CFG004 already flags defaultMode: "auto" itself; CFG079 covers the previously-invisible classifier-tuning half. cfgaudit fires when a committed autoMode:

The finding fires whether or not defaultMode: "auto" is currently set: a committed weakened autoMode is latent excessive agency that takes effect as soon as auto mode is enabled (in any settings layer, via the CLI, or via managed settings).

Replacing the allow section with narrower custom rules is not flagged — only broad entries are. soft_deny arrays that keep "$defaults" are not flagged.

Trigger example

{
  "permissions": { "defaultMode": "auto" },
  "autoMode": {
    "allow": ["*"],
    "soft_deny": ["Read(./notes)"]
  }
}

Safe alternative

Keep the built-in classifier baseline and add only narrow, specific rules:

{
  "autoMode": {
    "allow": ["$defaults", "Bash(npm test:*)"],
    "soft_deny": ["$defaults", "Read(./secrets/**)"]
  }
}

References

Documentation for cfgaudit 1.18.1. Source of this page · Rule implementation