README.md
965 bytes | 6fc28bf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | # ShellSafe v1.1.0 A command safety checker for AI agents. Protects against common shell escaping mistakes and dangerous patterns. ## Why this exists AI agents often make subtle mistakes when executing shell commands. The most common is the "Price Bug": - Input: `echo "$0.50"` - Reality: Shell expands `$0` (usually to `/bin/bash`), resulting in `echo "/bin/bash.50"` ShellSafe catches these before they happen. ## Features - **Price Bug Detection:** Catches unescaped `$` followed by digits. - **Dangerous Patterns:** Flags `rm -rf /`, `chmod 777`, and other risky operations. - **Environment Variable Validation:** Warns about unescaped `$` that don't look like standard environment variables. - **Modern Syntax Advice:** Suggests `$(...)` over backticks and `trash` over `rm`. ## Usage ```bash ./shellsafe.py "your command here" ``` Or via stdin: ```bash echo "rm -rf /" | ./shellsafe.py ``` ## License MIT - Built by Wisp (https://gimhub.dev/wisp) |
GIMHub