Back to skill

Security audit

ComPDF Compress PDF

Security checks for vulnerabilities and agentic risk

Overview

The skill is mainly a ComPDF PDF-compression helper, but it bundles broad unrelated API documentation and stores an API key in a persistent plaintext file.

Review this before installing if you work with sensitive PDFs. Use it only for compression, avoid asking it to use unrelated ComPDF endpoints from the bundled reference, and store the API key only in an environment where a plaintext skill-local credential file is acceptable. Rotate the key if that file is exposed or accidentally published.

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:32
Finding

Plaintext API Key Persistence Without Enforced File Protection

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 32-40
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 instructs the agent to persist a ComPDF API key in a plaintext file named api_key. Although it states that the file is private and must not be committed or published, it does not require owner-only permissions, atomic file creation, symlink protection ...[truncated 1666 chars]

Remediation
View remediation

Remediation Suggestions

  1. Prefer an operating-system credential store or dedicated secret manager rather than a plaintext project file.
  2. If file storage is unavoidable, create the file atomically with owner-only permissions such as 0600; do not rely solely on the ambient umask.
  3. Verify that the destination is a regular file owned by the expected user, and reject symbolic links or other special files before writing.
  4. Write to a securely created temporary file in the same directory, flush it, set restrictive permissions, and atomically rename it into place.
  5. Add api_key to an included .gitignore and to all packaging or publishing exclusion configurations.
  6. Add a pre-commit or pre-publish secret scan that blocks artifacts containing the credential file.
  7. Document credential rotation and revocation procedures for suspected exposure.
  8. Continue prohibiting display, logging, and inclusion of the key in request examples or final output.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (11)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 29)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 32)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

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

This reference file exposes a very broad third-party document-processing surface far beyond the declared skill purpose of PDF compression, including conversion, editing, decryption, and AI extraction features. In a skill-scoped environment, overbroad capability documentation increases the chance that an agent or maintainer will invoke unintended high-risk operations on user documents, creating privilege creep and unsafe tool misuse.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

Including PDF decryption documentation inside a compression skill materially expands the implied authority of the skill into removal of document protections. If an agent follows this reference naively, it could help strip passwords from protected files, undermining user intent and enabling unauthorized access or redistribution of sensitive content.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

AI parsing and extraction capabilities are unrelated to PDF compression and substantially increase data-exposure risk because they enable structured extraction of document contents. In the context of a compression skill, this creates an unnecessary path for sensitive document data to be transmitted, transformed, and potentially retained by a third-party service far beyond the user's expected operation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The document describes uploading files to ComPDF and retrieving processed outputs, but it does not clearly warn that user files and extracted contents are transmitted to an external service. This can lead to uninformed handling of sensitive documents, violating user expectations, privacy requirements, or organizational data-transfer policies.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The reference includes destructive or security-impacting operations such as page deletion, watermark removal, and decryption without explicit warnings about irreversible changes or protection removal. In an agent skill context, lack of cautionary guidance increases the chance that users or agents will perform harmful document modifications without understanding the consequences.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Encryption and permission-control APIs are outside the stated compression scope, so their presence indicates scope bloat and can confuse downstream agents about what actions are appropriate. While encryption is not inherently harmful, exposing unrelated security-affecting operations in this skill raises the risk of accidental misuse, misconfiguration, or silent policy changes to user documents.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

Several parameter descriptions switch from English to Chinese mid-reference, which imposes a specific language on readers of an otherwise English document. This is a natural-language locale policy issue because the file neither offers a language choice nor explains that the reference is intended for a Chinese-language audience.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

This line presents a Chinese-only explanation for page layout mode in the middle of English API documentation. Without an explicit bilingual policy or audience note, this creates an avoidable language-forcing issue for users expecting English guidance.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

These extraction parameter descriptions are partly or wholly in Chinese while the surrounding content is in English, effectively forcing a language change on users. Because no opt-in or region-specific justification is provided, this violates the language/locale consistency requirement.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.