Back to skill

Security audit

ComPDF PDF to Word

Security checks for vulnerabilities and agentic risk

Overview

This skill is a scoped ComPDF PDF-to-Word helper, but users should understand that it uploads documents to ComPDF and stores the ComPDF API key in a local plaintext file after confirmation.

Before installing, be comfortable with PDFs being sent to ComPDF for processing and with the API key being stored locally in a plaintext skill-local api_key file. Use it only for PDF-to-Word conversion, protect the api_key file from publishing or backups, and verify any generated request if the added sourceType=5 routing parameter matters to your compliance or attribution requirements.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:31
Finding

API Key Stored in a Plaintext Skill-Local File

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 31–39
Vulnerability Type: Plaintext credential storage
Risk Level: Medium

Complete 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 an API key in a plaintext file named api_key. It appropriately limits credential lookup to the Skill directory, requires user confirmation before storage, and prohibits displaying or logging the key. However, it does not requi ...[truncated 1672 chars]

Remediation
View remediation

Remediation Suggestions

  1. Prefer an operating-system credential manager or a platform-provided secret store instead of a plaintext project file.
  2. If file-based storage is unavoidable, create the file atomically with owner-only permissions such as 0600, and verify the resulting ownership and permissions before use.
  3. Reject symbolic links and other non-regular files before creating, replacing, or reading api_key to prevent redirection to an unintended path.
  4. Add and verify an explicit version-control ignore rule for /api_key, and exclude the file from packaging, backup, and publishing workflows.
  5. Avoid replacing an existing credential until the destination has been validated and the user has confirmed the operation.
  6. Document key revocation and rotation procedures so a potentially exposed credential can be invalidated promptly.
  7. Use a narrowly scoped key, if ComPDF supports scopes, quotas, or project-level restrictions.

other

Note
Location
SKILL.md:29
Finding

Undocumented Routing Parameter Is Forced into Every API Request

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 29
Vulnerability Type: Undocumented request parameter injection
Risk Level: Low

Complete Code Snippet

markdown
4. Include `sourceType=5` in every final ComPDF API request. Treat it as an integration routing parameter and include it in request details when the user asks for them.

Technical Analysis

The Skill mandates insertion of sourceType=5 into every final ComPDF request. In the audited PDF-to-Word reference, the documented multipart request fields are file, password, language, pageRanges, enableOcr, ocrRecognitionLang, ocrOption, isOutputDocumentPerPage, enableAiLayout, isContainImg, isContainAnnot, containPageBackgroundImage, formulaToImage, and pageLayoutMode. data.sourceType is documented as a response property, but the reviewed PDF-to-Word section does not identify sourceType as a request field.

This instruction also conflicts with the Skill's line 28 requirement to use the exact documented request fields and not infer unsupported options. Forcing an undocumented routing value can alter server-side attribution or request routing without a corresponding contract in the included API documentation. The available evidence does not establish malicious behavior, credential compromise, or code execution; the risk is limited to request integrity, transparency, and compatibility.

Attack Path

  1. A user asks the Skill to prepare a PDF-to-Word API request.
  2. The Skill selects the documented endpoint and request fields.
  3. The instruction at line 29 adds sourceType=5, even though that field is not listed among the reviewed endpoint's request parameters.
  4. The generated request is sent to ComPDF.
  5. The server may reject the unknown field, ignore it, or use it for undocumented routing or attribution.

Exploitation does not grant an attacker system privileges. The issue is triggered through normal use of t ...[truncated 454 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove sourceType=5 unless ComPDF officially documents it as a supported request field for the PDF-to-Word endpoint.
  2. If the parameter is required by a separate integration agreement, add a verifiable reference documenting its accepted location, type, valid values, and purpose.
  3. Clearly distinguish required endpoint fields from optional integration metadata in generated request plans.
  4. Require explicit user approval before adding undocumented metadata that can affect routing or attribution.
  5. Add schema validation so generated requests contain only fields supported by the selected endpoint and request mode.
  6. Resolve the conflict between the instruction to use exact official fields and the instruction to inject this additional parameter.
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 (22)

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

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This reference file exposes a very broad third-party capability surface far beyond the declared PDF-to-Word skill, including document mutation, decryption, AI extraction, and other file-processing actions. In an agent setting, oversized in-skill documentation can enable scope creep or unintended tool use, increasing the chance the agent performs sensitive operations the user did not request.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

Documenting PDF decryption inside a PDF-to-Word skill introduces a dangerous capability that can remove document protections and produce less-protected outputs. Even if not directly executed here, exposing this capability in the skill context can cause an agent to select or recommend a decryption flow outside the user's intended scope.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

Including AI document parsing and extraction guidance adds unrelated capabilities that can pull structured data from uploaded files, materially expanding the privacy and exfiltration risk of the skill. In a PDF-to-Word context, this can lead to collection of fields, tables, or full-text content beyond what is necessary for format conversion.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The document describes uploading user files to ComPDF and retrieving results, but it does not clearly warn that document contents are transmitted to and processed by a third party. In a business-use PDF workflow, users may unknowingly send contracts, forms, or other sensitive records off-system without informed consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The decryption section explains how to remove password protection but does not prominently warn that the output file will no longer have the original access controls. That omission can cause users or downstream systems to handle a decrypted document as if it were still protected, increasing exposure of sensitive content.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

This file is predominantly in English, but some parameter descriptions are presented only in Chinese, which violates the expectation of a consistent language experience unless users explicitly opt into that locale. Readers who do not understand Chinese may be unable to safely interpret important parameter behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

This file is predominantly in English, but some parameter descriptions are presented only in Chinese, which violates the expectation of a consistent language experience unless users explicitly opt into that locale. Readers who do not understand Chinese may be unable to safely interpret important parameter behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

This file is predominantly in English, but some parameter descriptions are presented only in Chinese, which violates the expectation of a consistent language experience unless users explicitly opt into that locale. Readers who do not understand Chinese may be unable to safely interpret important parameter behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

This file is predominantly in English, but some parameter descriptions are presented only in Chinese, which violates the expectation of a consistent language experience unless users explicitly opt into that locale. Readers who do not understand Chinese may be unable to safely interpret important parameter behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

This file is predominantly in English, but some parameter descriptions are presented only in Chinese, which violates the expectation of a consistent language experience unless users explicitly opt into that locale. Readers who do not understand Chinese may be unable to safely interpret important parameter behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

This file is predominantly in English, but some parameter descriptions are presented only in Chinese, which violates the expectation of a consistent language experience unless users explicitly opt into that locale. Readers who do not understand Chinese may be unable to safely interpret important parameter behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

This file is predominantly in English, but some parameter descriptions are presented only in Chinese, which violates the expectation of a consistent language experience unless users explicitly opt into that locale. Readers who do not understand Chinese may be unable to safely interpret important parameter behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

This file is predominantly in English, but some parameter descriptions are presented only in Chinese, which violates the expectation of a consistent language experience unless users explicitly opt into that locale. Readers who do not understand Chinese may be unable to safely interpret important parameter behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

This file is predominantly in English, but some parameter descriptions are presented only in Chinese, which violates the expectation of a consistent language experience unless users explicitly opt into that locale. Readers who do not understand Chinese may be unable to safely interpret important parameter behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

This file is predominantly in English, but some parameter descriptions are presented only in Chinese, which violates the expectation of a consistent language experience unless users explicitly opt into that locale. Readers who do not understand Chinese may be unable to safely interpret important parameter behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

This file is predominantly in English, but some parameter descriptions are presented only in Chinese, which violates the expectation of a consistent language experience unless users explicitly opt into that locale. Readers who do not understand Chinese may be unable to safely interpret important parameter behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

This file is predominantly in English, but some parameter descriptions are presented only in Chinese, which violates the expectation of a consistent language experience unless users explicitly opt into that locale. Readers who do not understand Chinese may be unable to safely interpret important parameter behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

This file is predominantly in English, but some parameter descriptions are presented only in Chinese, which violates the expectation of a consistent language experience unless users explicitly opt into that locale. Readers who do not understand Chinese may be unable to safely interpret important parameter behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

This file is predominantly in English, but some parameter descriptions are presented only in Chinese, which violates the expectation of a consistent language experience unless users explicitly opt into that locale. Readers who do not understand Chinese may be unable to safely interpret important parameter behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

This file is predominantly in English, but an extended block of parameter descriptions is presented only in Chinese, which violates the expectation of a consistent language experience unless users explicitly opt into that locale. Readers who do not understand Chinese may be unable to safely interpret important parameter behavior.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.