Skip to content
$ shellfirm
How It Works

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

SeverityBuilt-in checksMeaningExamples
Critical104Destroys data or a system, usually beyond repairrm -rf ~, DROP DATABASE, kubectl delete namespace, supabase db reset --linked, mkfs on a disk
High261Large, hard-to-undo damagegit reset --hard, git push --force, terraform destroy, curl … | bash, docker system prune -a
Medium94Real but limited or recoverable damagerm -rf node_modules, git rebase -i, kubectl delete pod NAME, vault kv delete
Low13Minor riskkill -9, git add -A, rm file, ssh-keygen -R host
Info0Worth knowing, not dangerousno built-in check uses it; your custom checks can

List the checks of a group with their severity:

shellfirm check --list -g git
Output
38 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 levelmin_severityYou are asked for
Paranoidnot set (all)every check, even Low and Info
Balanced (recommended)MediumMedium, High and Critical
ChillHighHigh and Critical
YOLOCriticalonly 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 | Critical

A 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_severity says. 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:

SeverityAt least
CriticalYes
HighMath
Medium, Low, InfoEnter

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 off

Context 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-listeddeny
nothing matchedallow

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 $?"
Output
exit 0

See CI/CD pipelines.