Skip to content
$ shellfirm

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

GroupChecksWhat it coversPage
fs73Deletes and moves (whole home folders included), permissions, credentials, disks and partitionsFilesystem
git38Force pushes, resets, cleans, history rewrites, remote branch deletesGit
github16gh repository, release, secret, workflow and API deletes and settingsGitHub
docker18Prunes, volume and image removal, privileged containers, host mountsDocker
kubernetes37kubectl, Helm, helmfile, Argo CD, Flux, Istio, Cilium, Velero, etcd, kubeadmKubernetes
aws29S3, EC2, RDS, IAM, KMS, EKS, Lambda, DynamoDB and moreAWS
azure11Resource groups, VMs, AKS, SQL, storage, Key VaultAzure and GCP
gcp17Projects, GKE, Cloud SQL, storage, BigQuery, Spanner, Firebase projectsAzure and GCP
terraform28Terraform / OpenTofu / Terragrunt, Pulumi, Vault, Consul, NomadTerraform and HashiCorp
database81SQL statements, migration and ORM resets, hosted databasesDatabases
psql13PostgreSQL tools: psql, dropdb, pg_restore --clean, PatroniDatabases
mysql7MySQL tools: mysqladmin drop, binary logs, safe updatesDatabases
mongodb16mongosh drops and bulk deletes, mongorestore --dropDatabases
redis19FLUSHALL, FLUSHDB, shutdown, cluster reset, scripted deletesDatabases
heroku23Heroku apps, dynos, add-ons, Postgres, plus RailwayHosting platforms
vercel9Deployments, projects, env vars, domains, aliases, DNS records, Blob storage, teams, integrationsHosting platforms
netlify3Sites and env varsHosting platforms
flyio4Apps, volumes, Postgres, secretsHosting platforms
npm4Unpublishing and deprecating packages (npm, yarn, pnpm)npm
base33Machine and process control: reboot, kill, cron, systemd, users, SSH agent, shell history, system logsSystem and network
network22Firewalls, routes, interfaces, reverse shells, HTTP DELETE and GraphQL delete mutationsSystem and network
shell15Remote scripts run in a shell or an inline interpreter (curl … | bash, python3 -c "exec(urlopen(…))"), hidden payloadsRemote scripts and exfiltration
exfil16Reading, listing, printing or searching for secrets, keychain dumps; sending credentials, environment variables, secret variables or shell history to the networkRemote 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

SeverityChecks
Critical116
High293
Medium110
Low13
Total532

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 prefixBelongs to groupWhat it holds
fs-strict:*fsBroad catch-alls such as any recursive delete (fs-strict:recursive_deletion, Medium)
git-strict:*gitLow-severity everyday operations (git add -A, git commit -a, tags)
kubernetes-strict:*kubernetesAny delete, set, scale or rollout of a resource
helm:*kuberneteshelm uninstall, helm rollback, helm upgrade --force
process:*, ssh:*, systemd:*baseKilling 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 group
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.
  ...

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 " and rm -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 apply and terraform apply <<< yes answer 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; done no longer matches fs:shred: the words of a for … in / select … in list 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 false and config set agent.self_protection false from 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), --stdin with {"command": ""} exits 1, and MCP check_command with 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 c shows 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_glob matches everything in a home folder or a folder one level down (rm -rf ~/Documents/*, ~/projects/webapp/*); a deeper folder is left to fs-strict:recursive_deletion, and emptying ~/.cache, ~/.Trash, ~/Library/Caches or ~/.npm/_logs is 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-bundled NEXT_PUBLIC_*, EXPO_PUBLIC_*, VITE_*, REACT_APP_*, unless the name also says secret, password or private) are not matched; du -a ~/.ssh, stat ~/.ssh/* and file ~/.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 DELETE with 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 after mutation counts. Relationship edits such as removeLabelsFromLabelable are not matched. See System and network.
  • Hosting and repository settings: railway variables delete, railway environment delete and 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 unset and supabase 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) and vercel integration remove (vercel:integration_remove) are High. gh workflow disable (github:workflow_disable), gh secret set NAME < /dev/null and gh secret|variable set NAME --body "" (github:secret_set_empty), gh api -X DELETE repos/OWNER/REPO/hooks/ID (github:api_delete_webhook) and supabase db push to the linked project or a database URL (database:supabase_db_push_remote; --local and --dry-run are not matched) are Medium. heroku:railway_delete now matches only railway 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), and ufw --force disable is Critical like ufw 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 the perl / php equivalents are High (shell:interpreter_remote_exec), like curl … | python3. Also through builtins.exec(…) or getattr(__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) or git rm -r .github/hooks is High (fs:move_agent_settings_dir). gh api -X PATCH repos/OWNER/REPO -f archived=true is 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/.ssh with HOME=/var/lib/jenkins) like its ~/… form, and tar --remove-files / gtar / 7z a -sdel like zip -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 as lo_unlink, pg_file_write or dblink_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|edit of a secret file matches exfil:upload_secret_file, and lvreduce matches fs: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, or sudo keeps the prompt.
    • chmod 600 .env is not asked.
    • git: merge --no-ff, cherry-pick <commit>, stash pop, worktree add, rebase --continue, submodule update --init and tag -a -m are routine. --abort, --skip, stash drop, worktree remove and worktree add -B still 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 --clean without -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 grep pattern) no longer asks. See Agent decisions.

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), MySQL DELETE 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 -C and wrangler d1 execute --remote --command is 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: mkfs with any options, dd of=, fdisk, sgdisk --zap-all, blkdiscard and mdadm --zero-superblock on every block-device name, including cloud disks such as /dev/xvdf and /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 shell group (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, PowerShell Remove-Item -Recurse on a drive, the user profiles or the Windows directory (also piped from Get-ChildItem), format D:, deleting shadow copies (Critical); turning Defender off and PowerShell download-and-run (irm … | iex) (High).
  • macOS and disks: diskutil eraseDisk and /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

SeverityTypical examplesDefault challenge
Criticalrm -rf ~, DROP DATABASE, terraform destroy -auto-approve, mkfsYes
Highgit push --force, git reset --hard, helm uninstall, curl … | bashMath
Mediumrm -rf build, kubectl delete pod, vault kv deleteMath (your challenge setting)
Lowkill -9, git add -AMath (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.