Skip to content

Bash Patterns Reference ​

Default patterns used by the bash command classifier. There are 60+ safe patterns and 40+ dangerous patterns built in.

Safe patterns (auto-allow) ​

Commands matching these patterns are allowed without HITL approval.

File viewing ​

PatternCommands
cat, head, tail, less, moreView file contents
file, stat, wc, md5sum, sha256sumFile metadata
basename, dirname, realpath, readlinkPath resolution
xxd, od, hexdumpBinary inspection
strings, nm, objdumpBinary analysis

Directory listing ​

PatternCommands
ls, ll, la, tree, du, dfDirectory listing and disk usage
pwd, cdNavigation

Searching ​

PatternCommands
grep, rg, ag, ackContent search
find, fd, locateFile search
which, whereis, type, commandCommand lookup

Text processing (read-only) ​

PatternCommands
sort, uniq, cut, awk, sedText manipulation (sed without -i)
tr, diff, comm, join, pasteText comparison/transformation
jq, yq, xmlstarletStructured data queries
fmt, fold, column, expand, unexpandFormatting
tac, rev, nlLine manipulation
yes, seq, shufGenerators
xargs, teePipeline utilities

Git (read-only) ​

PatternCommands
git log, git status, git diff, git showHistory/state
git blame, git branch, git tag, git remoteReferences
git stash list, git ls-files, git ls-treeListing
git rev-parse, git describe, git shortlogMetadata
git config --get, git config -l, git reflogConfiguration (read)
git cat-file, git count-objects, git fsckLow-level

System info ​

PatternCommands
whoami, id, groups, uname, hostnameUser/system info
date, uptime, env, printenvEnvironment
echo, printfOutput
lsof, ps, top, htop, vmstat, iostat, freeProcess/resource
lscpu, lsblk, lsusb, lspciHardware info
nproc, getconfSystem configuration

Package info (not install) ​

PatternCommands
npm list, npm info, npm outdated, npm auditnpm
yarn list, yarn infoyarn
pnpm list, pnpm infopnpm
pip list, pip show, pip freezepip
node --version, python --version, ruby --versionVersions
node -e, python -e, ruby -eInline evaluation

Networking (read-only) ​

PatternCommands
ping, dig, nslookup, hostDNS/connectivity
traceroute, tracepathRoute tracing
curl --head, curl -IHTTP HEAD requests only

Dangerous patterns (always block) ​

Commands matching these patterns are blocked regardless of role or mode.

Destructive file operations ​

PatternWhat it catches
rm -rf, rm -f, rm --recursive --forceRecursive/forced deletion
shredSecure file destruction

Privilege escalation ​

PatternWhat it catches
sudoSuperuser execution
su -Switch user
doasOpenBSD privilege escalation

Permission/ownership changes ​

PatternWhat it catches
chmodPermission changes
chown, chgrpOwnership changes

Disk/partition operations ​

PatternWhat it catches
dd ... of=Raw disk writes
mkfsFilesystem creation
fdisk, partedPartition editing
mount, umountMount operations

Remote code execution ​

PatternWhat it catches
curl ... | bash/sh/pythonPipe-to-shell attacks
wget ... | bash/sh/pythonPipe-to-shell attacks
curl ... > *.sh && ...Download-and-execute

Remote access ​

PatternWhat it catches
sshRemote shell
scpRemote file copy
rsync ...:/Remote sync
nc -l, ncat, socatNetwork listeners
telnetUnencrypted remote access

System modification ​

PatternWhat it catches
systemctl start/stop/restart/enable/disableService management
service ... start/stop/restartLegacy service management
iptables, ufw, firewall-cmdFirewall modification

Package installation ​

PatternWhat it catches
npm install, npm i, npm add, npm cinpm
yarn add, yarn installyarn
pnpm add, pnpm installpnpm
pip installpip
apt install, apt-get installapt
brew installHomebrew
cargo installRust

Environment variable manipulation ​

PatternWhat it catches
export ...KEY/TOKEN/SECRET/PASSWORDSecret exposure

Cron / scheduled tasks ​

PatternWhat it catches
crontabCron job editing
atScheduled execution

Container operations ​

PatternWhat it catches
docker run/exec/build/push/pullDocker operations
kubectl exec/run/apply/deleteKubernetes operations

Process manipulation ​

PatternWhat it catches
kill, killall, pkillProcess termination

History manipulation ​

PatternWhat it catches
history -cClear command history
unset HISTFILEDisable history logging

Build/compile ​

PatternWhat it catches
makeBuild system execution
gcc, g++Compiler execution

needs_review ​

Any command not matching a safe or dangerous pattern falls into needs_review. In supervised mode, these are routed to HITL approval. In autonomous mode, they are allowed. In dry-run mode, they are blocked.

Released under the Apache-2.0 License.