pdfkit-py
Fail
Audited by Gen Agent Trust Hub on Sep 8, 2026
Risk Level: HIGHDYNAMIC_EXECUTIONEXTERNAL_DOWNLOADSCOMMAND_EXECUTION
Full Analysis
- [DYNAMIC_EXECUTION]: The module
scripts/pdfkit/commands/exec_python.pyimplements a command that allows for the execution of arbitrary Python code viacompile()andexec(). Although the skill attempts to sandbox this environment by whitelisting modules and restricting built-in functions, the execution of user-controlled code remains a significant security risk for the host environment. - [DYNAMIC_EXECUTION]: The entry script
scripts/pdfkit.pyfeatures an extension discovery mechanism that dynamically imports and executes Python files located in a sibling directory (../pdfkit-extension/scripts/) usingimportlib.util.spec_from_file_locationandexec_module. This design could allow for the execution of unauthorized code if a malicious actor or another skill is able to write to that directory. - [COMMAND_EXECUTION]: Several components, such as
convert.py,compress.py,smart_edit.py, andpdf_to_word.py, usesubprocess.run()to interact with system utilities like Ghostscript (gs), LibreOffice (soffice), and Tesseract. These processes take arguments derived from JSON input, which may lead to command injection if input parameters are not strictly validated. - [EXTERNAL_DOWNLOADS]: The initialization scripts
setup.shandsetup.batdownload a standalone Python distribution from GitHub (astral-sh/python-build-standalone) and a CJK font from Tencent's CDN (docs.gtimg.com). While these are well-known services, the practice of fetching and installing binaries at runtime constitutes an external dependency risk that bypasses typical package manager audits.
Recommendations
- AI detected serious security threats
Audit Metadata