inertia-rails-best-practices
Fail
Audited by Gen Agent Trust Hub on Sep 15, 2026
Risk Level: HIGHCOMMAND_EXECUTIONDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The script
scripts/setup.shis vulnerable to shell command injection. It accepts a framework choice as a command-line argument, assigns it to a variable, and interpolates it directly into a command string that is subsequently executed usingeval. An attacker providing a crafted string (e.g.,react; malicious_command) could execute arbitrary commands. - Evidence: The vulnerable logic in
scripts/setup.sh:FRAMEWORK="${1:-react}",GENERATOR_CMD="$GENERATOR_CMD --framework=$FRAMEWORK", followed byeval $GENERATOR_CMD. - [DYNAMIC_EXECUTION]: The automation script
scripts/setup.shutilizes theevalfunction to execute dynamically constructed shell commands. This practice is inherently dangerous as it bypasses standard shell parsing safety and facilitates execution of untrusted input if not strictly sanitized. - [INDIRECT_PROMPT_INJECTION]: The skill exposes a high-capability attack surface through the
scripts/setup.shscript. The script ingests untrusted external data (user-supplied framework arguments) and passes it directly to a privileged shell context with no validation or sanitization, creating a significant vulnerability to injection attacks. - Ingestion points: Command-line arguments passed to
scripts/setup.sh(e.g., via the/inertia-rails-setupcommand). - Boundary markers: None detected; the script does not implement delimiters or warnings to ignore instructions embedded in the input.
- Capability inventory: The script can install system packages (
bundle add), run Rails generators (bin/rails generate), and execute arbitrary shell commands viaeval. - Sanitization: Absent; the script performs no filtering or escaping on the
$FRAMEWORKvariable before execution.
Recommendations
- AI detected serious security threats
Audit Metadata