prd-generator

Fail

Audited by Gen Agent Trust Hub on Feb 17, 2026

Risk Level: HIGHCOMMAND_EXECUTION
Full Analysis
  • [COMMAND_EXECUTION] (HIGH): The script scripts/generate_prd.sh is vulnerable to arbitrary command execution through the unsafe use of eval.
  • Evidence: The prompt_input function in scripts/generate_prd.sh uses eval "$var_name='$input'" to assign values to variables. An attacker providing input containing shell metacharacters (e.g., '; touch /tmp/pwned; #) can execute arbitrary commands with the privileges of the user running the script.
  • [COMMAND_EXECUTION] (MEDIUM): The script scripts/generate_prd.sh allows for potential arbitrary file writes due to lack of path sanitization.
  • Evidence: The OUTPUT_FILE variable is constructed directly from the user-provided PRODUCT_NAME using ${PRODUCT_NAME// /_}_prd.md. An attacker can use path traversal sequences (e.g., ../../../tmp/evil) in the product name to write files outside of the intended directory.
  • [INDIRECT_PROMPT_INJECTION] (LOW): The validation script scripts/validate_prd.sh provides a surface for indirect prompt injection by processing potentially untrusted PRD files.
  • Ingestion points: scripts/validate_prd.sh reads and parses the file provided in the first argument ($PRD_FILE).
  • Boundary markers: None. The script performs raw grep operations on the file content.
  • Capability inventory: The script uses grep and wc to analyze the file and prints the results to stdout, which may be consumed by an AI agent.
  • Sanitization: No sanitization or validation of the input file's content is performed before analysis.
  • [DATA_EXPOSURE] (LOW): The script scripts/generate_prd.sh automatically includes system information in the generated document.
  • Evidence: The script executes whoami and date to populate the 'Author' and 'Date' fields in the PRD template, exposing the current username and system time.
Recommendations
  • AI detected serious security threats
Audit Metadata
Risk Level
HIGH
Analyzed
Feb 17, 2026, 06:06 PM