Back to skill

Security audit

Canvas Poster

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to be a real poster/image generator, but it needs review because caller-controlled settings can overwrite local files and create very large renders that may exhaust resources.

Install only if you trust the configs passed into it or can wrap it with safeguards. Keep output paths inside a dedicated directory, confirm before overwriting files, reject absolute or traversal paths from untrusted input, and add limits on canvas size and record counts before using it in an automated service.

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
lib/builder.js:533
Finding

Unrestricted File Overwrite Through Attacker-Controlled Output Path

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
lib/builder.js:14
Finding

Unbounded Canvas Dimensions and Dataset Sizes Permit Resource Exhaustion

Content
View full analysis
Remediation
View remediation
max) { throw new RangeError(`${name} must be a positive integer no greater than ${max}`); } } validateDimension(W, 'width', MAX_WIDTH); validateDimension(totalH, 'height', MAX_HEIGHT); if (W * totalH > MAX_PIXELS) { throw new RangeError('Canvas pixel limit exceeded'); } ``` 3. Limit the number of sections and records before calculating height or entering rendering loops. 4. Validate chart values as finite numbers. Reject `NaN`, `Infinity`, negative dimensions, malformed series, and inconsistent data lengths. 5. Enforce maximum input-body and JSON sizes at the service boundary. 6. Run rendering in an isolated worker process with memory and execution-time limits. Terminate workers that exceed their budget without affecting the primary service. 7. Apply request throttling and concurrency limits if rendering is remotely accessible. 8. Apply equivalent validation to `mycode/lib/builder.js` or remove the duplicate tree to prevent the implementations from diverging. 9. Add regression tests for oversized dimensions, excessive item counts, non-finite numbers, malformed arrays, and maximum permitted configurations. ]]>
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (26)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `lib/core.js` — 通用绘制工具(圆角矩形、饼图、柱状图、格式化)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `lib/builder.js` — Section DSL → Canvas 构建器

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The README advertises very broad trigger phrases such as 'generate a poster', 'create a dashboard', and 'make an infographic' for automatic skill invocation. In an agent setting, broad activation increases the chance this skill is selected for common requests and then writes files or processes untrusted structured content without the user explicitly intending to invoke this capability.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documented auto-invocation phrases are broad enough to trigger on ordinary user requests like '生成海报' or '生成图表', which can cause the skill to activate in contexts the user did not specifically intend. In a skill-capable agent environment, overly broad routing increases the chance of unexpected file generation, unintended data processing, or chaining into side-effecting behavior through dependent skills.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases are broad enough to capture many generic requests such as '生成图表' or '数据可视化图', which can cause this skill to activate outside its intended poster-generation scope. In an agent environment, overbroad routing can lead to unintended file creation, unnecessary dependency invocation by other skills, or misuse of server-side rendering capabilities on unrelated tasks.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The file contains multiple hard-coded Chinese-language comments and default UI strings such as section titles and usage labels, indicating the skill's output is opinionated toward a specific language. There is no natural-language indication that the locale is configurable, optional, or intentionally limited to a region-specific use case.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documented activation phrases are broad and map to very common user intents such as generating charts, dashboards, and posters. In a skill-routing environment, this can cause the skill to be invoked in situations the user did not explicitly intend, expanding the attack surface and potentially causing unintended file generation or downstream processing of sensitive data.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill advertises broad auto-invocation phrases such as '生成海报', '做看板', and '生成长图', which overlap with common user requests and may trigger the skill in situations the user did not specifically intend. Because this skill can generate files and be used as a dependency by other skills, overly broad routing increases the chance of unintended execution and side effects.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

文件中的自然语言描述全部以中文规定技能用途与触发方式,但没有说明这是面向特定中文区域的技能,也没有提供语言选择或用户 opt-in。若该技能在通用环境中被发现和调用,可能形成默认强制中文的语言策略问题。

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

L006 使用了“生成海报”“做看板”“长图”“生成图表”等触发描述,其中多项属于常见、宽泛的用户表达,未限定具体场景、输入类型或排除条件。文档也没有给出负例或明确边界,容易让技能在一般性的制图或说明需求中被意外调用。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This JavaScript file contains multiple user-facing strings in Chinese, including titles, labels, and recommendations, but provides no indication that the skill is intentionally region-specific or that users can opt into that locale. Under the policy, forcing a specific language without user choice is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file’s natural-language comments describe the tool specifically as a Chinese-focused drawing utility, and the runtime behavior reinforces that by warning only about CJK font support and formatting currency with the yuan symbol and Chinese numeric unit. This imposes a specific language/locale convention without any opt-in or documented user choice, which matches the language/locale policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This JavaScript file embeds multiple user-facing strings in Chinese for section titles, headers, and the default footer. That creates a natural-language locale constraint without any visible opt-in, fallback, or justification that the skill is intended only for Chinese-speaking users or a China-specific context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The README states that setting output writes a PNG to the provided path, but it does not warn that this causes filesystem side effects or constrain where the file may be written. In an agent workflow, if path values are influenced by user or upstream skill input, this can lead to unintended overwrites or writes to sensitive locations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file describes a behavior that affects user data on the local filesystem: setting output causes the skill/library to write a PNG file automatically. Under the markdown-specific warning criterion, the description should explicitly disclose that a file will be written, and ideally note overwrite implications if applicable.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The documentation instructs users to write output files to paths like '/tmp/my-poster.png' and exposes an 'output' field, but it does not warn that using this skill has filesystem side effects. In a multi-skill or agent context, missing disclosure can cause unanticipated local file writes, path misuse, or collisions with existing files if callers treat the skill as a pure formatter rather than a file-producing component.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The visible user-facing strings for titles, labels, and recommendations are written in Chinese throughout the demo output. Because the file provides no opt-in, fallback, or indication that it is intentionally region-specific, it forces a specific language/locale in a way that can violate language-choice policy.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The code writes a PNG file to a user-supplied output path with fs.writeFileSync, but there is no confirmation prompt, cautionary comment, or explicit user-facing warning that the file will be created or overwritten. While file output is part of the builder's purpose, the code itself provides no disclosure at the point of the write beyond accepting the path.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

This code file contains natural-language content such as the module description and user-facing warning messages in Chinese, but it does not indicate that the skill is intentionally region-specific or provide an opt-in language choice. Under the policy, forcing a specific language without user 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
86% confidence
Finding

The README explicitly advertises writing PNG output to an arbitrary filesystem path but does not warn about file creation or overwrite behavior. In an agent context, this can normalize unsafe usage patterns where user-influenced paths lead to clobbering existing files or writing artifacts to sensitive locations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown file documents that setting output will automatically write a PNG file, but it does not include any warning or caution about modifying the local filesystem. Under the markdown-file criteria for missing user warnings, file-writing behavior that can affect user data or system state should be disclosed clearly.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The skill invocation guidance is presented only with Chinese trigger phrases and does not indicate that other languages are supported or that the user can choose their preferred language. This can be read as enforcing a specific language for activation without opt-in.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
91% confidence
Finding

The dependency uses a caret range (^0.1.97), which allows npm to install newer compatible releases within the 0.x series. This creates supply-chain risk because future upstream publishes could change behavior or introduce a compromised version without this package being intentionally updated and reviewed. In a server-side image generation skill, the dependency is directly used in the runtime path, so any malicious or vulnerable update could affect the service process.

Content

Scanner excerpt · mycode/package.json (reported line 30)May include surrounding context.

json
"SKILL.md"
  ],
  "dependencies": {
    "@napi-rs/canvas": "^0.1.97"
  }
}

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This JavaScript file embeds multiple fixed Chinese labels and defaults for section titles and footer text, such as '差旅总览', '费用结构', and 'AI 自动生成'. Because the file forces a specific language in user-facing output without offering a language choice or documenting a justified locale restriction, it may violate the language/locale policy.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

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

json
"SKILL.md"
  ],
  "dependencies": {
    "@napi-rs/canvas": "^0.1.97"
  }
}