Back to skill

Security audit

md2pdf

Security checks for vulnerabilities and agentic risk

Overview

This Markdown-to-PDF skill is purpose-aligned, but it asks the agent to install and run unpinned external dependencies and browser assets without clear user approval or integrity controls.

Review before installing. Only run the setup commands after confirming the exact packages, versions, and download sources you trust; prefer a virtual environment or container, avoid elevated privileges, and be aware that the published artifact did not include the referenced conversion script for audit.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:57
Finding

Unpinned Third-Party Dependencies and Chromium Download from an Alternate Source

Content
View full analysis
Remediation
View remediation
" python3 -m playwright install chromium ``` - Pin `PyMuPDF` and `pikepdf` similarly. - Record Pandoc and Chromium versions known to be compatible. 2. **Use a lock file with hashes** - Maintain a requirements or lock file generated from reviewed dependencies. - Require hashes where supported: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` - Review and update the lock file through a controlled dependency-update process. 3. **Verify browser artifacts** - Document the expected Chromium revision and cryptographic checksums. - Verify downloaded artifacts before execution. - Prefer signed official distributions and verify signatures where available. 4. **Reduce reliance on alternate sources** - Use the official Playwright download infrastructure by default. - If a mirror is necessary, document its trust assumptions and require checksum validation against independently published official values. 5. **Require explicit user authorization** - Do not automatically install packages during Skill initialization. - Clearly show the source, version, expected download size, and command, then obtain user approval before execution. 6. **Install in an isolated environment** - Use a dedicated virtual environment or container with minimal filesystem and network access. - Avoid installing or running the conversion workflow as root or an administrator. - Do not expose unrelated credentials or sensitive environment variables to the installation process. 7. **Restore and audit the missing implementation** - Include the referenced `scripts/md2pdf.py` in the distributed package. - Audit it for command injection, unsafe file handling, unrestricted network requests, ...[truncated 90 chars]
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (13)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

SQP-3 covers natural-language policy issues such as forcing a specific language without user opt-in. This file presents all user-facing instructions in Chinese with no alternative language option or explicit notice that the skill is region- or language-specific, which can amount to an undocumented locale constraint.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill instructs installation of packages and browser components that modify the local environment, but the description does not prominently warn users about these side effects. In an agent setting, unclear environment-modifying behavior can lead to unreviewed dependency installation, expanded attack surface, and execution of untrusted package manager flows.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The instruction to inspect LANG=zh_CN and automatically decide whether to show mirror-source guidance imposes locale-based behavior selection without asking the user first. SQP-3 applies because language or locale-specific handling should offer user choice or be clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest description presents a document-conversion utility, which normally implies local processing of user files. However, the documentation explicitly states that Mermaid.js and highlight.js are automatically downloaded and cached locally, and earlier setup steps instruct installation of Playwright/Chromium. Those network-reliant behaviors exceed the narrow conversion description and are not disclosed in the manifest summary.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill documents automatic downloading and caching of external rendering assets without clearly constraining source authenticity, version pinning, or integrity verification. This creates a supply-chain risk: a compromised mirror, upstream asset, or transit path could introduce malicious JavaScript or altered browser components into the local rendering pipeline.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Automatic downloading and local caching of Mermaid.js and highlight.js are network and persistence behaviors that are not clearly disclosed as privacy and security relevant. In an agent context, undisclosed outbound network access and cached executable/rendering assets can surprise users and increase exposure to supply-chain or policy violations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

For markdown files, SQP-2 applies when the skill description omits warnings about behaviors that could affect user data or system state. The README says the AI will automatically perform conversion and later identifies an output/ directory for generated PDFs, but it does not explicitly warn users that running the skill writes files to disk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

This markdown file states that the agent should write preferences into output/user-config.json, but it does not explicitly warn the user that a file will be created or modified on disk. For markdown files, SQP-2 applies when behaviors affecting user data or system state are described without a user-facing warning.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The architecture section states that the same Markdown always produces exactly the same PDF, yet the same documentation also says external components such as Mermaid.js, highlight.js, and Chromium may be downloaded automatically. Because those fetched dependencies can vary across time and environments, the reproducibility claim is stronger than the documented implementation supports.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The display name and description present content in both Chinese and English, which imposes language presentation choices in the skill metadata without stating any user preference or opt-in mechanism. Under the language/locale policy rule, this is a natural-language policy concern because the file defines how the skill is presented across platforms.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

This CSS includes natural-language comments describing the theme in Chinese and specifies Chinese serif fonts such as STSong and Noto Serif CJK SC alongside English fonts. For a general-purpose theme file, this suggests a locale-specific presentation bias without any accompanying opt-in or documentation that the theme is intended only for Chinese-language academic documents.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The natural-language comment says the theme is '适合中文技术文档' and applies to the rendered HTML page, which implies a language-specific design preference. Because the file does not mention user opt-in or a clearly justified region-specific requirement, this can be read as a locale-specific constraint without choice.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.