Security tools

Shell Command Risk Explainer

Paste a bash or zsh command to see what each part does and how risky it is, before you run it. Static analysis in your browser: the command is never run.

Guide: Is This Shell Command Safe? How to Check Before Running

Static analysis only. The command is read as text on your device. It is never run, links in it are never opened, and it is not uploaded, stored or put in the URL. The tool cannot know the value of variables, your aliases or the folder you will run it in, so treat the result as a second pair of eyes, not a guarantee.
Ready. Paste a shell command to explain. It is never run.

What it does

Paste a shell command or a short script and the tool splits it into its commands, explains each command, flag and argument in plain English, and rates the risk as Info, Caution or Danger with the exact reason. It also lists the files, network addresses and processes the command may touch, and suggests a safer way to do the same thing.

What it checks

  • Parsing: quotes and escapes, pipes, &&, ||, ;, background &, subshells and $( ) or backticks, redirects, here-strings and here-documents, variable assignments in front of a command, and line continuations. Text inside quotes is treated as text, not as a command.
  • About 110 commands with their common flags, among them rm, mv, cp, dd, mkfs, chmod, chown, find (-delete and -exec), xargs, tar, curl, wget, sudo, su, ssh, scp, rsync, git, docker, kubectl, npm, pip, systemctl, iptables, crontab, eval, source, export, shred and truncate.
  • Danger rules such as recursive delete of /, ~, $HOME, * or a variable that could be empty, a download piped into a shell, chmod -R 777, dd or a redirect to a disk device, formatting a disk, a fork bomb, a reverse shell, and sudo combined with any of these.
  • Caution rules for actions that are hard to undo or that widen access, such as git push --force, git reset --hard, docker run --privileged, mounting / into a container, kubectl delete, unpinned or URL installs, global installs, --force flags, firewall and service changes, and exporting what looks like a secret.

What it cannot catch

  • The value of a variable, an alias or a shell function, and the folder you run the command in. A command such as rm -rf $DIR/ is flagged because $DIR could be empty, not because it is.
  • What a script, a program or a downloaded file does once it runs. The tool never fetches anything, so it cannot tell whether a URL is safe.
  • Commands it does not know. They are shown but only get generic notes, so an unknown command is not proof of safety.
  • Unusual shell syntax, other shells (fish, PowerShell, Windows cmd) and very large scripts. A parse note appears when the text looks incomplete.
  • A result of Info or Caution does not mean the command is safe. It means none of the built-in Danger rules matched.

Limits

Text up to 100,000 characters is analyzed in the page, usually in a few milliseconds. The breakdown lists the first 300 commands, and the overall risk covers all of them.

Example

Take this command, which is a common pattern in installation instructions:

curl -fsSL https://example.com/install.sh | sudo bash && rm -rf $BUILD_DIR/*

The overall risk is Danger. Three findings explain why:

  • Danger: the network is piped into bash. Output from curl is run as it arrives, so nothing is read or checked first. If the address, the server or the connection is compromised, the attacker’s commands run as root.
  • Danger: recursive delete of a path that may collapse to the root. $BUILD_DIR/* depends on a variable. If it is empty or unset, the path becomes /*, the root of the system, and rm -r deletes everything below it with no undo.
  • Caution: sudo runs the next command as root, and no permission check will stop a mistake.

Below the findings, an annotated breakdown explains each part, for example -fsSL: fail on HTTP errors, hide progress, show errors and follow redirects.

Safer habits

  • Download the script first, read it, and only then run it.
  • Guard variables in destructive commands with "${BUILD_DIR:?}"/*, which stops the command when the variable is empty or unset.
  • Run unfamiliar commands without sudo first, or in a disposable container or virtual machine.

Frequently asked questions

Does the tool run my command?

No. It is static analysis only. The command is read as text, links in it are never opened, and it is not uploaded, stored or put in the URL.

Can it tell me a command is safe?

No. It cannot know the value of variables, your aliases or the folder you will run it in. Treat the result as a second pair of eyes, not a guarantee.

Which shells does it understand?

Bash and zsh syntax.

Privacy

This tool runs entirely in your browser. What you enter is processed on your device and is not sent to a server. The page does not write your input to local storage, cookies or the URL, and it does not run the command or open any link in it.

Share this tool

Your data is not included in this link.