Severity levels
The five severities, the protection levels that set min_severity, and how severity raises the challenge.
Every check has a severity. It decides three things: whether you are asked at all (min_severity), how hard the challenge is, and what an AI agent hook answers.
The five levels
| Severity | Built-in checks | Meaning | Examples |
|---|---|---|---|
| Critical | 104 | Destroys data or a system, usually beyond repair | rm -rf ~, DROP DATABASE, kubectl delete namespace, supabase db reset --linked, mkfs on a disk |
| High | 261 | Large, hard-to-undo damage | git reset --hard, git push --force, terraform destroy, curl … | bash, docker system prune -a |
| Medium | 94 | Real but limited or recoverable damage | rm -rf node_modules, git rebase -i, kubectl delete pod NAME, vault kv delete |
| Low | 13 | Minor risk | kill -9, git add -A, rm file, ssh-keygen -R host |
| Info | 0 | Worth knowing, not dangerous | no built-in check uses it; your custom checks can |
List the checks of a group with their severity:
shellfirm check --list -g git38 active check(s) (groups: git):
git:reset git HIGH This discards all uncommitted changes in your working tree.
git:delete_all git HIGH This deletes all tracked files from the working tree.
git:clean_force git HIGH This permanently deletes untracked files (and directories with -d). Git cannot restore them.
git:force_push git HIGH This force-pushes and can overwrite remote history.
git:interactive_rebase git MEDIUM This starts an interactive rebase, which rewrites commit history.Of the 532 built-in checks, 116 are Critical, 293 High, 110 Medium and 13 Low (see Protection coverage). The full list is in the check catalogue on GitHub.
Protection levels (min_severity)
min_severity hides checks below a level. shellfirm init asks for it as a protection level:
| Protection level | min_severity | You are asked for |
|---|---|---|
| Paranoid | not set (all) | every check, even Low and Info |
| Balanced (recommended) | Medium | Medium, High and Critical |
| Chill | High | High and Critical |
| YOLO | Critical | only Critical |
shellfirm init --yes sets Balanced when your settings do not choose a level. Without a settings file the default is all severities.
shellfirm config severity Medium # all | Info | Low | Medium | High | CriticalA check below min_severity does not prompt in the shell. It is still logged as Skipped in the audit log, and shellfirm check lists it under "Not applied" as below your min_severity.
What min_severity cannot hide
- A recursive delete of a folder with uncommitted or untracked work is High, so Balanced and Chill still ask. See Uncommitted work.
- A check that a project or org policy enforces stays active whatever your
min_severitysays. See Team policies. - Your deny list and policy deny lists always block.
Severity raises the challenge
Your challenge setting is the minimum. Severity escalation raises it:
| Severity | At least |
|---|---|
| Critical | Yes |
| High | Math |
| Medium, Low, Info | Enter |
So with challenge: Enter, git reset --hard (High) asks for Math, and rm -rf ~ (Critical) asks you to type yes. Change the table:
shellfirm config escalation severity --critical Yes --high Yes --medium Enter
shellfirm config escalation severity --enabled false # turn severity escalation offContext and policies can raise it further. See Challenges.
Severity and AI agents
Agent hooks and MCP do not show a challenge. They answer from the severity:
| Matched severity (after context escalation) | Agent decision |
|---|---|
below agent.auto_deny_severity (default High) | ask |
| at or above it, or deny-listed | deny |
| nothing matched | allow |
A Critical production context (root, a production Kubernetes context, production environment variables) raises the matched severity by one level for agents. See Agent decisions.
Severity in CI
shellfirm check --fail-on <severity> exits non-zero only when a match is at least that severity (deny-listed commands exit 11 whatever --fail-on says, or 78 with --strict when the configuration has problems):
shellfirm check -c 'git reset --hard' --fail-on critical; echo "exit $?"exit 0See CI/CD pipelines.