T09 · Insecure Skill Coding Practices
- Location
scripts/convert.py:126- Finding
Untrusted Markdown Is Rendered with Local File Access and Network Resource Loading
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Markdown-to-PDF skill does what it claims, but its converter gives the PDF renderer broad local file access when processing Markdown, which users should review carefully.
Install only if you will convert Markdown files you trust, or run the converter in a restricted environment. Be cautious with Markdown from other people, because embedded HTML or resource links may cause wkhtmltopdf to access local files or network resources available to your account.
scripts/convert.py:126Untrusted Markdown Is Rendered with Local File Access and Network Resource Loading
SKILL.md:20Third-Party Dependencies Are Installed Without Version or Integrity Constraints
The skill documentation indicates capabilities that require reading local files and invoking shell commands, but it does not declare any tool scope such as permissions or allowed-tools. This creates an authorization gap where an agent may execute the skill with broader access than users or policy expect, increasing the risk of unintended file access or command execution.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
pip install markdown pygments
## Usage
The converter renders attacker-controlled Markdown into HTML and then calls wkhtmltopdf with --enable-local-file-access, allowing the renderer to load local files referenced by the generated HTML. If untrusted Markdown is processed, embedded file:// references or related local resource loads could expose sensitive local files in the generated PDF or to the rendering process, which is especially risky in an automated agent context that may have access to secrets or workspace data.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
output_path
]
result = subprocess.run(cmd, capture_output=True, text=True)
if result.returncode != 0:
print(f"❌ Error generating PDF: {result.stderr}")