nsfc-budget
Pass
Audited by Gen Agent Trust Hub on Mar 7, 2026
Risk Level: SAFECOMMAND_EXECUTIONPROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The skill invokes the
xelatexsystem compiler usingsubprocess.runto transform LaTeX source into PDF documents. This operation is performed securely: the--shell-escapeflag is not used, preventing the execution of arbitrary shell commands from within the LaTeX environment, and the working directory is restricted to a validated output folder. - [PROMPT_INJECTION]: The skill possesses an indirect prompt injection surface as it processes untrusted user-provided materials to generate document content.
- Ingestion points: External text materials are loaded via
init_budget_run.pyand stored inbudget_spec.json. - Boundary markers: None (direct interpolation into template sections).
- Capability inventory: The agent can perform file system writes and execute the
xelatexcompiler via Python scripts. - Sanitization: Highly effective. The
escape_latex_textfunction inrender_budget_project.pyexplicitly escapes LaTeX control characters (%, &, $, #, _, {, }, ~, ^), which neuters any attempted LaTeX injection attacks from the input material. - [SAFE]: File system security is maintained through a dedicated
runtime_utils.pymodule. The functionssafe_rel_pathandresolve_underperform rigorous checks (e.g., forbidding absolute paths and directory traversal segments like '..') to ensure all file operations remain confined to the user-designated workspace, preventing unauthorized access or accidental overwriting of system files.
Audit Metadata