nestjs-module-generator
Fail
Audited by Gen Agent Trust Hub on Apr 8, 2026
Risk Level: HIGHCOMMAND_EXECUTIONPROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The script
scripts/generate-module.shis vulnerable to shell command injection. It uses theMODULE_NAMEargument (which originates from user input) inside a double-quoted heredoc (<< EOF). Because the heredoc delimiter is not quoted, the shell evaluates any command substitutions (such as$(...)or backticks) contained within the variables (like${PASCAL_NAME}or${MODULE_NAME}) when writing the boilerplate files. An attacker can execute arbitrary commands on the system by providing a malicious module name. - [COMMAND_EXECUTION]: The script
scripts/generate-module.shis vulnerable to directory traversal. TheMODULE_NAMEargument is used to construct theMODULE_DIRpath (src/modules/${MODULE_NAME}) without any sanitization or validation. This allows an attacker to specify paths like../../to create or overwrite files outside the intended project directory. - [COMMAND_EXECUTION]: The instructions in
SKILL.mddirect the agent to accept a module name from the user and pass it directly as an argument to the vulnerablescripts/generate-module.shscript. This provides a direct execution path for shell injection attacks via the agent's interface. - [PROMPT_INJECTION]: The skill is susceptible to indirect prompt injection as it ingests untrusted data from the user and uses it to drive the execution of a shell script with significant system capabilities.
- Ingestion points: User input for module names and descriptions requested in
SKILL.md. - Boundary markers: None present to delimit user-provided data from instructions.
- Capability inventory: Arbitrary file creation and shell execution via
scripts/generate-module.sh. - Sanitization: No validation or escaping is performed on the user input before it is passed to the shell environment.
Recommendations
- AI detected serious security threats
Audit Metadata