T09 · Insecure Skill Coding Practices
- Location
scripts/validate_skill.py:682- Finding
Validation of an Untrusted Skill Executes Its Project-Supplied Fingerprint Script
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mainly builds structured prompts, but it includes maintenance scripts that can execute code from projects being validated or documented.
Install only if you want a Chinese-first prompt-engineering template and can avoid running its maintenance scripts on untrusted repositories. Treat scripts/validate_skill.py and assets/generate-api-docs.py as trusted-code-only tools; run them in an isolated environment if validating or documenting third-party content.
scripts/validate_skill.py:682Validation of an Untrusted Skill Executes Its Project-Supplied Fingerprint Script
assets/generate-api-docs.py:136API Documentation Generation Imports and Executes Project-Controlled Python Modules
Large-scale compliance auditing, directory traversal, file hygiene inspection, and JSON/exit-code reporting are operational auditing behaviors, not merely prompt generation. When a skill understates these capabilities, agents may invoke broad local inspection logic in a context that did not justify it, increasing privacy and integrity risks.
Large-scale compliance auditing, directory traversal, file hygiene inspection, and JSON/exit-code reporting are operational auditing behaviors, not merely prompt generation. When a skill understates these capabilities, agents may invoke broad local inspection logic in a context that did not justify it, increasing privacy and integrity risks.
Large-scale compliance auditing, directory traversal, file hygiene inspection, and JSON/exit-code reporting are operational auditing behaviors, not merely prompt generation. When a skill understates these capabilities, agents may invoke broad local inspection logic in a context that did not justify it, increasing privacy and integrity risks.
Large-scale compliance auditing, directory traversal, file hygiene inspection, and JSON/exit-code reporting are operational auditing behaviors, not merely prompt generation. When a skill understates these capabilities, agents may invoke broad local inspection logic in a context that did not justify it, increasing privacy and integrity risks.
Referenced artifact was not completely inspected
- 契约门禁:见 [scripts/validate_skill.py](scripts/validate_skill.py)(用途:校验原子契约/深度段/指纹/依赖规则/信号表;运行:`python scripts/validate_skill.py --skill-dir . --strict`)
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
# claude 模型适配器
<!--
MODEL-ADAPTER
id: claude
target: Anthropic Claude 系列(Opus / Sonnet / Haiku)
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
# deepseek 模型适配器
<!--
MODEL-ADAPTER
id: deepseek
target: DeepSeek 系列(V3 / R1)
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
# gemini 模型适配器
<!--
MODEL-ADAPTER
id: gemini
target: Google Gemini 系列
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
# openai 模型适配器
<!--
MODEL-ADAPTER
id: openai
target: OpenAI GPT 系列(gpt-4o / o-series / gpt-5 系)
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
# qwen 模型适配器
<!--
MODEL-ADAPTER
id: qwen
target: 阿里通义千问系列(Qwen)
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
ex = read_text(skill_dir / "references" / "complete-examples.md")
checked.append("references/complete-examples.md")
if da is None or ex is None:
return
rules = re.findall(
r"^\|\s*R(\d+)\s*\|\s*([a-z-]+)\s*(=|≥|≤)\s*D(\d)\s*\|"
r"\s*([a-z-]+)\s*(=|≥|≤)\s*D(\d)\s*\|",
The skill advertises and references scripts that use file reads, file writes, and shell execution, but it declares no explicit tool scope or permission boundaries. In an agent environment, this can cause the skill to run with broader-than-expected capabilities, increasing the chance of unintended filesystem modification or command execution.
The trigger text says to use the skill whenever a user asks to generate, optimize, grade prompts, or turn vague needs into professional prompts. This is a wide natural-language description without explicit exclusions or negative examples, so it could overlap with many ordinary requests about writing or refining text and cause unintended invocation.
This instruction requires all generated prompts to use Chinese punctuation and prohibits mixed-language formatting unless a specific language suffix is supplied. That imposes a default locale/style policy on users rather than offering a neutral default or asking for preference first.
The script imports the target package and its submodules dynamically to generate docs, which executes module top-level code during analysis. If run against an untrusted or compromised package, this can trigger arbitrary code execution, filesystem/network access, or other import-time side effects under the user's privileges.
The document title and all operative instructions are written in Chinese, and the data-flow section explicitly references lang=zh normalization, which indicates a Chinese-default locale. There is no visible user opt-in, alternative language option, or clear region-specific justification in this file, so it may violate language/locale policy requirements.
The skill file is written entirely in Chinese and includes no indication that users may choose another language or locale. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is explicitly documented and justified.
This markdown file uses Chinese throughout for headings, requirements, and checklist items, which effectively forces a specific language for users of the skill. Under the policy, language constraints should either provide user choice or be clearly documented as justified for a specific locale or compliance context.
This markdown file is written entirely in Chinese and defines output-format requirements such as 'Markdown/纯文本/表格' and textual constraints without indicating that language is optional or user-selectable. Under the policy, forcing a specific language or locale without opt-in is a natural-language policy violation unless clearly documented as region-specific.
The file is entirely written in Chinese and prescribes Chinese-language interaction patterns without indicating that the skill is locale-specific or offering a language fallback. This can cause users or downstream agents to misunderstand instructions, produce incorrect outputs, or be excluded from safely using the skill, especially in multilingual environments where prompt behavior must be predictable.
The file’s instructional content is written entirely in Chinese and provides role/output templates only in Chinese, with no indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking context. This creates a natural-language locale policy concern because it implicitly fixes the interaction language without opt-in or justification.
SQP-3 applies to all file types and covers language or locale policy violations. This skill file presents all instructions and constraints only in Chinese, which effectively forces a specific language on users without any visible opt-in, alternative language, or justification that the skill is region-specific.
The entire skill file is written as mandatory operational guidance in Chinese, including the title and all instruction content, with no indication that language selection is optional or limited to a region-specific use case. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.
The trigger terms include very broad business words such as budget, cost, profit, and ROI, which can cause the finance domain atom to activate for general business or operational conversations that are not actually finance-specific. In a prompt-engineering framework, this can misroute tasks, inject inappropriate finance framing, and degrade downstream reasoning or produce misleading domain-specific advice where it does not belong.
The applicability signals include very broad everyday business terms such as '员工', '组织', and '企业文化', which can cause the HR domain atom to activate for loosely related requests. In a prompt-engineering skill, overbroad triggering can inject unnecessary HR-specific constraints or guidance into unrelated tasks, reducing reliability and potentially skewing outputs in sensitive personnel contexts.