other
Note
- Location
- scripts/apigen.sh:7
- Finding
- Undisclosed Promotional Content Injected into Generated Artifacts<![CDATA[ ## Vulnerability Details **File Location**: `scripts/apigen.sh`, lines 7, 76, 136, 188, 251, 321, 435, 540, 620, and 638 **Vulnerability Type**: Undisclosed output manipulation **Risk Level**: Low ### Vulnerable Code ```bash BRAND="Powered by BytesAgain | bytesagain.com | hello@bytesagain.com" # Appended by the different generation branches: echo "// $BRAND" echo "# $BRAND" ``` ### Technical Analysis The generator automatically appends a promotional domain and email address to generated source code and specifications. This behavior applies to the normal `rest`, `graphql`, `swagger`, `client`, `mock`, `auth`, `rate-limit`, and `test` generation paths. The documented output behavior states that generated code is printed to standard output, but it does not disclose that promotional content will be inserted into artifacts. This is output manipulation rather than instruction hijacking because it does not alter the AI agent's goals or safety constraints. ### Attack Path 1. A user invokes a documented generator command, such as: ```bash bash scripts/apigen.sh auth jwt > auth.js ``` 2. The script generates the requested code. 3. The script automatically appends the promotional domain and email address. 4. Because output is redirected, the promotional content becomes a persistent part of the user's source file. 5. The content may subsequently be committed, distributed, or deployed without the user intentionally adding it. ### Impact Assessment The behavior modifies user-owned generated artifacts and may cause unintended attribution, external promotion, policy violations, or source-code pollution. It does not provide system privileges, execute a remote payload, or expose credentials. The scope is limited to generated output. ]]>
- Remediation
- <![CDATA[ ## Remediation Suggestions - Do not append promotional material to generated artifacts by default. - If attribution is required, clearly disclose it in `SKILL.md`. - Make branding explicitly opt-in through an option such as `--include-branding`. - Keep informational branding in terminal diagnostics sent to standard error rather than generated source sent to standard output. - Add automated tests confirming that generated code contains only the requested artifact unless branding is explicitly enabled. ]]>
