Back to skill

Security audit

color-toolkit-turn

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent color utility, but its HTML preview feature has unsafe file-writing and HTML injection risks that should be reviewed before installation.

Review this skill before installing in shared or automated workflows. Use it only with trusted color descriptions and preview titles, write previews into a disposable directory, avoid elevated privileges, and prefer a fixed version that escapes HTML text and confines output to a safe directory with overwrite protection.

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

Warning
Location
scripts/preview_generator.py:187
Finding

Stored HTML Injection in Generated Preview Pages

Content
View full analysis
{title} - {hex_color} ``` ```python

{title}

{color_info["name"]} - {color_info["temperature"]} / {color_info["family"]}
``` The palette preview contains the same unsafe interpolation: ```python html = f''' {palette_title} ``` ```python

{palette_title}

Color Toolkit 自动生成

``` A user-controlled recommendation description is propagated into `palette_title`: ```python html_content = generate_palette_page_html( palette_colors, palette_title=f"配色方案 - {description}", output_path=output_path ) ``` ### Technical Analysis The preview generator constructs HTML using Python formatted strings and inserts `title` or `palette_title` without HTML escaping. These values can originate from the CLI `--title` argument or from the free-form recommendation description. Because the values are inserted into both element text and the HTML document title, an attacker can provide markup that closes the current element and introduces new HTML elements or executable JavaScript. For example, a description containing a closing tag followed by a script element would be written verbatim into the generated file. Th ...[truncated 1578 chars]
Remediation
View remediation
{safe_title} - {hex_color}

{safe_title}

``` 3. Prefer a template engine configured with automatic HTML escaping rather than manually constructing complete documents with formatted strings. 4. Keep contextual encoding requirements separate: - Use HTML text escaping for element contents. - Use attribute escaping for attribute values. - Continue strictly validating values inserted into CSS. 5. Add regression tests using payloads that contain: - Closing HTML tags. - Script elements. - Event-handler attributes. - Quotes and angle brackets. - Encoded and mixed-case markup. 6. Consider applying a restrictive Content Security Policy to generated previews, such as disabling scripts when no JavaScript is required: ```html ``` ]]>

T09 · Insecure Skill Coding Practices

Note
Location
scripts/preview_generator.py:582
Finding

Arbitrary Writable File Overwrite Through Unrestricted Output Path

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (20)

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

整体上,这段代码确实属于颜色工具集,核心方向与“颜色编码转换、对比度计算、配色方案生成”基本一致,没有发现越权访问、外部资源访问或不相关触发行为。但声明中的两个能力与实际代码存在明显偏差:其一,未实现HTML预览生成;其二,所谓“智能颜色推荐”更像规则式的互补色/三色组/类似色生成,而非更强语义上的智能推荐。由于声明列出的功能点中至少有一项明确缺失(HTML预览),因此应判定为描述与行为不完全匹配。

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 22)May include surrounding context.

md
> 📚 **渐进式加载**:本技能采用渐进式 MD 体系,`SKILL.md` 为入口(≤230行),详细内容拆分到 `references/*.md` 按需加载。

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
81% confidence
Finding

The skill declares low sensitivity and no explicit tool scope, yet its documentation claims it can generate HTML preview pages, which implies file-writing or content-generation capability not clearly bounded by permissions. This mismatch can cause downstream agents to assume the skill is safer than it is, increasing the risk of unintended file creation or unsafe rendering workflows.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest description, trigger phrases, and negative triggers are Chinese-only, which can force a specific language context for activation and usage. The file mentions bilingual input support later, but it does not provide explicit user opt-in or alternative language trigger guidance for the skill itself.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The title and descriptive text are entirely in Chinese, presenting the output examples as the expected format for the skill without any indication that users may choose another language or locale. This can violate the language/locale policy because it imposes a specific language by default rather than offering an explicit user opt-in.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The FAQ states the skill uses only the Python standard library, yet later says color recommendation depends on LLM semantic parsing. This inconsistency can mislead reviewers and operators about the skill's actual execution model, data flows, privacy exposure, and dependency surface, which may cause unsafe deployment assumptions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module title and descriptive strings are written entirely in Chinese, and the user-facing outputs later in the file are also Chinese-only. For a general-purpose color recommendation skill, this creates a language/locale constraint without user opt-in or a documented justification, which matches the language policy violation criteria.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code file contains natural-language descriptions, comments, messages, and errors in Chinese only, beginning with the module docstring. Under the policy rule for language/locale, forcing a specific language without user opt-in can exclude users and constitutes a natural-language policy violation when no alternative or justification is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The function raises a Chinese-only error message ("无法解析颜色格式"), and similar Chinese-only user-visible strings appear throughout evaluation and test output sections. Because the file does not provide a language selection mechanism or document a justified regional constraint, this violates the language/locale policy for natural-language content.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This markdown file contains mixed-language user-facing text such as Chinese section headers and descriptions alongside English labels like "Changed," but it does not explain the intended language policy or offer a language choice. That can violate a language/locale policy when users are implicitly forced to read a specific language without opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The file presents the skill documentation entirely in Chinese, with only a bilingual title, and does not indicate that users may choose another language or locale. Under the language/locale policy rule, forcing a specific language without opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The permissions document notes that HTML preview generation writes files in the current directory, but it does not clearly explain user-visible side effects such as overwriting files, leaving generated artifacts behind, or creating executable/renderable HTML content that may later be opened. This is a documentation transparency issue rather than direct code execution, but incomplete disclosure can cause users to grant or use file-write capability without understanding its practical consequences.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code file contains user-facing natural-language documentation entirely in Chinese, including the usage examples and recommendation prompt text. Under the policy rule for language/locale constraints, this can be a violation because it imposes a specific language without any opt-in or indication that alternative languages are supported.

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 page hard-codes lang="zh-CN", which imposes a specific language/locale on all output. This file also uses Chinese-only UI text throughout, and there is no parameter or documented option allowing the user to choose another locale.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

This second HTML generator likewise sets lang="zh-CN" and emits Chinese-only headings and labels without offering any language choice. That creates the same natural-language locale policy issue for all generated palette pages.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.