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.sh is 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 using eval. 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 by eval $GENERATOR_CMD.
  • [DYNAMIC_EXECUTION]: The automation script scripts/setup.sh utilizes the eval function 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.sh script. 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-setup command).
  • 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 via eval.
  • Sanitization: Absent; the script performs no filtering or escaping on the $FRAMEWORK variable before execution.
Recommendations
  • AI detected serious security threats
Audit Metadata
Risk Level
HIGH
Analyzed
Sep 15, 2026, 05:20 AM