T09 · Insecure Skill Coding Practices
- Location
scripts/collect_categories.py:131- Finding
Spreadsheet Formula Injection Through Unsanitized CSV Fields
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a straightforward category-link parser that writes CSV files, with some file-handling and CSV-safety caveats users should understand before use.
Install only if you are comfortable with a Chinese-language CSV utility that writes files locally. Override the default output directory before use, avoid running the included tests on shared systems without reviewing the /tmp cleanup path, and treat generated CSVs as untrusted if links can come from other people because spreadsheet apps may evaluate formula-like cell contents.
scripts/collect_categories.py:131Spreadsheet Formula Injection Through Unsanitized CSV Fields
Referenced artifact was not completely inspected
- Skill主文件: `SKILL.md`
The test performs a recursive deletion of a hard-coded directory using shutil.rmtree on /tmp/test_category_collector. Recursive deletion is dangerous because if the target path is changed, replaced with a symlink, or reused by another process, the test could delete unintended files or directories on the host running the tests.
# 确保目录不存在
if os.path.exists(test_dir):
import shutil
shutil.rmtree("/tmp/test_category_collector")
test_links = ["https://example.com/collections/test"]
This cleanup step again recursively deletes a fixed directory tree under /tmp. In shared or CI environments, deleting predictable filesystem locations can interfere with other processes or remove attacker-planted content if path ownership and resolution are not validated.
# 清理
import shutil
shutil.rmtree("/tmp/test_category_collector")
if __name__ == "__main__":
The skill description and feature list are presented in Chinese, including a stated feature of providing Chinese headers, but the README does not offer an English or user-selectable language option. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation unless it is clearly justified as region-specific.
The skill advertises behavior that reads inputs and references network URLs, and it also writes output files, but it does not declare any explicit tool scope such as permissions or allowed-tools. This creates a trust and review gap: an agent may invoke file or network-capable tooling without the user being clearly warned or the runtime being constrained, increasing the chance of unintended data access or outbound requests.
The skill states that it saves extracted data to CSV and even includes a default absolute path, but the description does not clearly warn users that local disk writes will occur. This can cause unintentional disclosure or persistence of scraped data on the host system, especially if the default directory is sensitive, shared, synced, or unsuitable for the current environment.
The file's docstring, comments, and all user-facing print messages are in Chinese, which imposes a specific language on users. Under the policy rule, this is a natural-language locale constraint and there is no opt-in, fallback, or documented justification that the skill is region-specific.
This file contains multiple natural-language strings such as the module docstring, function docstrings, and printed output exclusively in Chinese. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is clearly justified, which is not present here.
This markdown file presents the skill usage solely in Chinese ('使用示例'), and the rest of the document continues in that language without any opt-in, alternative language, or justification that the skill is region-specific. Under the policy, forcing a specific language without user choice is a natural-language locale violation.
The file’s module docstring and later user-facing console messages are written only in Chinese, which imposes a specific language on users without opt-in. Under the policy, language/locale constraints should either be optional for the user or clearly justified as region-specific.
This Python file contains multiple user-facing strings in Chinese, including the module docstring and all printed test status messages. The file does not provide any user opt-in, fallback, or explanation that the skill is intentionally limited to Chinese-speaking users, which is a natural-language locale policy concern.
The natural-language content in the docstring, comments, and user-facing print statements is entirely in Chinese, with no indication that language is configurable or selected by user preference. Under the policy, forcing a specific language without opt-in is a locale/language policy violation.
The module docstring, comments, and test descriptions are written in Chinese throughout the file. This creates a language-specific constraint in natural-language content without any indication that Chinese is required or any opt-in/alternative language support.
The user-facing description and operational instructions are written entirely in Chinese, with no indication that other languages are supported or that the locale is intentionally restricted. Under the policy, forcing a specific language without user opt-in can be a natural-language policy issue unless the constraint is explicit and justified.
The script writes output to a hard-coded absolute local path, which is unsafe and brittle in an agent skill because it can overwrite files in an unintended user directory, fail on other systems, or leak collected data into a location the caller did not approve. In this context the risk is limited because the path is fixed rather than attacker-controlled, but it still violates least surprise and safe file-handling expectations.
The natural-language strings and docstrings throughout the file are written in Chinese, with no indication that language choice is optional or region-specific. Under the language/locale policy, forcing a specific language without user opt-in can be a policy violation.
This code reads arbitrary file contents from a provided path, but there is no confirmation prompt, warning comment, or user-facing disclosure about accessing local files. For code-file warning checks, local file access that touches user data should be disclosed unless clearly documented as expected behavior.
This Python code performs a file-output operation by setting an output directory and invoking a collection function that returns a CSV path, but the script provides no prior warning or confirmation before writing data. While it prints status messages, those messages do not disclose beforehand that files will be created in a specific local path.
This code creates directories under /tmp and later recursively deletes /tmp/test_category_collector via shutil.rmtree, which is a destructive filesystem operation. While it is test code, there is no visible warning, log, or explanatory comment near the deletion to disclose that the test modifies and removes filesystem state.
No suspicious patterns detected.