latex-defense-zh
Pass
Audited by Gen Agent Trust Hub on Sep 29, 2026
Risk Level: SAFECOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The skill uses
subprocess.runinscripts/build_deck.pyto executelatexmkfor compiling the generated Beamer slides into a PDF. The execution is restricted to a specific set of hardcoded arguments and targets a file generated by the script itself, significantly reducing the risk of arbitrary command injection. - [INDIRECT_PROMPT_INJECTION]: The skill processes untrusted data from external LaTeX repositories (PhD/Master thesis files), which represents a potential injection vector.
- Ingestion points: The skill ingests untrusted
.texand.auxfiles from a user-provided thesis directory viascripts/extract_thesis.pyandscripts/tex_loader.py. - Boundary markers: The
SKILL.mdfile contains a 'Safety Boundaries' section that explicitly instructs the agent to treat all thesis content as untrusted and to ignore any embedded instructions or prompts. - Capability inventory: The skill has the capability to write files to the local file system and execute LaTeX compilation commands using the
uv runtoolchain. - Sanitization: The
scripts/build_deck.pyscript implements atex_escapefunction that sanitizes text fields by escaping LaTeX special characters (e.g.,\,{,},$,&,#,%,_,~,^) before they are rendered into the final.textemplate, preventing unintended command execution within the LaTeX environment.
Audit Metadata