Back to skill

Security audit

ComPDF PDF to HTML

Security checks for vulnerabilities and agentic risk

Overview

This skill is a scoped ComPDF PDF-to-HTML helper with disclosed document upload and API-key handling, though users should be careful with sensitive PDFs and the locally stored key.

Install only if you are comfortable sending selected PDFs to ComPDF for processing. Do not use it for highly sensitive documents unless your ComPDF account, region, and retention requirements are acceptable, and protect or rotate the API key stored in the skill-local api_key file.

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
API Key Persisted in a Plaintext Skill-Local File## Vulnerability Details **File Location**: `SKILL.md`, lines 31-37 **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 explicitly instructs the agent to save the ComPDF API key in a plaintext file named `api_key` alongside `SKILL.md`. Although it states that the file must not be logged, committed, or published, it does not require restrictive filesystem permissions, ownership validation, encryption, atomic creation, or use of a protected credential manager. A file created under the process's default `umask` may be readable by other local users or processes. It may also be collected by backup software, copied during packaging, or accidentally published because the project does not contain an actual ignore rule demonstrating that the file is ex ...[truncated 1377 chars]
Remediation
## Remediation Suggestions 1. Prefer an operating-system credential manager, agent secret store, or managed secrets service instead of a plaintext project file. 2. If file-based storage is unavoidable, create the file atomically with owner-only permissions such as `0600`. 3. Validate the file's owner, type, and permissions before reading it; reject symbolic links and files accessible by group or other users. 4. Keep runtime secrets outside the publishable project directory. 5. Add an explicit version-control ignore rule for `api_key` and configure packaging tools to exclude it. 6. Avoid exposing the key in command-line arguments, logs, examples, exception messages, or generated reports. 7. Document API-key revocation and rotation procedures and recommend immediate rotation after suspected disclosure. 8. Use a narrowly scoped key where ComPDF supports permission or quota restrictions.
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
Content
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
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
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
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Context-Inappropriate Capability

High
Confidence
95% confidence
Finding
The reference documents setting user and owner passwords plus document permissions such as printing, copying, editing, commenting, and form filling. Those security-modification capabilities are not needed for converting PDFs into reusable HTML and are not justified by the manifest's publishing-oriented scope.

Context-Inappropriate Capability

High
Confidence
96% confidence
Finding
The skill is scoped as PDF-to-HTML, yet the embedded reference includes PDF decryption guidance. In this context, documenting decryption can enable capability creep or accidental implementation of password-removal flows, which is materially more dangerous because it normalizes handling protected documents outside the advertised purpose.

Context-Inappropriate Capability

High
Confidence
97% confidence
Finding
The AI overview and related sections describe intelligent document parsing, schema-based field extraction, grounding, and RAG/search-oriented outputs. These are distinct document-analysis capabilities, not simply PDF-to-HTML conversion, and are unjustified given the manifest's narrowly declared converter purpose.

Description-Behavior Mismatch

Medium
Confidence
98% confidence
Finding
The skill manifest says this skill is for converting PDF files to reusable HTML, but this reference file includes documentation for a wide range of unrelated capabilities: other format conversions, PDF editing, encryption/decryption, watermarking, compression, document comparison, and AI extraction/parsing. Bundling broad capability documentation into a narrowly described skill materially expands the apparent operational scope beyond PDF-to-HTML.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The reference repeatedly describes uploading user documents to ComPDF and retrieving results from third-party download URLs, but does not prominently warn that document contents leave the local environment. For a document-conversion skill, this context makes the omission more dangerous because users may reasonably assume a local-only transformation and unintentionally disclose sensitive files.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
Several sections unexpectedly switch into Chinese or contain untranslated Chinese strings inside otherwise English reference material, which can block comprehension for users who did not opt into that locale. This is a natural-language policy issue because the file does not present language choice or justify the mixed-locale requirement.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
Several sections unexpectedly switch into Chinese or contain untranslated Chinese strings inside otherwise English reference material, which can block comprehension for users who did not opt into that locale. This is a natural-language policy issue because the file does not present language choice or justify the mixed-locale requirement.

Ssd 3

Medium
Confidence
97% confidence
Finding
The encryption response example includes fileParameter containing a plaintext userPassword value, which can normalize secret echoing into logs, telemetry, UI output, and sample code. In an agent skill that handles uploaded documents and passwords, this pattern is especially risky because implementers may mirror it and inadvertently persist sensitive credentials.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
Several sections unexpectedly switch into Chinese or contain untranslated Chinese strings inside otherwise English reference material, which can block comprehension for users who did not opt into that locale. This is a natural-language policy issue because the file does not present language choice or justify the mixed-locale requirement.

Static analysis

No suspicious patterns detected.