skills/mathews-tom/armory/md-to-pdf/Gen Agent Trust Hub

md-to-pdf

Warn

Audited by Gen Agent Trust Hub on Sep 17, 2026

Risk Level: MEDIUMPRIVILEGE_ESCALATIONEXTERNAL_DOWNLOADSCOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTIONDYNAMIC_EXECUTION
Full Analysis
  • [PRIVILEGE_ESCALATION]: The scripts/setup.sh script utilizes the sudo command to perform system-level package installations (apt-get install pandoc). This allows the agent to execute commands with elevated privileges if directed to run the setup with the --install flag.
  • [EXTERNAL_DOWNLOADS]: The scripts/setup.sh script downloads and installs dependencies from well-known public registries, including APT, NPM (katex, @mermaid-js/mermaid-cli), and PyPI (playwright).
  • [COMMAND_EXECUTION]: The core conversion script scripts/md_to_pdf.py executes multiple external binaries (pandoc, mmdc, node, playwright) using subprocess.run. The implementation follows best practices by using list-based arguments to avoid shell injection, but it facilitates broad system interaction through these tools.
  • [INDIRECT_PROMPT_INJECTION]: The skill presents a vulnerability surface where untrusted markdown content is processed and rendered via a headless Chromium browser (Playwright).
  • Ingestion points: User-provided markdown files and optional custom CSS files are read into the pipeline in scripts/md_to_pdf.py. Additionally, the --margin argument is injected into CSS templates without sanitization.
  • Boundary markers: No delimiters or warnings are present to prevent the processing of malicious HTML or scripts embedded within the markdown source.
  • Capability inventory: Playwright is launched with the --no-sandbox flag and loads content using the file:// protocol, which allows the browser to access local filesystem resources.
  • Sanitization: The pipeline lacks sufficient sanitization for embedded HTML/JS. Malicious markdown can include scripts or iframes designed to access local files (e.g., /etc/passwd) and exfiltrate their content into the generated PDF or over the network during the rendering phase.
  • [DYNAMIC_EXECUTION]: The skill performs dynamic operations including the use of node -e to resolve module paths at runtime and the execution of a Node.js helper script (scripts/katex_render.js) to process and transform HTML content.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Sep 17, 2026, 09:09 AM