Back to skill

Security audit

MD to Mobile Image

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it claims, but it renders Markdown in a live browser without blocking embedded scripts or network requests.

Install only if you will convert Markdown files you trust. Avoid running this on Markdown received from others until the skill disables JavaScript, blocks network requests, sanitizes raw HTML, and writes outputs to a private per-run directory.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
md-to-image.js:176
Finding

Untrusted Markdown Executes Active Browser Content

Content
View full analysis
${CSS} ${content} `; } ``` ```javascript async function generateImage(html, outputPath) { const browser = await chromium.launch(); const page = await browser.newPage(); await page.setViewportSize({ width: TARGET_WIDTH, height: 8000 }); await page.setContent(html, { waitUntil: 'networkidle' }); await page.waitForTimeout(3000); const height = await page.evaluate(() => document.body.scrollHeight); await page.setViewportSize({ width: TARGET_WIDTH, height: Math.min(height, MAX_HEIGHT) }); ``` ```javascript const mdContent = fs.readFileSync(mdFile, 'utf-8'); console.log(`Converting: ${mdFile}`); const html = buildHtml(mdContent); const timestamp = Date.now(); const outputPath = `${OUTPUT_DIR}/output_${timestamp}.png`; console.log('Generating...'); await generateImage(html, outputPath); ``` ### Technical Analysis The application treats the selected Markdown file as untrusted input but passes it directly to `marked()`. Raw HTML preserved by the Markdown parser is then interpolated into a complete HTML document and loaded into a live Playwright Chromium page. No HTML sanitization, Content Security Policy, JavaScript disablement, browser-context network restriction, or request interception is applied. Consequently, active content in a crafted Markdown file—including inline scripts, event handlers, remote images, iframes, and other network-capable elements—can execute or load resources during conversion. For example, a ...[truncated 1849 chars]
Remediation
View remediation
{ const url = route.request().url(); if (url.startsWith('data:') || url === 'about:blank') { return route.continue(); } return route.abort(); }); ``` 4. Add a restrictive Content Security Policy to the generated document, for example: ```html ``` 5. If external images are a required feature, retrieve them through a controlled component that enforces: - Allowed protocols and destinations. - DNS and IP validation after resolution. - Blocking of loopback, link-local, private, and metadata address ranges. - Response size, content type, redirect, and timeout limits. 6. Add regression tests using raw scripts, event handlers, iframes, remote images, localhost URLs, private IP addresses, and cloud metadata URLs to confirm that active content and unauthorized network access are blocked. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
md-to-image.js:235
Finding

Predictable Output Files in an Unsafe Shared Temporary Directory

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (4)

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The natural-language content of the skill is presented exclusively in Chinese, including usage guidance and examples. Under the policy, forcing a specific language without user opt-in can be a locale/language policy violation when no alternative language option or justification is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The natural-language comment '白底黑字,压缩后更清晰' introduces Chinese-specific language in the skill file without any indication that language choice is optional or user-selected. Under the locale/language policy rule, forcing or assuming a specific language without opt-in can be a policy concern.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
86% confidence
Finding

The dependency uses a caret range (^11.11.1), which allows automatic installation of newer compatible releases rather than a single audited version. This increases supply-chain risk because builds may pull different code over time, including a compromised or regressed upstream release.

Content

Scanner excerpt · package.json (reported line 3)May include surrounding context.

json
{
  "dependencies": {
    "highlight.js": "^11.11.1",
    "marked": "^17.0.5"
  }
}

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
86% confidence
Finding

The dependency uses a caret range (^17.0.5), so installations are not fully deterministic and may resolve to newer package versions than the one originally reviewed. This creates a low-severity supply-chain exposure if an upstream release introduces malicious code or a breaking security regression.

Content

Scanner excerpt · package.json (reported line 4)May include surrounding context.

json
{
  "dependencies": {
    "highlight.js": "^11.11.1",
    "marked": "^17.0.5"
  }
}