Back to skill

Security audit

Markdown to HTML

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent local Markdown-to-HTML converter, but it can create unsafe HTML from untrusted Markdown without warning.

Use this skill only for trusted Markdown, or treat its output as untrusted until reviewed or sanitized. Do not publish or share generated HTML from user-supplied Markdown without adding escaping, URL allowlisting, or a maintained Markdown sanitizer. There is no evidence of credential access, persistence, or malicious installation behavior.

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

HTML Injection and Cross-Site Scripting in Generated Documents

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 then used throughout the generated HTML: ```python # Headings m = re.match(r'^(#{1,6})\s+(.+)$', stripped) if m: close_para() close_list() level = len(m.group(1)) html_lines.append(f'{inline(m.group(2))}') continue ``` ```python # Blockquote if stripped.startswith('>'): close_para() close_list() text = stripped.lstrip('>').strip() html_lines.append(f'

{inline(text)}

') continue ``` ```python # Unordered list m = re.match(r'^[-*+]\s+(.+)$', stripped) if m: close_para() if in_list != 'ul': close_list() html_lines.append('
    ') in_list = 'ul' html_lines.append(f'
  • {inline(m.group(1))}
  • ') continue # Ordered list m = re.match(r'^\d+\.\s+(.+)$', stripped) if m: close_para() if in_list != 'ol': close_list() ...[truncated 3549 chars]
Remediation
View remediation
` elements, event handlers, quote-breaking attributes, `javascript:` links, `data:` URLs, mixed-case schemes, encoded control characters, and malicious image sources cannot produce executable HTML. A safe design should follow this sequence: ```text Parse Markdown into tokens → validate URL schemes → escape all token text and attribute values contextually → generate only allowlisted HTML elements and attributes → sanitize the final output as defense in depth ``` ]]>
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
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The manifest lists short, generic triggers such as "render markdown" and "style markdown" without additional scope limits or exclusion conditions. These phrases are broad enough to match ordinary user requests, which can cause unintended invocation of the skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The generated document always uses <html lang="en">, which forces an English language/locale setting regardless of the user's content or preference. This is a natural-language policy concern because the skill does not offer any language choice or document why English is required.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.