T09 · Insecure Skill Coding Practices
- Location
main.py:95- Finding
Unchecked Report Path Allows Arbitrary File Overwrite
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill has a coherent citation-assistance purpose, but its included script can rewrite paper files without the promised backup and can overwrite files outside the project through an unchecked report path.
Review before installing or running. Use version-pinned dependencies in an isolated environment, avoid the documented pdflatex pip package unless independently verified, keep the report path relative and inside the paper project, and make your own backup or use version control before allowing the skill to edit TeX/BibTeX files.
main.py:95Unchecked Report Path Allows Arbitrary File Overwrite
reference/CODE.MD:6Unpinned and Unnecessary Third-Party Package Installation
main.py:77TeX Files Are Rewritten Without the Documented Backup Safeguard
The natural-language instructions and usage details are presented only in Chinese, and there is no indication that users can opt into another language or that the skill is intended solely for a Chinese-language audience. SQP-3 applies to language or locale policy violations when a specific language is effectively forced without user opt-in.
The skill explicitly performs write operations against TeX/BibTeX project files by adding BibTeX entries and inserting citation markers, but the description does not clearly warn users that source files will be modified. This can lead to unintended document changes, repository pollution, or overwriting user work, especially in collaborative Overleaf-style projects where file edits have immediate effect.
The workflow sends content-derived keywords from the user's paper to Google Scholar via the scholarly library, but the skill description does not disclose this network exfiltration/privacy behavior. Even if only keywords are sent, they may reveal unpublished research topics, sensitive project themes, or confidential manuscript content to third-party services.
The top-level description says the tool will add BibTeX entries and insert citation markers into relevant sections of the TeX project. In the code, there is no logic that edits any .tex file or inserts \cite commands; it only reads TeX content, searches Scholar, appends entries to custom.bib, and writes ADD.MD.
The tool derives keywords from the user's paper and sends them to Google Scholar via the scholarly library, but the description does not warn about external network access or disclosure of paper-derived queries. In research workflows, even partial topic leakage can expose confidential project direction, unpublished work, or sensitive subject matter to third-party services.
The tool derives keywords from the user's paper and sends them to Google Scholar via the scholarly library, but the description does not warn about external network access or disclosure of paper-derived queries. In research workflows, even partial topic leakage can expose confidential project direction, unpublished work, or sensitive subject matter to third-party services.
The docstring states that if no anchor substring is provided, the sentence is appended to the end of the file. However, when the target .tex file is empty, insert_idx becomes 0 and the loop over existing lines never runs, so no sentence is inserted before the file is rewritten. This is a direct contradiction between the documented behavior and actual behavior for that case.
The entire skill documentation is written in Chinese, and there is no indication that language selection is optional or that the skill is intentionally limited to a Chinese-speaking context. This can violate language/locale policy when a specific language is imposed without opt-in.
The example shows running the script with --project_dir, --num_references, and --output_report arguments. In the code, main() hardcodes these values and does not use argparse or otherwise consume command-line options, so the documented invocation does not match the implementation.
The documentation states that a detailed report of all added citations will be generated. However, the report generation code only writes a single line containing the total number of citations added, without listing which citations were added or any details about them.