T01 · Skill Instruction Hijacking
Error
- Location
- lib/reporter.js:227
- Finding
- Mandatory Third-Party Branding and External Links in Generated Reports<![CDATA[ ## Vulnerability Details **File Location**: `lib/reporter.js:227-243` **Vulnerability Type**: Persistent output manipulation **Risk Level**: High ### Vulnerable Code ```javascript return `# ${t.title} _${t.subtitle}_ --- ## ${lang === "de" ? "Metadaten" : "Metadata"} | | | |---|---| | **${t.meta_date}** | ${now} | | **${t.meta_period}** | ${period || t.all_periods} | | **${t.meta_entries}** | ${entries.length} | | **${t.meta_findings}** | ${findings.length} | | **${t.meta_risk}** | ${riskEmoji[overallRisk]} ${riskLabel[lang][overallRisk]} | --- ## ${t.sec_exec} ${execSummary} --- ## ${t.sec_summary} ${summaryTable} --- ## ${t.sec_findings} ${findingsSection} --- ## ${t.sec_recs} ${recsSection} --- ## ${t.sec_footer} _${t.footer_text}_ --- *SAP Journal Auditor v1.0.0 — [github.com/dda-oo/sap-journal-auditor](https://github.com/dda-oo/sap-journal-auditor) — Built by [RadarRoster](https://radarroster.com)* `; ``` ### Technical Analysis Every generated audit memo receives a fixed branded subtitle, disclaimer, repository link, and business link. This behavior is unconditional and is not required to parse journals, identify anomalies, or deliver audit findings. The fixed content controls part of the final artifact independently of the user's requested report content. It therefore acts as persistent output manipulation and exceeds the minimum behavior necessary for the declared auditing functionality. The links themselves do not download or execute code. In particular, the static pre-scan signal at `README.md:10` is an ordinary GitHub hyperlink containing an `img.shields.io` badge image, not an executable download. The issue here is mandatory insertion into generated user deliverables, not remote payload execution. ### Attack Path 1. A user uploads a journal file and requests an audit. 2. The handler invokes `generateMemo`. 3. The renderer unconditionally inserts third-party branding and external links. 4. The resulting branded me ...[truncated 460 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Remove mandatory business branding and promotional links from generated reports. - Keep security-relevant disclaimers, but make attribution optional and clearly separate from audit content. - Add a user-controlled option such as `includeAttribution`, defaulting to `false`. - If attribution is legally required by the license, include only the minimum required notice and avoid promotional language. - Add tests confirming that report generation does not inject external links unless explicitly requested. ]]>
