cfgaudit

Rules

All 116 rules of cfgaudit 1.18.1, grouped by their category in the OWASP Top 10 for LLM Applications 2026. Severity error fails a scan, warn fails it only with --strict.

LLM01 Prompt Injection

Text the agent reads as trusted context tells it to do something else: override phrases, hidden Unicode, fake turn boundaries and concealment orders in CLAUDE.md, AGENTS.md, rules files, skills and commands.

RuleSeverityWhat it reports
CFG009warn/errorhook command interpolates a shell variable
CFG015warn/errorhook command contains shell substitution
CFG024errorinstruction file contains hidden Unicode control characters
CFG026error/warninstruction file contains instruction-bypass phrases
CFG030errorinstruction file instructs the agent to conceal its behavior
CFG032error/warninstruction file contains system-prompt control tokens or pseudo-system tags
CFG034warninstruction file contains Guidance/Jinja template syntax
CFG056warnskill/command/subagent has a broad/always-on invocation trigger
CFG057warnencoded/hidden payload in an instruction file
CFG080errorinstruction file hides a directive inside an HTML comment
CFG081errorinstruction file tells the agent to survive context compaction
CFG092errorcommitted Kimi agent file replaces the whole system prompt (override: true)
CFG113warn/erroran instruction file tells the agent to fetch remote text and follow it
CFG116warnan instruction file imports a file from outside the repository

LLM02 Sensitive Information Disclosure

Secrets and private files reach the model or leave the machine: credentials committed in settings and MCP configs, missing deny rules for .env and keys, commands that read credential files or send data to a remote host.

RuleSeverityWhat it reports
CFG005errorANTHROPIC_BASE_URL points to a non-Anthropic endpoint
CFG007errorhardcoded secret in env block
CFG012error/warnsettings.json structure does not match the official schema
CFG013warnlocal Claude files exist but are not excluded in .gitignore
CFG016error/infocredential helper defined in project-scoped settings
CFG021warnMCP server env routes traffic through a non-local proxy
CFG031error/warninstruction file references sensitive file paths
CFG033errorinstruction file contains a markdown image exfiltration pattern
CFG036error/warninstruction file embeds shell commands for auto-execution or exfiltration
CFG037errorcommand reads or copies SSH private keys
CFG038errorcommand dumps environment variables to the network
CFG041errorpermissions.deny does not restrict access to .env files
CFG042errorpermissions.deny does not restrict private key / certificate files
CFG043errorpermissions.deny does not restrict cloud provider credential files
CFG044errorpermissions.deny does not restrict SSH private keys
CFG046warn/error/infoOTEL exporter endpoint redirects telemetry off-host
CFG049error/warnremote MCP server URL points to a non-loopback host
CFG050errorhardcoded secret in an MCP server env or headers
CFG054warnhigh-entropy value that looks like a hardcoded secret
CFG058warnMCP server uses the deprecated sse transport
CFG065errorContinue config has a hardcoded inline apiKey
CFG068errortemplated credential forwarded to a cleartext / raw-IP MCP endpoint
CFG069warnHTTP-transport MCP server without log redaction
CFG071errormodel/provider base URL sends the API key over cleartext
CFG072errorDNS-channel exfiltration in a command
CFG073errorhardcoded cryptocurrency signing credential
CFG075errorMCP server disables TLS certificate verification (MITM kill switch)
CFG078errorcommand reads an OS credential store
CFG082warn/errorDocker daemon redirected off-host (DOCKER_HOST / docker -H)
CFG088error/warnhttp hook posts agent events to a remote endpoint
CFG097errorcommitted Gemini remote agent uses cleartext or carries a credential
CFG099error/warnqwen settings pick the agent's infrastructure
CFG112error/infoan MCP server sends a local file as its bearer token
CFG115warna committed config path is a symbolic link leaving the repository

LLM03 Excessive Agency

The agent can do more than the task needs without asking: unrestricted shell and write permissions, bypass and YOLO modes, auto-approved MCP servers, hooks that run on every session, instructions not to ask for confirmation.

RuleSeverityWhat it reports
CFG001errorpermissions.allow contains unrestricted Bash pattern
CFG002warnpermissions.allow contains unrestricted file-write pattern
CFG003errorenableAllProjectMcpServers: true
CFG004error/warn/infodefaultMode set to bypassPermissions or auto
CFG006warnpermissions.deny is absent or empty
CFG008errorhook command contains reverse-shell pattern
CFG011warnMCP server alwaysAllow is too broad
CFG017errorMCP server sets dangerouslyAllowBrowser: true
CFG018warnMCP server binds to all network interfaces (NeighborJack)
CFG019errorMCP server command is an inline-script interpreter
CFG020errorMCP server env injects code at process startup
CFG022error/warnsandbox config weakens or hijacks the execution sandbox
CFG023error/warnpermissions.allow grants a dangerous command with open-ended args
CFG025errorcustom organisation policy (require-deny / forbid-allow)
CFG027errorcommand installs a persistence mechanism
CFG028errorcommand writes to a Claude trust/config file
CFG029errorinstruction file instructs the agent to bypass permission prompts
CFG035error/warninstruction file instructs the agent to configure or trust an MCP server
CFG039warn/errorcommand contains recursive force-delete (rm -rf)
CFG040warnpermissions.allow contains unrestricted WebFetch
CFG045error/warn/infoShellCheck analysis of hook / helper commands
CFG047error/warna committed task file auto-runs a command
CFG048error/warn/info.vscode/settings.json blanket-auto-approves agent tools
CFG051error/warnskill/command/subagent grants overly broad allowed-tools
CFG053error/warnblanket MCP-trust settings beyond enableAllProjectMcpServers
CFG060errorGemini CLI auto-approves tool actions (defaultApprovalMode)
CFG061error/warnGemini CLI sandbox weakened (tools.sandbox*)
CFG063error/warnCodex CLI removes the human from the approval loop
CFG064error/warnCodex CLI sandbox disabled or widened
CFG066warn/errorMCP server env sets a wildcard CORS origin
CFG076error/warnMCP server exposes a broad filesystem root
CFG077errorcommand destroys an audit trail (anti-forensics)
CFG079error/warnautoMode weakens the auto-mode permission classifier
CFG083errorMCP server args carry a Chromium command-replacing launch switch
CFG085error/warnsubagent frontmatter weakens the permission mode
CFG087error/warncommitted agent hook auto-approves tool calls
CFG090warninstruction directs the agent to scan or enumerate an internal network
CFG091errorqwen-code auto-approves every tool call (tools.approvalMode: "yolo")
CFG093error/warncommitted .cursor/permissions.json allowlist auto-approves terminal commands or MCP tools
CFG094warncommitted .cursor/permissions.json autoRun.allow_instructions steers the auto-approval classifier
CFG095error/warncommitted .cursor/sandbox.json weakens the agent's execution sandbox
CFG096errorcommitted Gemini MCP server declared trust: true
CFG101warna deny rule constrains bundled short flags, which reordering walks past
CFG103error/warna committed Codex config turns off, blunts, or rewrites Guardian v2
CFG104warna committed Devin allow rule removes the approval prompt
CFG105warna committed OpenCode permission block removes one of the two remaining prompts
CFG106error/warna committed Codex config grants browser or desktop-application access
CFG107errora committed Codex config injects code into every spawned shell
CFG108error/infoa committed scheduled_tasks.json runs prompts on a timer
CFG109errora committed agent config file cannot be parsed
CFG110error/warn/infoa Claude Code settings env block injects code into every hook and Bash command
CFG111error/infoa permission rule or hook matcher holds an invisible character, so it does nothing

LLM04 Supply Chain

Code the agent runs can change under it: unpinned MCP packages and images, plugins and marketplaces controlled by a committed file, remote installers piped into a shell, skills that ask to run a downloaded archive.

RuleSeverityWhat it reports
CFG010warnMCP server uses an unpinned package or image version
CFG014errorhook command downloads and executes remote code (curl | sh)
CFG052warnMCP server name declared in multiple config sources
CFG055error/warncommitted settings enables a plugin or registers a marketplace
CFG059error/warnMCP server / hook package & endpoint typosquatting
CFG062warnGemini CLI allows unrestricted Git extensions (security.blockGitExtensions)
CFG067warnhooks defined in a project-scoped settings file
CFG070warnMCP server command is a repo-relative path
CFG074warnskills-lock.json pulls skill content from an unpinned source
CFG084warncontainer image trust verification disabled
CFG086errorcommitted agent hook runs on a zero-click event
CFG089warn/infoCopilot repository settings auto-install third-party plugins
CFG098error/warnmarketplace.json publishes a plugin nothing pins
CFG100warnGrok [plugins] turns plugins on or widens where they load from
CFG102warntwo committed skills claim the same name, and one is silently dropped
CFG114error/infocommitted agent plugin or extension code runs from the repository