Back to skill

Security audit

Svg Article Illustrator

Security checks for vulnerabilities and agentic risk

Overview

The skill’s main article-illustration workflow is coherent, but its optional PNG conversion renders SVG in an under-hardened local browser and the skill edits and archives article files by design.

Use the default SVG modes only on article files you are comfortable editing in place, preferably under version control. Treat PNG export as higher risk: only convert SVGs you trust, avoid running it in a credentialed or sensitive environment, and prefer a pinned Puppeteer install with browser sandboxing, JavaScript disabled, and outbound requests blocked.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/svg2png.js:37
Finding
Untrusted SVG Content Is Rendered in a Network-Enabled Browser with Chromium Sandboxing Disabled## Vulnerability Details **File Location**: `scripts/svg2png.js`, lines 37-59 **Vulnerability Type**: Unsafe rendering of active SVG content **Risk Level**: High **Vulnerable Code**: ```javascript const browser = await puppeteer.launch({ headless: "new", args: [ "--no-sandbox", "--disable-setuid-sandbox", "--disable-dev-shm-usage", "--disable-accelerated-2d-canvas", "--no-first-run", "--no-zygote", "--disable-gpu", "--disable-extensions", "--disable-background-timer-throttling", "--disable-backgrounding-occluded-windows", "--disable-renderer-backgrounding", "--disable-features=TranslateUI", "--disable-ipc-flooding-protection", "--enable-features=NetworkService,NetworkServiceInProcess" ], executablePath: findChrome(), }); const page = await browser.newPage(); await page.setContent(svgContent, { waitUntil: "networkidle0" }); ``` ### Technical Analysis The conversion command accepts a caller-selected SVG file, reads its complete contents, and passes those contents directly to Chromium using `page.setContent()`. No validation or sanitization is performed before rendering. SVG is not necessarily passive image data. It can contain scripts, event handlers, external image references, embedded HTML through `foreignObject`, resource URLs, and computationally expensive animation or filter content. JavaScript remains enabled on the Puppeteer page, and the script does not install request interception to deny outbound or internal-network requests. The Chromium process is also launched with both `--no-sandbox` and `--disable-setuid-sandbox`. These options remove an important isolation boundary intended to contain a compromised renderer. Although malicious SVG content alone does not automatically grant native code execution, successful exploitation of a Chromium vulnerability would have a substantially g ...[truncated 1838 chars]
Remediation
## Remediation Suggestions 1. Remove `--no-sandbox` and `--disable-setuid-sandbox`. Run Chromium with its standard sandbox enabled. 2. Render inside a dedicated, unprivileged container or operating-system account with: - A read-only filesystem where possible. - No access to secrets or user data. - Strict CPU, memory, process, and execution-time limits. - No unnecessary Linux capabilities. 3. Disable JavaScript before loading the document: ```javascript await page.setJavaScriptEnabled(false); ``` 4. Enable request interception before calling `page.setContent()` and reject every network request that is not explicitly required: ```javascript await page.setRequestInterception(true); page.on("request", request => request.abort()); ``` 5. Sanitize SVG using a maintained XML/SVG sanitizer and an element-and-attribute allowlist. Reject at least: - `script`, `foreignObject`, `iframe`, `object`, and `embed`. - Event-handler attributes such as `onload` and `onclick`. - `javascript:` and remote `http:` or `https:` URLs. - External `href`, `xlink:href`, CSS imports, and external font references. - XML entities and DTD declarations. 6. Apply input-size, SVG-dimension, animation-duration, screenshot-duration, and DPI limits to reduce denial-of-service risk. 7. Put browser cleanup in a `finally` block so Chromium is closed when parsing, rendering, or screenshot creation fails. 8. Treat generated SVG as untrusted even when it originated from an AI model, because article content or prompt injection can influence generated markup.

T08 · Insecure Dependencies

Warning
Location
references/png-export.md:28
Finding
Puppeteer Installation Is Unpinned and Not Protected by a Lockfile## Vulnerability Details **File Location**: `references/png-export.md`, line 28 **Vulnerability Type**: Non-reproducible third-party dependency installation **Risk Level**: Medium **Vulnerable Installation Command**: ```bash npm install puppeteer ``` ### Technical Analysis The documented installation command resolves the latest Puppeteer release and its current transitive dependency graph at installation time. The project does not include a `package.json` or committed lockfile that identifies an audited version and expected integrity hashes. Consequently, two users installing the Skill at different times may execute different dependency code. npm package installation may also execute package lifecycle scripts, while Puppeteer installation can download browser artifacts. If a future release, transitive dependency, registry response, or package maintainer account is compromised, following the documented command could introduce attacker-controlled code without any modification to this repository. This finding does not establish that the current official Puppeteer package is malicious. The vulnerability is the absence of version and integrity controls around code that is installed and executed as part of the documented workflow. ### Attack Path 1. A user selects PNG export and follows the dependency instructions. 2. The user runs `npm install puppeteer`. 3. npm resolves whichever Puppeteer version and transitive dependencies are current at that time. 4. A compromised or unexpectedly modified package is downloaded because no audited version or lockfile constrains resolution. 5. Package installation scripts or subsequently imported dependency code execute with the permissions of the user running npm or the conversion command. ### Impact Assessment Dependency installation and runtime code execute with the privileges of the invoking account. A compromised dependency could read or alter files available to that account, acce ...[truncated 356 chars]
Remediation
## Remediation Suggestions 1. Add a `package.json` that pins an explicitly reviewed Puppeteer version rather than resolving the latest release. 2. Generate and commit `package-lock.json` so transitive versions and integrity hashes are reproducible. 3. Replace ad hoc installation instructions with: ```bash npm ci ``` 4. Document the supported Node.js and Puppeteer versions and review upgrades before updating the lockfile. 5. Use the official npm registry and enforce registry configuration in trusted CI environments. 6. Run dependency installation as an unprivileged user and never recommend `sudo npm install`. 7. Use dependency auditing, update review, and provenance or signature verification where supported. 8. Consider separating browser download and execution into a hardened container image whose dependency versions and artifact digests are pinned.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (63)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
声明描述的是一个AI驱动的插图生成与格式导出技能,核心能力应包括生成SVG插图以及将SVG导出为PNG等。而实际代码仅实现了一个 shell 归档工具:读取传入的 Markdown 文件,查找其中已有的 SVG 片段,按标题和时间戳建立目录,并保存提取出的 SVG 文件。代码中没有任何AI生成逻辑、没有SVG渲染逻辑、没有PNG转换逻辑,也没有区分动态/静态SVG输出模式。因此其主要目的与声明严重不符,属于明显的描述—行为不匹配。

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
声明描述的是一个范围较广的“AI驱动配图生成工具”,核心能力包括生成文章配图、创建SVG插图,以及支持动态SVG、静态SVG、PNG三种输出模式。而代码块实际只覆盖“将现有SVG转换为PNG”这一部分,且是通过本地文件读写和 Puppeteer 渲染截图实现的。没有看到任何AI内容生成、SVG创建、动态SVG输出或静态SVG导出逻辑。因此,代码实际行为明显比声明更窄且不同,属于描述与实现不一致。

Hidden Instructions

High
Category
Prompt Injection
Content
</defs>
  <rect width="800" height="450" fill="url(#bgGrad)" rx="12"/>

  <!-- 标题 -->
  <text x="400" y="70" text-anchor="middle" font-family="system-ui, sans-serif" font-size="42" font-weight="bold" fill="#2C5282">Vibe Working 进化论</text>

  <!-- 进化路径 - 从工具使用者到 Skill 创造者 -->
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</defs>
  <rect width="800" height="450" fill="url(#bgGrad2)" rx="12"/>

  <!-- 标题 -->
  <text x="400" y="60" text-anchor="middle" font-family="system-ui, sans-serif" font-size="38" font-weight="bold" fill="#276749">AI Writing + Cursor</text>

  <!-- 左侧:框架 -->
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</defs>
  <rect width="800" height="450" fill="url(#bgGrad2)" rx="12"/>

  <!-- 标题 -->
  <text x="400" y="60" text-anchor="middle" font-family="system-ui, sans-serif" font-size="38" font-weight="bold" fill="#276749">AI Writing + Cursor</text>

  <!-- 左侧:框架 -->
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</defs>
  <rect width="800" height="450" fill="url(#bgGrad3)" rx="12"/>

  <!-- 标题 -->
  <text x="400" y="60" text-anchor="middle" font-family="system-ui, sans-serif" font-size="36" font-weight="bold" fill="#C53030">从使用者到创造者</text>

  <!-- 左侧:工具使用者 -->
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</defs>
  <rect width="800" height="450" fill="url(#bgGrad3)" rx="12"/>

  <!-- 标题 -->
  <text x="400" y="60" text-anchor="middle" font-family="system-ui, sans-serif" font-size="36" font-weight="bold" fill="#C53030">从使用者到创造者</text>

  <!-- 左侧:工具使用者 -->
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</defs>
  <rect width="800" height="450" fill="url(#bgGrad4)" rx="12"/>

  <!-- 标题 -->
  <text x="400" y="50" text-anchor="middle" font-family="system-ui, sans-serif" font-size="36" font-weight="bold" fill="#2C5282">三层上下文结构</text>

  <!-- 第三层:技能上下文(底部) -->
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</defs>
  <rect width="800" height="450" fill="url(#bgGrad4)" rx="12"/>

  <!-- 标题 -->
  <text x="400" y="50" text-anchor="middle" font-family="system-ui, sans-serif" font-size="36" font-weight="bold" fill="#2C5282">三层上下文结构</text>

  <!-- 第三层:技能上下文(底部) -->
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</defs>
  <rect width="800" height="450" fill="url(#bgGrad6)" rx="12"/>

  <!-- 标题 -->
  <text x="400" y="45" text-anchor="middle" font-family="system-ui, sans-serif" font-size="32" font-weight="bold" fill="#276749">SuitAgent 四层架构</text>

  <!-- 第一层:输入层 -->
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</defs>
  <rect width="800" height="450" fill="url(#bgGrad6)" rx="12"/>

  <!-- 标题 -->
  <text x="400" y="45" text-anchor="middle" font-family="system-ui, sans-serif" font-size="32" font-weight="bold" fill="#276749">SuitAgent 四层架构</text>

  <!-- 第一层:输入层 -->
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</defs>
  <rect width="800" height="450" fill="url(#bgGrad7)" rx="12"/>

  <!-- 标题 -->
  <text x="400" y="50" text-anchor="middle" font-family="system-ui, sans-serif" font-size="32" font-weight="bold" fill="#744210">Agent → Skill 转变</text>

  <!-- 左侧:Agent -->
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</defs>
  <rect width="800" height="450" fill="url(#bgGrad7)" rx="12"/>

  <!-- 标题 -->
  <text x="400" y="50" text-anchor="middle" font-family="system-ui, sans-serif" font-size="32" font-weight="bold" fill="#744210">Agent → Skill 转变</text>

  <!-- 左侧:Agent -->
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</defs>
  <rect width="800" height="450" fill="url(#bgGrad8)" rx="12"/>

  <!-- 标题 -->
  <text x="400" y="50" text-anchor="middle" font-family="system-ui, sans-serif" font-size="32" font-weight="bold" fill="#97266D">专业能力沉淀 = Skill</text>

  <!-- 中心:律师 -->
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</defs>
  <rect width="800" height="450" fill="url(#bgGrad8)" rx="12"/>

  <!-- 标题 -->
  <text x="400" y="50" text-anchor="middle" font-family="system-ui, sans-serif" font-size="32" font-weight="bold" fill="#97266D">专业能力沉淀 = Skill</text>

  <!-- 中心:律师 -->
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</defs>
  <rect width="800" height="450" fill="url(#bgGrad9)" rx="12"/>

  <!-- 标题 -->
  <text x="400" y="45" text-anchor="middle" font-family="system-ui, sans-serif" font-size="32" font-weight="bold" fill="#744210">蜂巢智能 Hive Intelligence</text>

  <!-- 中心:主控 Agent -->
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</defs>
  <rect width="800" height="450" fill="url(#bgGrad9)" rx="12"/>

  <!-- 标题 -->
  <text x="400" y="45" text-anchor="middle" font-family="system-ui, sans-serif" font-size="32" font-weight="bold" fill="#744210">蜂巢智能 Hive Intelligence</text>

  <!-- 中心:主控 Agent -->
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
<polygon points="0 0, 10 3.5, 0 7" fill="#ef4444"/>
    </marker>
  </defs>
  <!-- Background -->
  <rect width="800" height="450" fill="#fff7ed"/>

  <!-- Title -->
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
<polygon points="0 0, 10 3.5, 0 7" fill="#ef4444"/>
    </marker>
  </defs>
  <!-- Background -->
  <rect width="800" height="450" fill="#f8fafc"/>

  <!-- Left: Multi-Agent System -->
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
<text x="0" y="-90" text-anchor="middle" font-size="18" font-weight="bold" fill="#166534">Claude Code 多 Agent 系统</text>
    <text x="0" y="-65" text-anchor="middle" font-size="14" fill="#15803d">(同一模型内部)</text>

    <!-- Single Brain -->
    <circle cx="0" cy="-10" r="50" fill="#86efac" stroke="#22c55e" stroke-width="3"/>
    <text x="0" y="-5" text-anchor="middle" font-size="14" font-weight="bold" fill="#14532d">同一个</text>
    <text x="0" y="15" text-anchor="middle" font-size="14" font-weight="bold" fill="#14532d">大脑 🧠</text>
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</defs>
  <rect width="800" height="450" fill="#f8f9fa"/>

  <!-- 标题 -->
  <text x="400" y="45" font-size="28" font-weight="bold" fill="#333" text-anchor="middle">Session 隔离 · 信息损耗</text>

  <!-- 用户请求 - 大圆球 -->
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Natural-Language Policy Violations

Medium
Confidence
85% confidence
Finding
The file title and all changelog content are written exclusively in Chinese, indicating a language-specific skill context without any visible opt-in, alternative locale, or justification for restricting outputs to this language. Under the policy, forcing a specific language without user choice can be a natural-language policy violation.

Natural-Language Policy Violations

Medium
Confidence
87% confidence
Finding
The file is written entirely in Chinese and presents itself as the skill's decision record without any visible note that language is optional, user-selectable, or region-specific. Under the policy rule for natural-language constraints, this can be a locale/language restriction unless the skill explicitly offers opt-in or documents a justified regional scope.

Vague Triggers

Medium
Confidence
93% confidence
Finding
L007 将触发条件写为“当用户需要为文章生成配图、创建SVG插图、将SVG转换为PNG,或提到‘为文章配图’、‘生成插图’时使用此技能”。其中“生成插图”表述过于宽泛,缺少上下文限制,容易覆盖普通插图生成请求而不限于本文所述的文章 Markdown/SVG 工作流场景。

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The documentation describes replacing placeholders in the source article and later archiving generated assets, but it does not foreground that the original markdown will be modified and additional files will be written. Missing write-impact warnings can lead users to run the skill on sensitive or version-uncontrolled content and suffer unintended data changes or disclosure.

Static analysis

No suspicious patterns detected.