Back to skill

Security audit

Image To Perler Bead

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to be a real image-to-Perler-pattern converter, but it needs review because it can install an unpinned dependency and accepts size parameters that can exhaust local resources.

Review this skill before installing. It does not show evidence of theft, hidden persistence, or destructive behavior, but you should only run it on trusted images, avoid very large dimensions or cell sizes, and approve dependency installation only in an isolated environment with a known Pillow version. The craft instructions should also be supplemented with heat and blade safety precautions.

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

Warning
Location
scripts/perler_converter.py:511
Finding

Unbounded Image Dimensions and Cell Size Permit Resource Exhaustion

Content
View full analysis
200: sys.stderr.write("[错误] 宽度应在 1-200 之间\n") sys.exit(1) ``` The unvalidated values subsequently control image allocation in `scripts/perler_converter.py:276`: ```python img = Image.new("RGB", (w * cell_px, h * cell_px), (255, 255, 255)) ``` When height is omitted, it can also be derived from the source image aspect ratio in `scripts/perler_converter.py:170-176`: ```python out_w = target_w if target_h is not None: out_h = target_h else: out_h = max(1, round(orig_h * target_w / orig_w)) small = img.resi ...[truncated 2602 chars]
Remediation
View remediation
MAX_BEAD_HEIGHT: raise ValueError("Calculated height exceeds the supported limit") if w * h > MAX_TOTAL_BEADS: raise ValueError("Pattern contains too many beads") if w * h * args.cell * args.cell > MAX_OUTPUT_PIXELS: raise ValueError("Requested PNG exceeds the output pixel limit") ``` 4. Inspect source dimensions immediately after opening the image and reject images whose decoded dimensions or pixel count exceed an operationally safe threshold. 5. Catch Pillow allocation, decompression-bomb, and dimension errors. Return a clear failure message rather than allowing an uncontrolled crash. 6. Consider separate limits for interactive and trusted batch use. Any higher limits should require an explicit administrator-controlled configuration rather than requester-controlled arguments. 7. Add tests covering zero, negative, extremely large, and aspect-ratio-derived values for `height` and `cell`, as well as aggregate output-size limits. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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 (7)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill instructs the agent to invoke a local Python script that writes output files, but it declares no explicit tool scope or allowed-tools boundary. That omission weakens least-privilege controls and can let a broadly permissioned agent perform file-writing actions without an explicit policy guard, especially since output paths are user-influenced.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill tells the agent to create a virtual environment and install Pillow if it is missing, which expands the skill from image conversion into package management and environment modification. Allowing dependency installation at runtime increases attack surface, enables unreviewed code retrieval from package indexes, and can persist changes to the host environment beyond the user's immediate task.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The guide instructs users to use a hot iron, heat gun, tweezers, scissors, and even a knife for corrections, but provides no explicit safety precautions. In a crafting skill likely used by hobbyists or children, omission of burn and cut warnings increases the risk of physical injury during normal use.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

该 markdown 文件的自然语言说明整体以中文撰写,未见提供用户语言选择、双语选项或对语言范围作出明确说明。按规则,强制或默认单一语言且无用户 opt-in 可能构成语言/locale 策略问题。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The file forces a specific language for all instructions and does not indicate that the skill is region-specific or that users can opt into another language. This matches the policy category for language or locale constraints without user choice or documented justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

SQP-3 applies to all file types and covers language or locale policy violations. This markdown file presents all user-facing instructions and reference content only in Chinese, with no opt-in, alternative language, or justification that the skill is intended exclusively for Chinese-speaking users.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code hard-codes lang="zh-CN" in the generated HTML, which imposes a specific language/locale on output artifacts. Under the policy, forcing a locale without user opt-in is a natural-language policy violation unless the constraint is explicitly justified or configurable.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.