semantic-docs

Warn

Audited by Gen Agent Trust Hub on Jul 9, 2026

Risk Level: MEDIUMCOMMAND_EXECUTION
Full Analysis
  • [COMMAND_EXECUTION]: Multiple utility scripts in the scripts/ directory are vulnerable to command injection because they interpolate unsanitized user arguments directly into shell execution contexts.
  • [COMMAND_EXECUTION]: In scripts/find-entity.sh, the $ENTITY variable is used within a grep command: grep -ri "\"entity\": \"$ENTITY\"". A crafted input containing shell metacharacters (e.g., ; id #) would result in arbitrary command execution.
  • [COMMAND_EXECUTION]: In scripts/find-feature.sh, the $FEATURE input is transformed and then used in a find command: find "$DOCS_DIR/tech" -iname "${FEATURE_UPPER}_*.md". This allows for argument injection or shell execution through crafted feature names.
  • [COMMAND_EXECUTION]: In scripts/find-logic-id.sh and scripts/find-user-story.sh, the $LOGIC_ID and $US_ID parameters are passed to grep -E without escaping or validation, posing risks of regex injection and command execution via shell termination characters.
  • [COMMAND_EXECUTION]: scripts/trace-code.sh performs multiple grep and find operations using $LOGIC_ID and derived function names ($FUNC) that do not implement input sanitization, extending the attack surface for command injection.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Jul 9, 2026, 08:32 AM