Back to skill

Security audit

md2pdf (Pandoc + Typst)

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Markdown-to-PDF converter, but it needs review because its install command is unpinned and its conversion script can overwrite files in unsafe shared directories.

Install only if you are comfortable with the unpinned `npx` installer path, and avoid running this converter in shared or untrusted writable directories. Treat generated PDFs and same-directory temporary files as local file writes that may overwrite existing paths.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/md2pdf.sh:23
Finding

Predictable Temporary Files Permit Symlink-Based File Overwrite

Content
View full analysis
"$TYPST_STYLED" <<'TYPST_HEADER' ``` ```bash # Replace invalid #horizontalrule with proper Typst syntax cat "$TYPST_TMP" | sed 's/#horizontalrule/line(length: 100%, stroke: 0.5pt + luma(180))/g' >> "$TYPST_STYLED" # Typst: styled → PDF typst compile "$TYPST_STYLED" "$OUTPUT" --root "$INPUT_DIR" # Cleanup temp files rm -f "$TYPST_TMP" "$TYPST_STYLED" ``` ### Technical Analysis The script creates two intermediate files using deterministic names derived from the user-supplied input basename: - `.${BASENAME}.typ` - `.${BASENAME}_styled.typ` These files are created in the source file's directory without exclusive creation, symbolic-link validation, or a private temporary directory. If another user or process can write to that directory, it can predict these paths and create symbolic links at them before the script runs. Pandoc's output operation and the shell's `>` or `>>` redirections may follow such symbolic links. Consequently, the script can truncate or overwrite the symlink target using the permissions of the user running the converter. The script also lacks an `EXIT` cleanup trap. Because `set -e` terminates execution after an error, a Pandoc, Typst, or pipeline failure may leave intermediate files containing document data on disk. ### Attack Path 1. The attacker identifies a writa ...[truncated 1334 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
README.md:7
Finding

Installation Instructions Execute a Mutable Unpinned Package

Content
View full analysis
Remediation
View remediation
install md2pdf ``` 2. Document the trusted registry and publisher from which the package must be obtained. 3. Provide an integrity verification mechanism, such as a package lockfile, registry integrity hash, signed release, or checksum for a reviewed artifact. 4. Review and update the pinned version through a controlled dependency-update process rather than resolving a mutable release at installation time. 5. Where feasible, install the verified CLI separately and invoke the pinned local binary instead of allowing `npx` to retrieve arbitrary current content during every installation. ]]>
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (4)

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

The README instructs users to install the skill via npx clawhub@latest, which is an unpinned moving target. If the upstream package or its distribution path is compromised, users may fetch and run unexpected code during installation, creating a supply-chain risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The Typst template sets lang: "de", which forces German locale behavior in the generated PDF. This is a natural-language locale constraint with no documented user opt-in or configurable alternative in the script.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file describes a command that converts a markdown file and states that a PDF is created next to the source file, which is a file-writing operation. The README does not include any explicit warning or disclosure about modifying the filesystem beyond that brief outcome statement, so users are not clearly warned about the write behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The markdown states the output is "German language optimized (hyphenation)", which imposes a locale-specific behavior by default. The file does not offer a language choice or explain that the skill is intentionally limited to a German-specific use case.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.