Back to skill

Security audit

PDF Processor Pro

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a normal PDF tool, but it should be reviewed because it can retain snippets and metadata from processed PDFs without clearly telling the user.

Install only if you are comfortable reviewing or modifying the code first. Avoid processing sensitive PDFs unless the persistent job log is removed or controlled, use bounded input sizes/page counts, and install dependencies in an isolated environment with pinned versions.

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
SKILL.md:46
Finding

Unbounded PDF Processing Can Cause Resource Exhaustion

Content
View full analysis
dict: """提取PDF文本内容""" result = { "operation": "extract_text", "file": os.path.basename(path), "status": "pending", "timestamp": datetime.now().isoformat() } try: import PyPDF2 with open(path, "rb") as f: reader = PyPDF2.PdfReader(f) if password: reader.decrypt(password) pages = [] for i, page in enumerate(reader.pages): text = page.extract_text() pages.append({"page": i + 1, "chars": len(text), "preview": text[:100]}) result.update({ "pages": len(pages), "total_chars": sum(p["chars"] for p in pages), "pages_detail": pages, "metadata": { "title": reader.metadata.title if reader.metadata else None, "author": reader.metadata.author if reader.metadata else None, "producer": reader.metadata.producer if reader.metadata else None, }, "status": "success" }) ``` ```python def merge(self, paths: List[str], output: str) -> dict: """合并多个PDF""" result = { "operation": "merge", "files": [os.path.basename(p) for p in paths], "output": output, "status": "pending" } try: import PyPDF2 merger = PyPDF2.PdfMerger() for path in paths: merger.append(path) merger.write(output) merger.close() result["status"] = "success" result["total_pages"] = sum( len(PyPDF2.PdfReader(p).pages) for p in paths ) ``` ```python def split(self, pat ...[truncated 2922 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
SKILL.md:204
Finding

Unpinned Third-Party PDF Dependency Creates Supply-Chain Exposure

Content
View full analysis
Remediation
View remediation
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 (5)

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest description and feature list explicitly advertise '表格识别' (table recognition). However, the code only implements text extraction, merge, split, and metadata reading via PyPDF2; there is no function or library usage for detecting or extracting tables from PDFs.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Natural-language content throughout the file, including the description, headings, comments, and example outputs, is presented exclusively in Chinese, with no indication that the user can choose another language. This creates a language/locale policy concern because the skill appears to impose a specific language by default rather than offering opt-in or documenting a region-specific requirement.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The listed trigger phrases "PDF", "处理PDF", and especially "提取文本" are generic terms that can appear in everyday user requests outside a narrowly defined skill invocation context. The file does not provide scope constraints, explicit invocation rules, or negative examples to distinguish when this skill should activate versus when a user is merely discussing PDFs or text extraction generally.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
74% confidence
Finding

The description and feature list present general PDF processing support including password-protected PDFs, but only extract_text accepts a password parameter and attempts decryption. Other core operations like merge, split, and metadata reading do not expose any password handling, so the advertised support is broader than the actual code behavior.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The inline comment describes the example as a simulated extraction fallback when PyPDF2 is missing. In reality, extract_text still tries to open and process 'document.pdf' first, and only falls back on ImportError; missing files or other runtime errors produce an error instead of a simulation.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.