Back to skill

Security audit

Markdown to PDF (CJK)

Security checks for vulnerabilities and agentic risk

Overview

This is a straightforward Markdown-to-PDF converter with optional dependency and font installation steps, with no hidden or destructive behavior found.

Use a virtual environment and consider pinning ReportLab before installing. Only run the sudo font installation commands if you trust your OS package sources and need CJK fonts on that machine. Treat the converter like a local file tool: it reads the Markdown path you give it and writes the PDF path you give it.

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:36
Finding
Unpinned Third-Party Dependency Installation## Vulnerability Details **File Location**: `SKILL.md`, lines 36–40 **Vulnerability Type**: Unpinned third-party package dependency **Risk Level**: Medium ### Vulnerable Code ```markdown ## Dependencies ```bash pip3 install reportlab ``` ``` ### Technical Analysis The installation instructions retrieve `reportlab` from the user's configured Python package index without specifying an audited version or verifying an integrity hash. Consequently, the installed package and its transitive dependencies may change over time, and installation relies on the security of the configured index, package releases, and dependency resolver. This creates a software supply-chain risk. If an upstream release, package-index account, configured mirror, or transitive dependency is compromised, following the documented command could install attacker-controlled code. Python packages may execute code during installation, and the installed package is later imported by `scripts/md_to_pdf.py`, providing another execution opportunity. No evidence indicates that the current `reportlab` package is malicious. The finding concerns the mutable and unverified dependency installation process. ### Attack Path 1. An attacker compromises an upstream package release, a transitive dependency, the configured package index, or a package mirror used by the victim. 2. The victim follows the Skill documentation and runs `pip3 install reportlab`. 3. Pip resolves and downloads the attacker-controlled package version because no version or integrity hash is required. 4. Malicious package code executes during installation or when `scripts/md_to_pdf.py` imports ReportLab. 5. The malicious code runs with the privileges of the user executing pip or the conversion script. ### Impact Assessment Successful exploitation could allow arbitrary code execution under the invoking user's account. Depending on that account's permissions, an attacker could access or modify files available to the user, read environ ...[truncated 282 chars]
Remediation
## Remediation Suggestions 1. Pin ReportLab to a reviewed, exact version rather than accepting the latest available release. 2. Place dependencies in a version-controlled requirements file and require cryptographic hashes, for example: ```text reportlab==<reviewed-version> \ --hash=sha256:<verified-package-hash> ``` 3. Install with hash enforcement: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` 4. Pin and hash all transitive dependencies, preferably using a lock-file workflow such as `pip-tools`. 5. Use an explicitly trusted package index or internally controlled artifact repository. 6. Periodically review pinned versions for known vulnerabilities and update them through a controlled testing and approval process. 7. Perform installation in an isolated virtual environment or container under a non-privileged account.
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Lp3

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding
Without declared permissions the skill's intent is opaque and cannot be validated.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
```bash
# RHEL/CentOS/Alibaba Cloud Linux
sudo yum install -y google-noto-sans-cjk-ttc-fonts

# Ubuntu/Debian
sudo apt install -y fonts-noto-cjk
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
```bash
# RHEL/CentOS/Alibaba Cloud Linux
sudo yum install -y google-noto-sans-cjk-ttc-fonts

# Ubuntu/Debian
sudo apt install -y fonts-noto-cjk
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Static analysis

No suspicious patterns detected.