bash-shortening
Pass
Audited by Gen Agent Trust Hub on Jun 27, 2026
Risk Level: SAFECOMMAND_EXECUTIONPROMPT_INJECTIONEXTERNAL_DOWNLOADS
Full Analysis
- [COMMAND_EXECUTION]: The
scripts/engine.pyfile usessubprocess.runto invoke theast-grep(sg) tool. This is used for structural analysis of the code. The parameters passed to the tool are derived from internal rule definitions and validated against a set of known IDs, which prevents arbitrary command injection. - [PROMPT_INJECTION]: The skill has a surface for indirect prompt injection as it processes user-provided Bash scripts.
- Ingestion points: User-provided Bash scripts are read into the agent's context for analysis and refactoring (as described in
SKILL.md). - Boundary markers: Present. The skill employs a structured workflow using markdown lists for reporting and manual verification steps.
- Capability inventory: The skill can read/write files and execute subprocesses (via the
scripts/bash-shorten.pyscript). - Sanitization: The automated rewriter uses structural parsing (ast-grep), which validates Bash syntax but does not filter natural language instructions embedded within comments or strings.
- [EXTERNAL_DOWNLOADS]: The documentation references external open-source tools including
ast-grep,sd,ripgrep, andfd. These are well-known developer utilities hosted on public GitHub repositories and are used for legitimate code processing tasks.
Audit Metadata