nsfc-budget
Pass
Audited by Gen Agent Trust Hub on Oct 27, 2026
Risk Level: SAFECOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The skill uses
subprocess.runto callxelatexfor PDF generation. This is a legitimate functional requirement. Risks are mitigated by validating all file paths as relative and safe (preventing directory traversal) and by sanitizing all user-provided text before compilation. - [INDIRECT_PROMPT_INJECTION]: The skill processes external proposal documents provided by the user to extract budget information.
- Ingestion points: User-specified materials are copied into a localized hidden task directory (
.bensz-api/task-.../) byinit_budget_run.py. - Boundary markers: The system uses a structured JSON specification (
budget_spec.json) to isolate extracted data from the document structure. - Capability inventory: The skill can write files and execute local shell commands (
xelatex). - Sanitization: The
render_budget_project.pyscript applies a strict whitelist of allowed LaTeX commands (\linebreakand\BudgetBold) and escapes all other control characters (e.g.,%,$,#,_) using theescape_latex_textfunction, preventing embedded instructions in source documents from influencing the compilation process.
Audit Metadata