Back to skill

Security audit

A4 To A3 Pdf

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward local image-to-PDF helper with minor scope and dependency caveats but no evidence of hidden, destructive, or exfiltrating behavior.

Install only if you want a local helper for numbered image files arranged two per A3 landscape PDF page. Use a virtual environment and consider pinning Pillow; also note that non-numbered files or many non-.jpg extensions may not be processed as the broad description suggests.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Note
Location
SKILL.md:38
Finding

Unpinned Third-Party Dependency Installation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 38
Vulnerability Type: Unpinned third-party dependency
Risk Level: Low

Vulnerable Code Snippet:

bash
- Pillow: `python -c "from PIL import Image"` or `python -m pip install Pillow`

Technical Analysis

The installation command requests Pillow without specifying a reviewed version or verifying an integrity hash. Consequently, package resolution depends on the mutable state of the configured Python package index at installation time.

Installing a Python package may execute package-controlled build or installation logic. If the package source, distribution infrastructure, account, or local package-index configuration were compromised, following this instruction could install and execute an untrusted release. The reviewed project does not itself use a suspicious package name, custom package index, or dependency-confusion pattern; therefore, exploitation requires an external supply-chain compromise or malicious package-index configuration.

Attack Path

  1. An attacker compromises the relevant package distribution channel or causes the environment to resolve Pillow from an attacker-controlled package index.
  2. A user follows the documented command:
    bash
    python -m pip install Pillow
    
  3. pip resolves and downloads the attacker-controlled or compromised distribution because no version or hash constraint is provided.
  4. Package installation or build logic executes under the privileges of the user running pip.
  5. The malicious package can perform actions permitted to that user.

Impact Assessment

Successful exploitation could result in arbitrary code execution with the privileges of the user performing the installation. Potential scope includes access to that user's files, environment variables, credentials available to the process, and writable application resources. Administrative or system-level impact would req ...[truncated 261 chars]

Remediation
View remediation

Remediation Suggestions

  1. Pin Pillow to a reviewed, supported version in a dependency file rather than installing an unconstrained latest release.
  2. Record and verify distribution hashes, such as with a requirements file used through:
    bash
    python -m pip install --require-hashes -r requirements.txt
    
  3. Generate the lock file from a trusted package index and review dependency updates before accepting them.
  4. Install dependencies inside a dedicated virtual environment with non-administrative privileges.
  5. Avoid sudo pip install and other elevated installation methods.
  6. Where practical, configure an approved internal package mirror and enforce TLS certificate validation.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • 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 (2)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

代码的核心目的与声明整体一致:把文件夹中的图片两两合并成A3横向PDF,没有发现额外危险能力、外部网络访问或与描述无关的资源访问。但实现细节与描述存在一个实质性偏差:声明称“将文件夹中的图片按顺序两两合并”,通常意味着会遍历并排序文件夹中的图片;实际代码只按 1.jpg 到 999.jpg 检查是否存在,并且除 .jpg 外的 .png/.jpeg/.JPG/.PNG 仅在 i==1 且没有找到 1.jpg 时尝试一次,后续编号不会检查这些扩展名。因此它并不能可靠处理“文件夹中的图片”,也不能普遍按顺序覆盖所有图片文件。这属于描述能力范围比实际行为更宽,存在轻度但明确的功能性不匹配。

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The description lists trigger phrases such as “合并PDF” and “图片转PDF”, which are generic requests that could overlap with many unrelated PDF or image-conversion tasks. The file does not provide constraints, exclusions, or negative examples clarifying when this specific A4-to-A3 side-by-side merger should or should not activate.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.