nsfc-research-content-writer
Pass
Audited by Gen Agent Trust Hub on Nov 17, 2026
Risk Level: SAFEINDIRECT_PROMPT_INJECTIONCOMMAND_EXECUTION
Full Analysis
- [INDIRECT_PROMPT_INJECTION]: The skill processes user-provided LaTeX (.tex) and BibTeX (.bib) files within a project directory, creating an attack surface for instructions embedded in data.
- Ingestion points: LaTeX files and bibliography keys are read from the
project_rootfor analysis and revision. - Boundary markers: The skill instructs the agent to treat these files as read-only context and explicitly strips LaTeX comments before analysis using the
uncommentfunction. - Capability inventory: The skill has the capability to overwrite specific LaTeX files and execute internal Python scripts for validation.
- Sanitization: It employs a
structure()function that compares the sequence of LaTeX macros, environments, and labels between the original and proposed content. This prevents the agent from injecting unauthorized LaTeX commands unless a specific--allow-structure-changeflag is used. - [COMMAND_EXECUTION]: The skill uses internal subprocess calls to manage validation and output checking.
- Evidence:
scripts/run_checks.pyutilizessubprocess.runto execute other scripts within the package, such asvalidate_skill.py. These calls are restricted to the local filesystem usingsys.executableand absolute paths derived from the skill root, preventing arbitrary command injection. - [SAFE]: The skill follows security best practices for file management and system interaction. It implements rigorous path validation in
under()andtask_path()to prevent traversal attacks, includes ano_symlinks()check to mitigate symlink-based attacks, and uses atomic write operations withos.replaceandfsyncto ensure data integrity.
Audit Metadata