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_root for 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 uncomment function.
  • 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-change flag is used.
  • [COMMAND_EXECUTION]: The skill uses internal subprocess calls to manage validation and output checking.
  • Evidence: scripts/run_checks.py utilizes subprocess.run to execute other scripts within the package, such as validate_skill.py. These calls are restricted to the local filesystem using sys.executable and 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() and task_path() to prevent traversal attacks, includes a no_symlinks() check to mitigate symlink-based attacks, and uses atomic write operations with os.replace and fsync to ensure data integrity.
Audit Metadata
Risk Level
SAFE
Analyzed
Nov 17, 2026, 09:54 AM