Back to skill

Security audit

Pixel Asset Pipeline

Security checks for vulnerabilities and agentic risk

Overview

The skill is a plausible pixel-art asset pipeline, but its batch script can run arbitrary Python helper paths and can write outside the intended output tree when given unsafe configuration values.

Install only if you are comfortable running local Python scripts. Use trusted JSON configs, review asset name and category values before batch runs, keep outputs in a disposable project directory, and do not pass untrusted paths to --generator or --processor. Prefer installing Pillow in a virtual environment with a pinned version.

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

Warning
Location
scripts/batch_generate.py:151
Finding

Configuration-Controlled Path Traversal Allows Writes Outside the Output Directory

Content
View full analysis
Remediation
View remediation
str: if not isinstance(value, str) or not SAFE_COMPONENT.fullmatch(value): raise ValueError(f"Invalid {field}: {value!r}") return value ``` 2. Validate every configuration-derived path component before constructing a path: ```python name = validate_component(asset["name"], "asset name") category = validate_component( asset.get("category", "uncategorized"), "asset category", ) ``` 3. Resolve and enforce containment for defense in depth: ```python def safe_child(root: Path, *parts: str) -> Path: root = root.resolve() candidate = root.joinpath(*parts).resolve() if not candidate.is_relative_to(root): raise ValueError(f"Path escapes output root: {candidate}") return candidate ``` For Python versions where `Path.is_relative_to()` is unavailable, use `candidate.relative_to(root)` inside a `try` block. 4. Construct both paths through the containment helper: ```python raw_path = safe_child(raw_dir, f"{name}_raw.png") out_dir = safe_child(output_base, category, name) ``` 5. Reject absolute paths, `.` and `..` components, empty names, null bytes, and both platform-specific path separators. 6. If configuration files may originate from untrusted users, document that they are untrusted input and fail closed before creating any directories or invoking subprocesses. ]]>

T08 · Insecure Dependencies

Note
Location
SKILL.md:22
Finding

Unpinned Pillow Installation Creates Dependency Supply-Chain Risk

Content
View full analysis
Remediation
View remediation
``` 2. Generate and verify cryptographic hashes, then require them during installation: ```bash python -m pip install --require-hashes -r requirements.txt ``` 3. Prefer a lock file or fully hashed requirements file to ensure reproducible installations. 4. Review and update the pinned version regularly so security fixes are applied deliberately rather than accepting arbitrary future releases. 5. Document installation from the official Python Package Index or a trusted, controlled internal mirror. 6. Recommend installation in an isolated virtual environment with ordinary user privileges rather than using administrative or root privileges. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • 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 (7)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill advertises and documents execution of local Python scripts and file processing workflows, but it does not declare any tool scope, permissions, or allowed-tools constraints. That creates an authorization/expectation gap: an agent may invoke shell or file access more broadly than users realize, increasing the chance of unintended local command execution or file access if the skill is used in an automated environment.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This code file contains natural-language text that forces a specific language for documentation and CLI interaction, including the module docstring and later command-line help/messages. Under the policy, locale-specific language is only acceptable when the user is given a choice or the restriction is clearly justified, neither of which is present here.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/batch_generate.py (reported line 32)May include surrounding context.

python
return False
        cmd = [sys.executable, generator_path, prompt, output_path, negative]
        try:
            result = subprocess.run(cmd, capture_output=True, text=True, timeout=120)
            if result.returncode != 0:
                print(f"   生图失败: {result.stderr[:200]}")
                return False

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/batch_generate.py (reported line 69)May include surrounding context.

python
cmd.extend(["--cols", str(cols)])

    try:
        result = subprocess.run(cmd, capture_output=True, text=True, timeout=60)
        print(result.stdout)
        if result.returncode != 0:
            print(f"处理失败: {result.stderr[:200]}")

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script accepts --generator and --processor command-line paths and then executes them with the current Python interpreter, enabling arbitrary code execution through user-supplied script paths. In a skill context, this expands behavior beyond simple sprite generation/processing into a generic launcher for arbitrary Python code, which is dangerous if the skill is invoked with untrusted arguments or integrated into higher-trust automation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This code file includes user-facing natural-language content such as the module description and error message entirely in Chinese. The file does not offer a language/locale option or explain that it is intentionally limited to a Chinese-speaking context, which can violate language/locale policy requirements.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The text states '英文效果最佳' ('English works best'), which imposes a language preference in the skill guidance. Under the policy, language constraints should either be optional, user-selectable, or explicitly justified as region/compliance-specific.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.