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.py file uses subprocess.run to invoke the ast-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.py script).
  • 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, and fd. These are well-known developer utilities hosted on public GitHub repositories and are used for legitimate code processing tasks.
Audit Metadata
Risk Level
SAFE
Analyzed
Jun 27, 2026, 10:54 PM
Security Audit — agent-trust-hub — bash-shortening