Protection Coverage
532 built-in checks in 23 groups, all on by default. What each group covers and how to explore the checks yourself.
shellfirm ships with 532 built-in checks in 23 check groups. Every group is enabled by default, so a fresh install protects filesystems, git, containers, clusters, clouds, databases and hosting platforms without any setup.
A check has an id (group:name, for example git:force_push), a severity, a description and often a safer alternative. When a command matches a check, shellfirm shows a challenge in your terminal, or answers an AI agent with ask or deny.
Groups
| Group | Checks | What it covers | Page |
|---|---|---|---|
fs | 73 | Deletes and moves (whole home folders included), permissions, credentials, disks and partitions | Filesystem |
git | 38 | Force pushes, resets, cleans, history rewrites, remote branch deletes | Git |
github | 16 | gh repository, release, secret, workflow and API deletes and settings | GitHub |
docker | 18 | Prunes, volume and image removal, privileged containers, host mounts | Docker |
kubernetes | 37 | kubectl, Helm, helmfile, Argo CD, Flux, Istio, Cilium, Velero, etcd, kubeadm | Kubernetes |
aws | 29 | S3, EC2, RDS, IAM, KMS, EKS, Lambda, DynamoDB and more | AWS |
azure | 11 | Resource groups, VMs, AKS, SQL, storage, Key Vault | Azure and GCP |
gcp | 17 | Projects, GKE, Cloud SQL, storage, BigQuery, Spanner, Firebase projects | Azure and GCP |
terraform | 28 | Terraform / OpenTofu / Terragrunt, Pulumi, Vault, Consul, Nomad | Terraform and HashiCorp |
database | 81 | SQL statements, migration and ORM resets, hosted databases | Databases |
psql | 13 | PostgreSQL tools: psql, dropdb, pg_restore --clean, Patroni | Databases |
mysql | 7 | MySQL tools: mysqladmin drop, binary logs, safe updates | Databases |
mongodb | 16 | mongosh drops and bulk deletes, mongorestore --drop | Databases |
redis | 19 | FLUSHALL, FLUSHDB, shutdown, cluster reset, scripted deletes | Databases |
heroku | 23 | Heroku apps, dynos, add-ons, Postgres, plus Railway | Hosting platforms |
vercel | 9 | Deployments, projects, env vars, domains, aliases, DNS records, Blob storage, teams, integrations | Hosting platforms |
netlify | 3 | Sites and env vars | Hosting platforms |
flyio | 4 | Apps, volumes, Postgres, secrets | Hosting platforms |
npm | 4 | Unpublishing and deprecating packages (npm, yarn, pnpm) | npm |
base | 33 | Machine and process control: reboot, kill, cron, systemd, users, SSH agent, shell history, system logs | System and network |
network | 22 | Firewalls, routes, interfaces, reverse shells, HTTP DELETE and GraphQL delete mutations | System and network |
shell | 15 | Remote scripts run in a shell or an inline interpreter (curl … | bash, python3 -c "exec(urlopen(…))"), hidden payloads | Remote scripts and exfiltration |
exfil | 16 | Reading, listing, printing or searching for secrets, keychain dumps; sending credentials, environment variables, secret variables or shell history to the network | Remote scripts and exfiltration |
The full list of every check, with its description and alternative, is the generated check catalogue on GitHub. The tables on the group pages are built from it.
By severity
| Severity | Checks |
|---|---|
| Critical | 116 |
| High | 293 |
| Medium | 110 |
| Low | 13 |
| Total | 532 |
Counted from shellfirm check --list --all. 16 of the 532 are broad
catch-alls or everyday operations under a strict prefix (fs-strict:* 4,
git-strict:* 6, kubernetes-strict:* 6), for example any recursive delete
(fs-strict:recursive_deletion, Medium) or git add -A (Low). The rest target
one specific risky command each.
Id prefixes inside a group
Some groups hold stricter checks under their own id prefix. The prefix is not a separate group: you enable, disable or ignore them through the group that owns them.
| Id prefix | Belongs to group | What it holds |
|---|---|---|
fs-strict:* | fs | Broad catch-alls such as any recursive delete (fs-strict:recursive_deletion, Medium) |
git-strict:* | git | Low-severity everyday operations (git add -A, git commit -a, tags) |
kubernetes-strict:* | kubernetes | Any delete, set, scale or rollout of a resource |
helm:* | kubernetes | helm uninstall, helm rollback, helm upgrade --force |
process:*, ssh:*, systemd:* | base | Killing processes, SSH agent and known_hosts, systemd services |
Explore the checks yourself
List every active check, or the checks of one group:
shellfirm check --list # active checks
shellfirm check --list --all # include checks from disabled groups
shellfirm check --list -g git # one group38 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.
...Ask what shellfirm would do with a command, without running it:
shellfirm check -c 'git push origin main --force'The report names every matched check, the blast radius, the safe alternative, and what the shell hook and an AI agent hook would do. See shellfirm check.
Turn groups on or off
shellfirm config groups # list every group and whether it is active
shellfirm config groups --disable heroku # stop checking a group
shellfirm config groups --enable heroku # turn it back on
shellfirm config groups --pick # interactive checklist (needs a terminal)Only the change is written to your settings file (disabled_groups: [heroku]), so groups added by a later release are still enabled for you. To silence one check instead of a whole group, use shellfirm config ignore <id>. A project policy can require checks that your personal settings cannot turn off. See Check groups.
What is new in 0.4.3
0.4.3 is a bug-fix release. The catalogue has 532 checks.
- Home directory deletes: whitespace quoted around a critical target no longer lowers the delete to Medium:
rm -rf "$HOME "andrm -rf " / "are Critical (fs:recursively_delete). An inline script that deletes the home directory itself (python3 -c 'shutil.rmtree(os.path.expanduser("~"))',node -e 'fs.rmSync(os.homedir(), …)',ruby -e 'FileUtils.rm_rf(Dir.home)',perl -e 'remove_tree($ENV{HOME})') is Critical (fs:interpreter_delete_home); a folder inside the home directory stays Medium. See Filesystem. - Piped Terraform approvals:
yes | terraform apply,echo yes | tofu destroy,printf 'yes\n' | terragrunt applyandterraform apply <<< yesanswer Terraform's own prompt, so they are Critical like-auto-approve(terraform:piped_yes_approve). See Terraform and HashiCorp. - Loop lists are data:
for k in shred wipe; do grep -- "$k" f; doneno longer matchesfs:shred: the words of afor … in/select … inlist are not commands. The loop body is still checked, and so are list words that run (do $k, output piped into a shell). - AI agents cannot turn off the audit log:
shellfirm config set audit_enabled falseandconfig set agent.self_protection falsefrom an agent are denied (shellfirm-self:protection_off,deny_reason: self_protection) instead of asked. See Agent decisions. - Empty commands:
shellfirm check -c ""(or only whitespace) is a usage error (exit 2),--stdinwith{"command": ""}exits 1, and MCPcheck_commandwith an empty command returns an error, so a CI step that checks an unset variable no longer passes. See Exit codes. - Several namespaces:
kubectl delete ns a b cshows every namespace being deleted (namespace=a,b,c) and checks each one against the production patterns. See Kubernetes.
What is new in 0.4.2
The catalogue has 530 checks.
- Whole home folders: recursively deleting a well-known folder of a home directory by name (
rm -rf ~/Documents,~/Projects,~/Library,~/.config,~/.ssh,/home/bob/Documents) is High (fs:delete_home_folder), whether or not the folder exists where shellfirm runs. A file or folder inside one (~/Documents/old.txt,~/Projects/app/dist) is not matched. Moving one into a temporary folder (mv ~/Projects /tmp/x,mv -t /tmp ~/Projects,mv --target=/tmp ~/Projects,rsync --remove-source-files ~/Documents /tmp/x) is High (fs:move_home_folder).fs:recursive_delete_home_globmatches everything in a home folder or a folder one level down (rm -rf ~/Documents/*,~/projects/webapp/*); a deeper folder is left tofs-strict:recursive_deletion, and emptying~/.cache,~/.Trash,~/Library/Cachesor~/.npm/_logsis not matched. See Filesystem. - Secrets an AI agent can see: listing a credential or wallet folder (
ls -la ~/.ssh,tree ~/.gnupg) and printing a secret environment variable (echo $GITHUB_TOKEN,env | grep -i token,${GITHUB_TOKEN:0:8}) are Medium (exfil:list_secret_dir,exfil:print_secret_env); commands that show no file names (ls -ld ~/.ssh,stat,du -sh) and names that hold a count or a public value (MAX_TOKENS,SUPABASE_ANON_KEY, browser-bundledNEXT_PUBLIC_*,EXPO_PUBLIC_*,VITE_*,REACT_APP_*, unless the name also says secret, password or private) are not matched;du -a ~/.ssh,stat ~/.ssh/*andfile ~/.ssh/*list the folder too. Reading the login file of a hosting CLI (Railway, Supabase, Vercel, Netlify, Fly.io) is Medium (exfil:read_secret_file), and so is printing every variable of a service (railway variables,vercel env pull --environment=production,exfil:print_token). Printing macOS keychain passwords (security find-generic-password -w,dump-keychain), sending shell history to the network (history | curl -d @- …) and piping a secret variable into a network client as the request body (echo $GITHUB_TOKEN | curl -d @- …) are High (exfil:keychain_dump,exfil:history_to_network,exfil:secret_env_to_network). See Remote scripts and exfiltration. - Destructive API calls: an HTTP
DELETEwith credentials on the line (curl -X DELETE -H "Authorization: …",http -a user:pw DELETE …,xh --bearer T DELETE …) is High (network:http_delete_authenticated), without credentials Medium (network:http_delete). A local development server (localhost,127.0.0.1,[::1],*.localhost,host.docker.internal) is not matched, unless the path starts with_or holds a*(localhost:9200/_all). A GraphQL mutation with a top-level field that deletes or archives something (volumeDelete(…),deleteRepository(…),delete_users(…),archiveRepository(…)) is High (network:graphql_destructive_mutation); string literals are stepped over, and when a string or bracket is left open every name aftermutationcounts. Relationship edits such asremoveLabelsFromLabelableare not matched. See System and network. - Hosting and repository settings:
railway variables delete,railway environment deleteand other single Railway resources (heroku:railway_resource_delete),vercel alias rm,vercel dns rm,vercel blob del(vercel:alias_remove,vercel:dns_remove,vercel:blob_delete),supabase functions delete,supabase secrets unsetandsupabase storage rm(database:supabase_remote_delete),gh api … -f visibility=public(github:api_make_public), turning Actions off through the API (github:api_disable_actions),vercel teams rm(vercel:team_remove) andvercel integration remove(vercel:integration_remove) are High.gh workflow disable(github:workflow_disable),gh secret set NAME < /dev/nullandgh secret|variable set NAME --body ""(github:secret_set_empty),gh api -X DELETE repos/OWNER/REPO/hooks/ID(github:api_delete_webhook) andsupabase db pushto the linked project or a database URL (database:supabase_db_push_remote;--localand--dry-runare not matched) are Medium.heroku:railway_deletenow matches onlyrailway delete/railway project delete. See Hosting platforms and GitHub. - Defense evasion: stopping the firewall service (
systemctl stop firewalld,pfctl -d) is High (network:stop_firewall), andufw --force disableis Critical likeufw disable. Turning shell history off (unset HISTFILE,set +o history) and deleting or emptying the history file (rm ~/.bash_history,> ~/.zsh_history) are Medium (base:disable_history,base:clear_history_file). Emptying system logs (truncate -s 0 /var/log/auth.log) is High (base:wipe_system_logs). - Inline code that runs a download:
python3 -c "exec(urlopen(URL).read())",node -e "… eval(d)",ruby -e "eval(Net::HTTP.get(…))"and theperl/phpequivalents are High (shell:interpreter_remote_exec), likecurl … | python3. Also throughbuiltins.exec(…)orgetattr(__builtins__, 'exec')(…); a method named eval (model.eval(),df.eval(…)) is not matched. - Hard links and agent folders: a hard link to a credential file, a shell startup file or a git hook (
ln ~/.bashrc x,link ~/.ssh/id_rsa k,cp -al ~/.ssh keys) is Medium (fs:hard_link_protected_file); symbolic links are not matched. Moving an AI agent's settings folder away (mv ~/.claude /tmp/old, also at$CLAUDE_CONFIG_DIR/$CODEX_HOME) orgit rm -r .github/hooksis High (fs:move_agent_settings_dir).gh api -X PATCH repos/OWNER/REPO -f archived=trueis High (github:repo_archive). Credential and startup-file paths are matched in any case (~/.SSH/id_rsa), an absolute path inside an unusual home directory (/var/lib/jenkins/.sshwithHOME=/var/lib/jenkins) like its~/…form, andtar --remove-files/gtar/7z a -sdellikezip -m(fs:zip_move).
What is new in 0.4.1
0.4.1 is a bug-fix release. The catalogue has 499 checks.
- New checks:
docker compose rm -v(docker:compose_rm_volumes), SQL that calls a function with a side effect such aslo_unlink,pg_file_writeordblink_exec(database:side_effect_function), and psql meta-commands that write a local file:\copy … TO FILE,\o,\w,\g(psql:client_file_write). - Wider checks:
gh gist create|editof a secret file matchesexfil:upload_secret_file, andlvreducematchesfs:lvm_operations. - Fewer false alarms:
- Deleting project dependency and tool caches (
rm -rf node_modules,__pycache__,.mypy_cache,.next,.venv) is not asked when every operand is one of them, written as a relative path. A home or absolute path, a variable, a symbolic link on the way, orsudokeeps the prompt. chmod 600 .envis not asked.- git:
merge --no-ff,cherry-pick <commit>,stash pop,worktree add,rebase --continue,submodule update --initandtag -a -mare routine.--abort,--skip,stash drop,worktree removeandworktree add -Bstill ask. - A dry run counts only when it really is one (
rsync -n,git push -n,docker compose --dry-run,helm uninstall --dry-run,zfs destroy -n,lvremove --test, and more). - Read-only forms are not asked:
parted /dev/sdX print,cryptsetup luksDump,pg_restore --cleanwithout-d. - AI-agent self-protection: a command that only carries shellfirm's settings, hook or config text as data (a script written to a scratch file, a commit message, a
greppattern) no longer asks. See Agent decisions.
- Deleting project dependency and tool caches (
What is new in 0.4.0
0.4.0 grew the catalogue to 496 entries. Among the additions:
- Databases: migration and ORM resets (Prisma, Rails, Django, Alembic / Flask, Knex, Sequelize, TypeORM, Drizzle, Ecto, Laravel Artisan, Doctrine, golang-migrate, goose, dbmate, Flyway, Liquibase, Atlas, sqitch,
dotnet ef), MySQLDELETE IGNORE/LOW_PRIORITY/QUICK,SET SQL_SAFE_UPDATES = 0, and scripted Redis deletes. - Hosted databases and platforms: Supabase, Firebase, Cloudflare D1 / KV / R2, Neon, PlanetScale, Turso and Railway. SQL run through
heroku run,heroku pg:psql --command,fly ssh console -Candwrangler d1 execute --remote --commandis checked as SQL. - Infrastructure:
terraform apply <planfile>, Vault, Consul and Nomad, Kubernetes node operations (kubectl debug node/…,kubectl taint … :NoExecute), Argo CD, Istio, Cilium and Velero. - Disks:
mkfswith any options,dd of=,fdisk,sgdisk --zap-all,blkdiscardandmdadm --zero-superblockon every block-device name, including cloud disks such as/dev/xvdfand/dev/nvme1n1. - git and GitHub:
git push --prune, force pushes whose target is only known when the line runs, and GitHub API deletes. - Security: reverse shells, credential exfiltration, lock-outs and remote scripts. The
shellgroup (curl … | bash) is now on by default. - Secrets an AI agent can see: reading a private key or credentials file, printing a live token (
gh auth token), and searching the home directory for keys (Medium: an agent is asked first). - Windows:
rd /s/del /s, PowerShellRemove-Item -Recurseon a drive, the user profiles or the Windows directory (also piped fromGet-ChildItem),format D:, deleting shadow copies (Critical); turning Defender off and PowerShell download-and-run (irm … | iex) (High). - macOS and disks:
diskutil eraseDiskand/dev/disk*devices in every disk check (Critical).
Some commands that 0.3.10 let through now ask first. See Upgrading from 0.3.10.
Missing a check?
Open an issue, or add the check yourself in a pull request: see Contributing. For a check only you or your team need, write a custom check or a project check; no code change is needed.
shellfirm reads the command line before it runs. It cannot see what a script or program does once it has started, and some risky commands have no check yet. For AI agents, shellfirm sandbox turns on the agent's own OS sandbox so no process it starts can read your credential files. See Known limitations.
Severity at a glance
| Severity | Typical examples | Default challenge |
|---|---|---|
| Critical | rm -rf ~, DROP DATABASE, terraform destroy -auto-approve, mkfs | Yes |
| High | git push --force, git reset --hard, helm uninstall, curl … | bash | Math |
| Medium | rm -rf build, kubectl delete pod, vault kv delete | Math (your challenge setting) |
| Low | kill -9, git add -A | Math (your challenge setting) |
The challenge is only ever raised, never lowered. Context such as a protected branch, a production cluster, SSH or root raises it further. AI agents are denied at High and above by default. See Severity levels and Context-aware protection.