T09 · Insecure Skill Coding Practices
- Location
scripts/processors/report_builder.py:246- Finding
Untrusted Contract Content Is Embedded in Markdown Reports Without Escaping
- Content
View full analysis
- Remediation
View remediation
` and neutralize Markdown constructs including links, images, headings, block quotes, emphasis markers, and code fences. 3. Prefer rendering contract excerpts as literal text in fenced code blocks. Select a fence longer than any backtick sequence present in the content, or use a renderer API that provides a dedicated plain-text node. 4. Configure the consuming Markdown renderer to: - Disable raw HTML. - Block remote images and other automatically loaded resources. - Restrict URI schemes to an explicit allowlist such as `https`. - Apply an appropriate Content Security Policy when reports are displayed in a browser. 5. Keep presentation fields separate from untrusted document content rather than constructing reports through unrestricted string interpolation. 6. Add regression tests using payloads containing: - Raw HTML image elements - Markdown image and hyperlink syntax - Heading and block-quote markers - Backticks and nested code fences - Encoded HTML entities - Potentially dangerous URI schemes ]]>
