markdown-to-epub
Warn
Audited by Gen Agent Trust Hub on Feb 27, 2026
Risk Level: MEDIUMCOMMAND_EXECUTIONDATA_EXFILTRATIONPROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The script
scripts/build_epub.pyexecutes the externalebook-convertbinary usingsubprocess.run. While the use of a list for arguments mitigates shell injection, the binary path itself is configurable via the--ebook-convert-binflag, which could be abused if an attacker influences the command-line arguments. - [DATA_EXFILTRATION]: The image resolution logic in the
resolve_source_filefunction is vulnerable to path traversal. It uses.resolve()on paths extracted from the Markdown file without verifying that the resulting path is contained within the intendedsource_root. This allows the script to read arbitrary files accessible to the user (e.g.,) and copy them into thebuild_epub/assetsdirectory. - [PROMPT_INJECTION]: The skill exhibits a surface for indirect prompt injection via its data ingestion points.
- Ingestion points: Reads and processes user-provided Markdown files and an optional fallback JSON map.
- Boundary markers: Absent; there are no delimiters or instructions to prevent the agent or the conversion tool from interpreting malicious content within the Markdown as instructions.
- Capability inventory: The skill has the capability to execute subprocesses, read/write files, and delete directories via
shutil.rmtree. - Sanitization: Absent; the script does not sanitize Markdown content or validate that file paths remain within a sandboxed directory.
Audit Metadata