Back to skill

Security audit

ComPDF OCR

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a legitimate ComPDF OCR helper, with some install-time privacy and key-storage considerations.

Install only if you are comfortable uploading selected documents to ComPDF for processing and storing the ComPDF API key locally. Keep the api_key file private, exclude it from commits/backups, and use this skill only for the OCR operations listed in SKILL.md.

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

Plaintext API Key Stored in the Skill Directory Without Enforced Access Controls

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 34–40
Vulnerability Type: Plaintext sensitive credential storage
Risk Level: Medium

Vulnerable Code

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.

Technical Analysis

The skill directs the agent to persist the ComPDF API key as plaintext in an api_key file located within the skill directory. Although the instructions state that this file must not be committed or published, the audited package contains no .gitignore or equivalent mechanism that enforces this exclusion. The instructions also do not require owner-only file permissions, ownership validation, atomic creation, or protection against symbolic-link replacement.

Consequently, credential security depends on the ambient permissions and packaging practices of the host environment. If the project directory is readable by another local accoun ...[truncated 1838 chars]

Remediation
View remediation

Remediation Suggestions

  1. Prefer an operating-system credential manager, managed secret store, or runtime secret-injection mechanism rather than a plaintext file in the skill package.
  2. If file-based storage is unavoidable, create the file with owner-only permissions, such as mode 0600, and place it in a private runtime-state directory outside the publishable project tree.
  3. Add /api_key to a package-provided .gitignore and to all release or archive exclusion rules. Add automated secret scanning to CI and release workflows.
  4. Refuse to read from or write through symbolic links. Open the file using no-follow and exclusive-creation protections where supported, then validate its owner, type, and permissions.
  5. Write the credential atomically without exposing it through command-line arguments, logs, examples, temporary files, or error messages.
  6. Document credential revocation and rotation procedures, and rotate the key immediately if the skill directory has ever been committed, published, or shared.
  7. Restrict the ComPDF credential to the minimum available account scope, permissions, and usage limits.
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 (10)

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
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 34)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

The reference file exposes a much broader capability surface than the skill metadata advertises, including document modification, encryption/decryption, generation, and AI extraction APIs. That scope mismatch can enable an agent or downstream integrator to invoke powerful operations users did not reasonably consent to when selecting an OCR-focused skill, increasing the risk of unauthorized document manipulation or data processing.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

Including PDF encryption and especially decryption inside an OCR-branded skill creates an unnecessary high-risk capability that can remove protections from sensitive files or alter their security posture. In skill ecosystems, hidden or weakly justified security-sensitive functions are dangerous because they may be invoked under misleading expectations or combined with document upload flows to exfiltrate unprotected content.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Broad format conversion and PDF generation materially expand the skill beyond OCR into general document transformation and content creation. In an OCR-context skill, that overbreadth is risky because it violates least privilege and can lead to unanticipated content handling, transformation errors, or policy bypass where users expected only text recognition.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documentation describes direct file upload and remote processing by an external API but lacks a clear warning that document contents leave the local environment and are sent to a third-party service. For OCR and document workflows, files often contain highly sensitive personal or corporate data, so lack of disclosure undermines informed consent and safe handling expectations.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Page editing operations such as merge, split, delete, extract, insert, and rotate exceed the declared OCR purpose and allow direct modification of user documents. While not inherently malicious, this broader-than-advertised write capability increases the chance of unintended destructive actions, data loss, or misuse by an agent that should have been constrained to recognition and extraction tasks.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Destructive modification endpoints such as delete/extract operations are documented without explicit warnings about irreversible changes or the need to preserve originals. In an agent setting, omission of that warning increases the likelihood that users or automation invoke harmful write operations assuming safe or reversible behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Documenting decryption without a strong warning normalizes removal of PDF protections and fails to signal the sensitivity of the operation. In this skill context, that is more dangerous because the surrounding workflow already encourages uploading documents to a remote processor, so decrypted sensitive content could be exposed with little friction or user awareness.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The AI parsing and extraction APIs enable general intelligent document processing beyond simple OCR, including structured extraction and potentially richer content analysis. In an OCR-focused skill, that can materially increase privacy and data sensitivity exposure because more semantic information can be extracted and processed than users may expect.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.