Back to skill

Security audit

ComPDF PDF to Markdown

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed ComPDF PDF-to-Markdown helper, but users should be careful because it uploads documents to ComPDF and stores an API key locally.

Install only if you are comfortable sending selected PDFs to ComPDF for processing. Use a limited or revocable ComPDF API key where possible, keep the skill-local api_key file out of version control, and restrict its filesystem permissions. Do not use this skill for PDF deletion, decryption, watermarking, or other endpoints even though the bundled reference mentions them.

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

Plaintext API Credential Persistence Without Enforced File Protection

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 31-39
Vulnerability Type: Plaintext sensitive-data storage
Risk Level: Medium

Vulnerable Code Snippet

markdown
6. Resolve credentials only from `api_key` in the directory containing this `SKILL.md`. Read its first non-empty line. Do not inspect environment variables or any other local path. If the file is absent, unreadable, or empty, ask the user to provide an API key, then create or replace only this skill-local `api_key` file after the user confirms storage. Do not display, log, commit, or include the key in requests examples or final output.
7. Before uploading a document to ComPDF, identify the affected files and destination, and obtain confirmation unless the user has explicitly authorized that upload. Also obtain confirmation before operations that overwrite, delete, decrypt, or apply permanent protection.
8. Return the endpoint, method, content type, complete request fields, expected task/result fields, and the next polling or download step. Preserve original files unless replacement is explicitly requested.

## Credentials

Store only the current skill's API key in the sibling `api_key` file. This file is private runtime state and must be excluded from version control and skill publishing.

To obtain an API key, register or sign in at [ComPDF Portal](https://www.compdf.com/compdf-portal/signin?utm_source=clawhub&utm_medium=referral&utm_campaign=compdf_skills_repo_en&ref_platform_id=clawhub_compdfkit_skills_en). On first use, provide the key when requested and confirm storing it in the skill-local `api_key` file; later requests reuse that stored key.

Technical Analysis

The Skill explicitly directs the Agent to persist the ComPDF API key in a plaintext api_key file. Although it states that the file is private runtime state and must not be committed or published, it does not enforce owner-only permissions, atomic creation, symlink reje ...[truncated 2033 chars]

Remediation
View remediation

Remediation Suggestions

  • Prefer an operating-system credential manager or a dedicated secret-management service instead of plaintext file storage.
  • If file-based storage is unavoidable, create the file atomically with owner-only permissions such as 0600.
  • Add /api_key to a committed .gitignore file and configure secret scanning in the repository.
  • Resolve and validate the destination path before writing, reject symbolic links, and ensure the final path remains inside the Skill directory.
  • Avoid broad overwrite behavior; use exclusive creation or a safely implemented atomic replacement procedure.
  • Document credential revocation and rotation procedures for suspected exposure.
  • Keep the existing controls that prohibit displaying, logging, committing, or embedding the key in examples and final output.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (17)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 28)May include surrounding context.

md
3. Read the matching heading in `references/official-api-reference.md`. Use its exact endpoint path, request fields, request mode, and response fields; do not i

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 31)May include surrounding context.

md
6. Resolve credentials only from `api_key` in the directory containing this `SKILL.md`. Read its first non-empty line. Do not inspect environment variables or a

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The reference file exposes a very large set of ComPDF capabilities far beyond the skill's declared purpose of PDF-to-Markdown. In an agent skill context, overbroad capability documentation can enable confused-deputy behavior, where future prompts, tool wiring, or maintainers may invoke unrelated endpoints such as document modification, extraction, or security operations under the guise of this narrower skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The document describes direct file upload and remote processing flows but does not prominently warn that user documents are transmitted to an external third-party service. This creates a privacy and data-governance risk because users or downstream integrators may unknowingly send sensitive PDFs, credentials, contracts, or regulated data off-platform.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file is primarily written in English, but several key parameter descriptions switch to Chinese-only text, making important usage details unavailable to users who did not opt into that locale. This violates the language/locale policy because the document effectively imposes a language constraint for parts of the workflow rather than offering a consistent language choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This parameter description is presented only in Chinese inside an otherwise English API reference, so readers are forced into a specific language to understand the setting. Because the file does not clearly offer a language choice or justify a region-specific locale restriction, this is a policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file unexpectedly uses Chinese-only text for a parameter definition in the middle of an English reference. Users are not given an opt-in or alternate locale path, so the document effectively forces a language choice for understanding required behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

A core parameter description is only understandable to Chinese readers even though the surrounding document is English. That inconsistency creates a locale policy violation because users are not offered a clear language option before encountering mandatory instructions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This line contains Chinese-only operational guidance embedded in an otherwise English reference document. Since there is no explicit locale selection or justification for a Chinese-only section, the documentation forces a language/locale on users for essential instructions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

These per-file page range and password instructions are given in Chinese only, even though the surrounding API reference is in English. Because users are not offered an explicit language choice and these lines affect request construction, this creates a language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The required pages parameter is explained only in Chinese inside an otherwise English document. That forces a locale requirement on users for a required field, without opt-in or a documented reason for region-specific content.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

A required parameter description is provided only in Chinese, which is inconsistent with the rest of the English-language file. This forces readers to understand a specific language to use the endpoint correctly, contrary to the stated policy.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The line gives essential instructions for the pages parameter only in Chinese within a predominantly English reference. Users are not given a locale choice or separate localized version, so understanding the API depends on a forced language.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This required parameter explanation is written only in Chinese despite the document's English context. That creates a language accessibility and policy problem because critical usage details are not available unless the reader understands that locale.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This file includes security-sensitive and document-altering APIs such as encryption, decryption, watermarking, and other modification features that are not justified by a PDF-to-Markdown skill. In an agent setting, documenting these capabilities inside the skill materially increases the chance of unauthorized document transformation or security-control removal if the agent or a maintainer follows the broader reference instead of the intended scope.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This OCR language parameter note switches to Chinese-only wording in an otherwise English API reference. Users are not explicitly offered a Chinese locale version, so the documentation imposes a language requirement for understanding key configuration details.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This block contains multiple extraction parameters and behavior notes in Chinese only, including mode and options guidance, while the surrounding file is English. Because these are core operational instructions and no explicit locale selection is provided, the file violates the language/locale policy.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.