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$ENTITYvariable is used within agrepcommand: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$FEATUREinput is transformed and then used in afindcommand: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.shandscripts/find-user-story.sh, the$LOGIC_IDand$US_IDparameters are passed togrep -Ewithout escaping or validation, posing risks of regex injection and command execution via shell termination characters. - [COMMAND_EXECUTION]:
scripts/trace-code.shperforms multiplegrepandfindoperations using$LOGIC_IDand derived function names ($FUNC) that do not implement input sanitization, extending the attack surface for command injection.
Audit Metadata