bash-script-validator
Fail
Audited by Socket on Mar 4, 2026
1 alert found:
Obfuscated FileObfuscated Fileexamples/bad-bash.sh
HIGHObfuscated FileHIGH
examples/bad-bash.sh
This script is unsafe and should not be run without remediation. Primary risks: arbitrary command execution via eval $user_command and unconditional rm -rf * after cd, both of which can be triggered by attacker-controlled inputs or by errors (cd failing). The script also contains multiple systemic problems (unquoted variables, missing safety flags, broken invocation) that make behavior unpredictable and dangerous. Treat this as a high-severity unsafe artifact that requires removing eval, guarding or deleting destructive commands, quoting and validating all external inputs, adding proper error handling, and fixing function invocation order before any use.
Confidence: 98%
Audit Metadata