T09 · Insecure Skill Coding Practices
- Location
scripts/xmind_tools2.py:44- Finding
Archive Path Traversal During XMind Extraction
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly does what it claims, but its installation instructions ask for unpinned packages to be installed into the system Python environment, which is higher risk than necessary.
Review this skill before installing. Use an isolated virtual environment with pinned dependencies instead of following the --break-system-packages commands, and confirm exactly which uploaded document should be processed before letting it read files or generate outputs.
scripts/xmind_tools2.py:44Archive Path Traversal During XMind Extraction
SKILL.md:168Unpinned Dependencies Installed Into the System Python Environment
声明的核心能力是“从需求文档自动生成测试用例并导出为 XMind”,这是一个需求分析与测试设计技能;但提供的代码只是一个文件读取器,负责按格式解析文档并输出纯文本,属于前置支撑步骤而非完整技能实现。虽然读取需求文档可作为后续生成测试用例的支持环节,但当前代码片段本身没有任何测试点提取、用例生成、覆盖分析、脑图/XMind 导出等逻辑,因此与声明的主要用途存在实质性不匹配。另有轻微范围差异:代码支持 Excel/CSV,而声明未提及。
声明的核心能力是“从需求文档自动生成全面覆盖的测试用例,并支持导出为 XMind”。但这段代码的实际职责明显更窄:它接受外部已经构造好的 test_cases 列表,按模块和测试类型组织为 XMind 脑图,并通过解压/重打包注入 manifest.xml 来提升 XMind 文件兼容性。代码没有文档解析、内容抽取、需求理解、测试点生成、覆盖分析等实现,因此与声明的主要用途存在实质性不一致。虽然“导出为 XMind”这一子能力是匹配的,但仅覆盖了声明中的一部分,不能代表整体描述准确。
The trigger conditions are extremely broad: any uploaded document plus vague terms like '测试', '用例', 'XMind', or '覆盖' causes immediate activation. Overbroad activation can make the agent process unrelated or sensitive files unexpectedly, increasing the risk of unauthorized file handling, privacy leakage, and unintended execution of file-processing steps.
The skill instructs the agent to read uploaded files and generate output files, but it does not declare any explicit tool scope such as allowed-tools or permissions. Without scoped permissions, the runtime may permit broader file access than intended, increasing the chance of accidental or unauthorized reads/writes when handling user-supplied documents and generated artifacts.
Mandatory activation wording without clear scope constraints pressures the system to invoke the skill whenever loosely related conditions are met. In a skill that reads uploaded files and may create outputs, this increases the likelihood of unintended processing of user content outside the precise task the user intended.
The file presents all instructional content in Chinese and gives no indication that users may choose another language or that the skill is intentionally restricted to a Chinese-language context. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.
The module docstring, usage text, and error/output strings are written exclusively in Chinese, which imposes a specific language on users. The file does not provide any opt-in, localization choice, or justification that this skill is intended only for a Chinese-speaking or region-specific environment.
The manifest description limits the input scope to requirement documents in Word, PDF, Markdown, and TXT formats. Later documentation expands the actual file-reading behavior to .xlsx, .xlsm, .xls, and .csv, which is broader than the stated manifest behavior rather than an obvious implementation detail.