T09 · Insecure Skill Coding Practices
- Location
scripts/md_to_docx_final.py:128- Finding
Arbitrary JavaScript Execution Through Insufficient Markdown Escaping
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill should be reviewed before installation because it rewrites thesis files at hardcoded local paths and runs generated code during document conversion.
Install only after reviewing the scripts and preferably after replacing hardcoded paths with explicit user-selected input and output paths, adding backups or dry-run diffs before any write, pinning npm dependencies, and fixing the Markdown-to-DOCX converter so document text is serialized as data rather than executable JavaScript.
scripts/md_to_docx_final.py:128Arbitrary JavaScript Execution Through Insufficient Markdown Escaping
SKILL.md:29Unpinned npm Dependency Installation Creates Supply-Chain Exposure
Using fixed local file paths while claiming to be a general citation-management tool is dangerous because it can cause unintended reads or writes to local documents without user awareness. The academic-paper context increases sensitivity because the targeted files may contain private research, student records, or unpublished thesis content.
Using fixed local file paths while claiming to be a general citation-management tool is dangerous because it can cause unintended reads or writes to local documents without user awareness. The academic-paper context increases sensitivity because the targeted files may contain private research, student records, or unpublished thesis content.
Using fixed local file paths while claiming to be a general citation-management tool is dangerous because it can cause unintended reads or writes to local documents without user awareness. The academic-paper context increases sensitivity because the targeted files may contain private research, student records, or unpublished thesis content.
Using fixed local file paths while claiming to be a general citation-management tool is dangerous because it can cause unintended reads or writes to local documents without user awareness. The academic-paper context increases sensitivity because the targeted files may contain private research, student records, or unpublished thesis content.
Using fixed local file paths while claiming to be a general citation-management tool is dangerous because it can cause unintended reads or writes to local documents without user awareness. The academic-paper context increases sensitivity because the targeted files may contain private research, student records, or unpublished thesis content.
Using fixed local file paths while claiming to be a general citation-management tool is dangerous because it can cause unintended reads or writes to local documents without user awareness. The academic-paper context increases sensitivity because the targeted files may contain private research, student records, or unpublished thesis content.
Using fixed local file paths while claiming to be a general citation-management tool is dangerous because it can cause unintended reads or writes to local documents without user awareness. The academic-paper context increases sensitivity because the targeted files may contain private research, student records, or unpublished thesis content.
Using fixed local file paths while claiming to be a general citation-management tool is dangerous because it can cause unintended reads or writes to local documents without user awareness. The academic-paper context increases sensitivity because the targeted files may contain private research, student records, or unpublished thesis content.
Using fixed local file paths while claiming to be a general citation-management tool is dangerous because it can cause unintended reads or writes to local documents without user awareness. The academic-paper context increases sensitivity because the targeted files may contain private research, student records, or unpublished thesis content.
Using fixed local file paths while claiming to be a general citation-management tool is dangerous because it can cause unintended reads or writes to local documents without user awareness. The academic-paper context increases sensitivity because the targeted files may contain private research, student records, or unpublished thesis content.
The skill does not clearly warn users that it may modify documents and automatically expand paper content, which is dangerous because users may authorize it without understanding that it can alter substantive academic work. In this context, undisclosed expansion of thesis content can lead to integrity issues, policy violations, and irreversible overwrites of important documents.
The generated JavaScript directly interpolates markdown-derived text and output paths into code, but only escapes double quotes. An attacker can include backslashes, newlines, Unicode line separators, or other JavaScript-significant characters in markdown content to terminate strings or alter program structure, leading to arbitrary code execution when Node runs the file.
The skill declares shell, file read, and file write capabilities implicitly through documented script execution, but does not scope or constrain those permissions in metadata. That increases the blast radius if the skill is invoked unexpectedly or implemented with unsafe path handling, because it can read and modify local documents without an explicit trust boundary.
The manifest says the skill triggers when users mention a long list of topics including broad phrases like “Word转Markdown”, “整理参考文献”, and especially “学术论文字数不够”. These are not tightly scoped to citation automation and lack exclusion conditions or negative examples, which increases the chance of unintended invocation for general writing or formatting requests.
The description repeatedly states the skill is for processing Chinese academic papers and Chinese thesis workflows, but does not present this as an optional or clearly justified locale constraint. Under the language/locale policy, restricting usage to a specific language should either be opt-in or explicitly documented as a necessary limitation.
This markdown file presents its instructions and implementation details exclusively in Chinese, beginning with the title and continuing throughout the document. Under the policy for natural-language violations, forcing a specific language without user opt-in can exclude users unless the locale restriction is explicitly documented and justified.
The module docstring is written entirely in Chinese and presents the skill as a Chinese-language converter description, while the code's user-facing messages are also Chinese-only. This indicates a fixed language/locale experience without any opt-in or documented justification, which matches the policy concern for forced language selection.
The script hardcodes a specific local thesis document path and a fixed output path in a user home directory, which is not appropriate for a reusable conversion skill. In an agent environment, this can cause unintended access to sensitive local files, leak the existence and naming of private academic work, and overwrite files in a predictable location without explicit user consent.
This code file contains user-facing natural language that assumes Chinese as the required language, including the module docstring and later console output. Under the policy, forcing a specific language without user opt-in or clear justification is a natural-language policy violation.
The script is hardcoded to modify a specific local manuscript file and appends a large unrelated appendix, which is behaviorally inconsistent with a citation-management utility. This is dangerous because it silently alters user-authored academic content in place, causing integrity loss and potentially inserting deceptive material into a thesis without review.
The script injects extensive prewritten thesis content across multiple domains unrelated to bibliography processing, effectively fabricating academic material. In the context of an academic-paper citation skill, this is especially dangerous because it can facilitate plagiarism, falsification, or undisclosed ghostwriting while appearing to be a legitimate formatting tool.
The script writes directly back to the original markdown file without warning, confirmation, backup, or transactional safety. This can irreversibly overwrite important user work, especially when combined with the hardcoded file path and bulk content injection behavior.
The module docstring and all user-facing messages are written only in Chinese, which imposes a specific language on users without any opt-in or alternative locale support. Under the policy rule, forced language choice in natural-language content is a reportable issue unless the locale restriction is explicitly justified.
The module description and subsequent logic are written specifically for Chinese-language thesis validation, including counting Chinese characters as the primary measure of length. This imposes a locale-specific workflow in natural language and behavior without any opt-in or documented user choice.
The manifest describes a tool for citation management tasks such as extracting references, inserting citation markers, converting Word/Markdown, and expanding thesis length. This file's stated purpose and implementation instead generate per-reference '摘要' summaries from citation contexts, which is a distinct literature-analysis capability not described in the manifest.
No suspicious patterns detected.