book-to-skill
Warn
Audited by Gen Agent Trust Hub on Sep 1, 2026
Risk Level: MEDIUMCOMMAND_EXECUTIONREMOTE_CODE_EXECUTIONEXTERNAL_DOWNLOADSINDIRECT_PROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The skill executes external system binaries using
subprocess.run()to perform document extraction and analysis. This includes tools likepdftotextandpdfinfofor PDF files, andebook-convert(from Calibre) for MOBI/AZW formats. These operations are implemented using list-style arguments to prevent shell injection risks. - [REMOTE_CODE_EXECUTION]: The script
scripts/book_to_skill/dependencies.pycontains functionality to install Python packages usingpip(sys.executable -m pip install). While the skill defaults to reporting the command rather than executing it, it allows for unattended installation if theBOOK_SKILL_INSTALL_MISSINGenvironment variable is set or the--install-missing yesflag is used. - [EXTERNAL_DOWNLOADS]: Through its dependency management system, the skill can download and install external Python packages from the Python Package Index (PyPI). Additionally, the skill provides links and instructions for downloading external tools like Calibre.
- [INDIRECT_PROMPT_INJECTION]: The skill ingests untrusted document content (e.g., PDFs, Ebooks) and uses it to generate structured instructions for an AI agent. This creates a surface for indirect prompt injection if the source documents contain malicious instructions. The skill implements multiple robust mitigations:
- Ingestion points:
extract_document.pyreads user-provided file paths for processing. - Boundary markers: The skill structure uses Markdown headers to separate data, and a validator (
scripts/book_skill_validator.py) scans for common injection phrases in the output. - Capability inventory: The skill can write to the local filesystem, execute system commands, and install Python packages.
- Sanitization:
scripts/book_to_skill/sanitize.pystrips adversarial invisible Unicode characters, andscripts/book_to_skill/zip_safety.pyprevents XML/ZIP-based attacks.
Audit Metadata