Back to skill

Security audit

test skill publish

Security checks for vulnerabilities and agentic risk

Overview

This is a conventional PDF-processing helper skill with visible local file operations; users should be careful with overwrite and decryption examples.

Install only if you want an agent to help operate on local PDF files. Use explicit input and output paths, avoid overwriting originals, handle decrypted PDFs as sensitive files, and install optional OCR dependencies in an isolated environment with pinned versions when possible.

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

Warning
Location
SKILL.md:235
Finding
Unpinned Third-Party Python Dependencies## Vulnerability Details **File Location**: `SKILL.md:235` **Vulnerability Type**: Unpinned third-party dependencies **Risk Level**: Medium ### Vulnerable Code ```python # Requires: pip install pytesseract pdf2image ``` ### Technical Analysis The skill instructs the agent or user to install `pytesseract` and `pdf2image` without specifying reviewed versions, package hashes, a lockfile, or a trusted package index. As a result, dependency resolution occurs at installation time and may retrieve versions that differ from those considered during this audit. Python packages can execute code during installation and later when imported. If a package release or its distribution channel is compromised, following this instruction could run attacker-controlled code under the account performing the installation. No evidence indicates that the named packages are currently malicious. The vulnerability is the uncontrolled and non-reproducible dependency installation process. ### Attack Path 1. A user requests OCR of a scanned PDF. 2. The agent follows the prerequisite documented in `SKILL.md`. 3. The agent runs `pip install pytesseract pdf2image` without version or hash verification. 4. `pip` resolves packages and transitive dependencies from its configured index at that time. 5. If a resolved distribution has been compromised, malicious installation-time or import-time code executes with the privileges of the account running the command. 6. The malicious package could access files, environment variables, and network resources available to that account. ### Impact Assessment Successful exploitation could provide arbitrary code execution with the privileges of the installing user or agent process. The affected scope could include readable user files, writable project files, environment variables, and network resources accessible from that execution environment. System-level privileges would only be obtained if installation were performed by an already privileged acco ...[truncated 60 chars]
Remediation
## Remediation Suggestions 1. Define reviewed direct and transitive dependency versions in a lockfile or pinned requirements file. 2. Require cryptographic hashes for every distribution, for example: ```bash python -m pip install --require-hashes -r requirements.txt ``` 3. Configure an explicitly trusted package index or an internally controlled dependency mirror. 4. Periodically scan locked dependencies for known vulnerabilities and review updates before changing pins. 5. Install dependencies in an isolated, least-privileged virtual environment or container. 6. Avoid performing package installation as `root` or another privileged account. 7. Document the supported Python and dependency versions so installations remain reproducible.
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The declared description presents a broad PDF-processing skill. However, the supplied code only analyzes a JSON structure containing form fields and bounding boxes, checking for overlaps and insufficient text-entry height. It does not open, inspect, modify, generate, or otherwise process PDFs directly. This is a materially different primary purpose, so the description does not accurately represent the code's behavior.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The declared description presents this as a comprehensive PDF-handling skill for essentially any PDF task. The supplied code, however, has a much narrower and different function: rasterizing PDF pages into standalone PNG images. That behavior is not clearly covered by the listed capabilities. While the description does mention 'extracting images,' that typically means pulling embedded images out of a PDF, not rendering each page as an image. Because the actual code's primary purpose is substantially narrower and materially different from the broad declared purpose, this is a description-behavior mismatch.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The declared description promises broad PDF-file handling capabilities, but this code does not operate on PDFs at all. Its actual function is to create an annotated image by drawing rectangles from JSON-specified form field coordinates onto an existing image. That is a materially different primary purpose from a general PDF utility skill. While such a script might support a larger PDF/form-processing pipeline, this specific code chunk is focused on image validation/visualization and not on the declared PDF tasks.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
This is a material description-behavior mismatch. The declared description says the skill should be used for essentially any PDF-related task, spanning many categories of PDF manipulation and extraction. The supplied code chunk has a much narrower purpose: it parses a PDF's form annotations using pypdf and emits structured JSON describing form fields and their positions. While this is PDF-related, it does not implement most of the declared capabilities, and its primary purpose is specifically form-field introspection rather than general PDF handling. There is no evidence of undeclared dangerous behavior, but the description substantially overstates the skill's functionality relative to the provided code.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The description claims a comprehensive PDF skill to handle essentially any PDF-related task. The supplied code does only one specialized task: analyze a PDF’s visual/form structure for later field-coordinate generation. That is materially narrower and different in primary purpose from the declared broad PDF toolbox. While PDF text extraction is loosely related, the main behavior is form-structure/layout extraction with coordinate metadata and JSON output, not general PDF operations. Therefore the declared description does not accurately represent what this code chunk actually does.

Lp3

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding
The skill documents code and commands that read from and write to local files, but it does not declare any tool scope or permissions boundary. That increases the chance of over-privileged or unintended file access when the skill is invoked, especially because it covers many file-mutating PDF operations.

Vague Triggers

Medium
Confidence
96% confidence
Finding
The activation rule is extremely broad: it says to use the skill whenever the user wants to do anything with PDFs or merely mentions a .pdf file. That can cause unintended invocation of a file-manipulating skill in situations where the user did not actually request file access or modification, increasing the risk of accidental data exposure or destructive actions.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The description advertises operations that can overwrite files, remove password protections, or otherwise materially alter documents, but it provides no warnings or consent requirements. In this context, the omission is dangerous because the skill explicitly includes decryption and other high-risk file modifications that could bypass user expectations and lead to data loss or policy violations.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The decryption example directly removes PDF password protection and writes a decrypted output file without any warning about the resulting loss of protection. In an agent skill context, that omission can normalize unsafe handling of sensitive documents and lead users or downstream agents to create unprotected copies that are easier to disclose or mishandle.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The in-place repair command modifies the original PDF directly, but the example does not warn that the source file will be changed. In an agent-assisted workflow this can cause irreversible data loss, destroy evidentiary integrity, or corrupt the only copy of a document if used incautiously.

Missing User Warnings

Low
Confidence
78% confidence
Finding
This markdown file includes a batch-processing example that writes merged PDFs and extracted text files to disk, but the surrounding documentation does not warn users that running it will create output files for every matched PDF. Because this is a markdown reference file, SQP-2 applies when descriptions omit warnings about behaviors that can affect user data or the filesystem.

Missing User Warnings

Low
Confidence
80% confidence
Finding
This code performs a file write operation with `open(json_output_path, "w")`, which can overwrite an existing file, but there is no confirmation prompt or explicit warning comment/docstring about that behavior at the point of execution. Although the CLI usage shows an output argument, it does not clearly disclose overwrite risk to the user.

Static analysis

No suspicious patterns detected.