T09 · Insecure Skill Coding Practices
- Location
scripts/report_generator.py:33- Finding
Unescaped Skill Metadata Enables Markdown and Terminal Output Injection
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a disclosed local scanner for finding similar installed skills, with some limited implementation hygiene risks but no hidden persistence, network access, or destructive behavior.
Install only if you are comfortable letting it read SKILL.md files under the skills directory you choose. Prefer scanning trusted directories, review reports carefully because another skill's metadata could affect Markdown output, and consider pinning PyYAML before production use.
scripts/report_generator.py:33Unescaped Skill Metadata Enables Markdown and Terminal Output Injection
scripts/skill_scanner.py:24Symlink Traversal Allows Scanning Outside the Selected Directory
The declared purpose describes a diagnostic tool for scanning installed skills for duplicates and naming conflicts. The actual code chunk does not implement any scanning, comparison, conflict detection, or installed-skill analysis. Instead, it is a multilingual support utility that loads localization files, returns translated text, and detects the system language. While bilingual support is mentioned in the description, this code only covers that supporting aspect and not the core advertised functionality. Therefore, the code chunk's behavior does not accurately represent the declared primary purpose.
The code implements a basic skill metadata/content scanner, not a duplicate/conflict detector. It reads SKILL.md files and extracts name, description, path, full content, and body, but contains no logic to compare skills against each other, identify duplicates, detect naming conflicts, or analyze similarity. It also does not implement any language auto-detection or command-line flag support. The filesystem access to scan skill directories is consistent with the general scanning theme, but the primary declared purpose is materially overstated relative to the actual behavior.
Without declared permissions the skill's intent is opaque and cannot be validated.
The trigger phrase set includes broad requests such as "audit my skills," which can plausibly match ordinary user requests about reviewing their skills rather than specifically invoking this skill. In an agent ecosystem, overly generic triggers can cause unintended activation, model confusion, or interception of requests meant for other skills, especially since this skill itself is about auditing skills and may be selected in many adjacent contexts.
The skill contains natural-language intent and code logic that automatically selects between Chinese and English based on the system locale, falling back to English otherwise. This enforces a locale choice without an explicit user opt-in or a documented language-selection prompt, which matches the policy concern for forced language behavior.
This Python file uses Chinese-only natural-language documentation and inline comments, including the module and class docstrings and method descriptions. Under the stated policy, forcing a specific language without offering user choice or documenting a justified locale constraint is a natural-language policy violation.
This JSON manifest defines activation phrases such as “审查我的技能” and “有没有相似的技能” that are relatively generic and could match normal conversational requests rather than an intentional invocation of this specific skill. The file does not provide exclusion conditions or negative examples to clarify when the skill should not activate.
The dependency is specified as PyYAML>=6.0 without an upper bound or exact pin, which makes builds non-reproducible and can silently pull in different releases over time. This increases supply-chain risk and makes it harder to verify whether a deployed environment is using a patched or vulnerable version of PyYAML.
PyYAML>=6.0
PyYAML has a history of security advisories, and because the manifest does not pin an exact version, it is not possible to verify from this file alone whether the installed package is affected by known CVEs. In a skill that scans installed skills and may plausibly parse YAML-based metadata, using an unverifiable PyYAML version increases the chance that a vulnerable parser could be introduced into the runtime.
The manifest describes a narrowly scoped skill for scanning installed skills for duplicates and naming conflicts, but the top-level docstring labels the entrypoint as "Skill Auditor". While the implementation shown only performs scanning and report generation, this documentation broadens the apparent purpose and contradicts the stated skill identity.
The natural-language description says the tool supports switching between Chinese and English, and the implementation restricts language selection to 'en', 'zh', or auto-detect. This is a locale limitation embedded in the skill; users are not offered broader language choice or an explicit opt-in justification for excluding other locales.
This code file contains Chinese-only docstrings and user-facing descriptions such as '报告生成器 - 支持多语言' and '生成审计报告', but there is no visible mechanism in this file for user language selection or opt-in. Under the policy rule, forcing or assuming a specific language without explicit user choice can be a natural-language policy concern.
This Python file contains natural-language comments and docstrings exclusively in Chinese, such as the module docstring and method/class descriptions. Under the stated policy, forcing a specific language without offering a choice or documenting a justified regional constraint is a locale-policy issue.
No suspicious patterns detected.