Back to skill

Security audit

拼豆图纸生成器

Security checks for vulnerabilities and agentic risk

Overview

This skill is a local bead-pattern converter whose file access and generated outputs match its stated purpose, with a caution about large or untrusted images.

Reasonable to install for local bead-pattern generation. Use it on images or JSON files you intentionally choose, avoid huge or untrusted PNG files, and keep outputs in a known workspace directory because the command can write SVG, HTML, CSV, and JSON files to paths supplied at runtime.

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/pindou.py:68
Finding

Unbounded PNG Decompression and Image Processing Can Cause Resource Exhaustion

Content
View full analysis
I", data[pos:pos + 4])[0] ctype = data[pos + 4:pos + 8] chunk = data[pos + 8:pos + 8 + length] if ctype == b"IHDR": width, height, bit_depth, color_type, _, _, interlace = struct.unpack(">IIBBBBB", chunk) elif ctype == b"IDAT": idat += chunk elif ctype == b"PLTE": palette = chunk elif ctype == b"tRNS": trns = chunk elif ctype == b"IEND": break pos += 12 + length ``` ```python raw = zlib.decompress(bytes(idat)) stride = width * bpp out = bytearray() prev = bytearray(stride) p = 0 for y in range(height): ftype = raw[p] ``` ### Technical Analysis The built-in PNG decoder processes attacker-controlled image files without imposing limits on: - Input file size - PNG width and height - Declared pixel count - Total compressed `IDAT` data - Decompressed scanline data - Memory allocated for scanlines and decoded pixels - CPU time spent decoding and subsequently processing the image The entire input file is first loaded into memory with `f.read()`. All `IDAT` chunks are then accumulated in another in-memory buffer, after which `zlib.decompress()` expands the complete compressed stream without a maximum output size. A highly compressible payload can therefore have a small on-disk representation while expanding to a very large memory buffer. The decoder also trusts dimensions obtained from the `IHDR` chunk when calculating `stride` and iterating over image rows. It does not verify that the decompressed length exactly matches the expected scanline length before indexing the buffer. Re ...[truncated 1794 chars]
Remediation
View remediation
Vulnerability Patterns
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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
Findings (5)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill describes and instructs execution of a local Python script that reads user-supplied files and writes multiple output files, but it does not declare any explicit tool scope or permission boundaries. In an agent environment, this can lead to overbroad filesystem access assumptions, making it easier for the skill to read unintended local files or write artifacts to arbitrary paths if invoked with untrusted input.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The activation phrases are broad enough to match common image-conversion or pattern-related requests, which increases the chance the skill runs in contexts the user did not specifically intend. Because the skill can process local files and generate outputs, over-triggering expands the attack surface and may cause unnecessary file access or execution of local code paths in response to generic prompts.

Content

No source excerpt is available for this finding.

Context Window Stuffing

Medium
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Content

Scanner excerpt · assets/sample-heart.json (reported line 1)May include surrounding context.

json
{"gridSize": 16, "pixelData": ["#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#F23241", "#F23241", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#F23241", "#FBED56", "#FBED56", "#FBED56", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FFFFFF", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FFFFFF", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FBED56", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", 
...[truncated 25 chars]

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The file's natural-language documentation is entirely Chinese and presents the skill purpose and usage context in that language without indicating that other languages are supported or that Chinese is optional. Under the policy, forcing a specific language without user opt-in is a locale/language policy issue unless the constraint is clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The generated HTML hard-codes lang="zh-CN", which imposes a specific language/locale in user-facing output. The file does not indicate that the tool is region-specific or provide any opt-in or configuration for alternate locales, so this is a natural-language locale policy concern.

Content

No source excerpt is available for this finding.