code-format

Fail

Audited by Gen Agent Trust Hub on Mar 1, 2026

Risk Level: CRITICALREMOTE_CODE_EXECUTIONCOMMAND_EXECUTION
Full Analysis
  • [REMOTE_CODE_EXECUTION]: The format-code.sh script executes dynamically generated Python code that incorporates untrusted user input without sanitization. In the format_python, format_yaml, format_js, and format_sql functions, the input code is interpolated directly into a triple-quoted Python string (e.g., input_code = """$input"""). This allows an attacker to terminate the string and execute arbitrary Python commands on the host system.\n- [COMMAND_EXECUTION]: The validate-code.sh script is vulnerable to shell command injection. In the validate_shell function, user-provided input is expanded within a double-quoted string when passed to echo. If the input contains command substitutions like $(...), the shell will execute them before the validation process begins. Additionally, the format_json function in format-code.sh uses a here-string (<<< "$input") which is also subject to shell expansion, allowing command execution.
Recommendations
  • AI detected serious security threats
Audit Metadata
Risk Level
CRITICAL
Analyzed
Mar 1, 2026, 05:10 AM