Back to skill

Security audit

Skill 2

Security checks for vulnerabilities and agentic risk

Overview

This Markdown converter is straightforward, but it can generate HTML that runs attacker-supplied JavaScript if used on untrusted Markdown.

Install only if you will convert Markdown you trust or you are comfortable reviewing/sanitizing the generated HTML before opening or sharing it. Avoid using this on untrusted Markdown, especially for newsletters, documentation sites, or email templates, until escaping and URL-scheme validation are added.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
main.py:62
Finding

Unescaped Markdown Content Enables HTML and JavaScript Injection

Content
View full analysis
', text) # Links text = re.sub(r'\[([^\]]+)\]\(([^)]+)\)', r'\1', text) # Bold+italic text = re.sub(r'\*\*\*(.+?)\*\*\*', r'\1', text) # Bold text = re.sub(r'\*\*(.+?)\*\*', r'\1', text) # Italic text = re.sub(r'\*(.+?)\*', r'\1', text) # Inline code text = re.sub(r'`([^`]+)`', r'\1', text) # Strikethrough text = re.sub(r'~~(.+?)~~', r'\1', text) return text ``` The unescaped result is inserted into multiple HTML contexts: ```python html_lines.append(f'{inline(m.group(2))}') ``` ```python html_lines.append(f'

{inline(text)}

') ``` ```python html_lines.append(f'
  • {inline(m.group(1))}
  • ') ``` ```python html_lines.append(inline(stripped)) ``` ### Technical Analysis The converter treats Markdown input as untrusted source data but does not HTML-escape ordinary text before embedding it in the generated document. Consequently, raw HTML elements and event-handler attributes pass through to the output. The image and link substitutions introduce additional injection contexts: - Image URLs are inserted directly into the `src` attribute. - Image alternative text is inserted directly into the `alt` attribute. - Link destinations are inserted directly into the `href` attribute. - Link text is inserted directly into the element body. - No URI-scheme allowlist prevents dangerous destinations such as `javascript:` or potentially dangerous `data:` content. For example, the following Markdown is copied into a paragraph without neutralization: ```markdown
    Remediation
    View remediation
    ` elements. - Event-handler attributes such as `onerror`. - Quotes in image alt text and URLs. - `javascript:` and unsafe `data:` links. - Encoded or control-character-obfuscated URI schemes. - Injection through headings, blockquotes, list items, and paragraphs. ]]>
    Vulnerability Patterns
    • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
    • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
    • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
    • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
    • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
    Findings (3)

    Undeclared Tool Scope

    Medium
    Category
    MCP Least Privilege
    Confidence
    87% confidence
    Finding

    The skill describes code-like behavior that reads Markdown input and writes HTML output, but it does not declare any explicit tool scope or permission boundaries. In an agent environment, this ambiguity can allow broader-than-expected file access or writes if the runtime infers capabilities from the implementation rather than a constrained manifest.

    Content

    No source excerpt is available for this finding.

    Vague Triggers

    Medium
    Category
    Not specified by scanner
    Confidence
    93% confidence
    Finding

    The trigger phrases include generic terms like "markdown to html" and "render markdown," which are broad enough to match routine user requests unintentionally. This can cause the skill to activate in contexts where the user did not intend file conversion behavior, increasing the chance of unnecessary file access or confusing agent behavior.

    Content

    No source excerpt is available for this finding.

    Natural-Language Policy Violations

    Low
    Category
    Not specified by scanner
    Confidence
    95% confidence
    Finding

    The generated document always sets <html lang="en">, which imposes a specific language/locale regardless of the input content or user preference. This is a natural-language policy concern because the tool forces English locale behavior without opt-in or explanation.

    Content

    No source excerpt is available for this finding.

    Static analysis

    No suspicious patterns detected.