T09 · Insecure Skill Coding Practices
- Location
security-check.py:36- Finding
Security scanner fails open and returns success for detected threats
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is mostly a skill-building toolkit, but some advertised safety and Git safeguards are not actually enforced.
Review before installing if you plan to rely on its security checks or Git automation. Treat its validation results as advisory only, inspect commits before running the Git helper, avoid broad --all staging unless intended, and use isolated, pinned dependencies when following the setup examples.
security-check.py:36Security scanner fails open and returns success for detected threats
skill-test.py:70Script syntax validation ignores compiler and shell-parser failures
api-integration/SKILL.md:33Documentation directs users to install unpinned third-party packages
The declared description presents a broad AI skill development/workflow tool with templates, testing, security checks, token analysis, and publishing support. The supplied code chunk instead implements only Git branch management operations (git checkout -b, git checkout, git branch -a) and branch-name validation. This is a materially different primary purpose and introduces repository-manipulation capabilities not described in the declared purpose. While Git tooling could be a supporting part of a development workflow in a larger project, this specific code chunk does not implement the described skill-development features and is therefore a clear mismatch.
The declared description presents an end-to-end AI skill development toolkit focused on creating, improving, auditing, testing, packaging, publishing, token analysis, and security review for skills. The supplied code does none of that. Instead, it interacts with the local Git repository via subprocess calls, checks whether the current directory is a git repo, reads changed files, optionally runs git add -A, generates a conventional-style commit message, and runs git commit -m .... This is a materially different primary purpose and adds undeclared repository-modifying behavior. Therefore the description does not accurately represent the code chunk.
The declared description presents a full-featured AI skill development workshop focused on creating, improving, testing, auditing, packaging, publishing, performance analysis, and security review of skills. The supplied code does none of that. Instead, it is a Git status visualization utility that invokes git commands to inspect the current repository state. This is a materially different primary purpose and introduces capabilities related to source-control inspection that are not described in the skill declaration. There is no evident implementation of skill creation workflows, testing frameworks, security checks, token analysis, packaging, or publishing in this code chunk.
There is a clear description-behavior mismatch. The declared purpose presents a broad, feature-rich skill development toolkit with creation, optimization, auditing, publishing, security review, and token analysis. The actual code chunk is much narrower: it is only a test/validation utility that checks for SKILL.md presence, basic YAML frontmatter fields, and syntax validity of Python/Bash scripts. While this partially aligns with the declared 'test/validate' and possibly 'audit quality' use cases, it does not substantiate most of the major advertised capabilities. No undeclared dangerous behavior is present, but the primary purpose is materially narrower than described.
The declared description promises a feature-rich skill development tool with end-to-end workflow capabilities, including templates, testing, safety checks, optimization, packaging, publishing, and analysis. The supplied code chunk is only a basic Python script template with CLI argument parsing, logging, and placeholder functions. Its actual purpose is scaffolding a generic script, not performing the described skill-development functions. This is a material description-behavior mismatch.
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
(r'curl.*https?://[^\s"]+', '🚨', 'curl 到未知 URL', 'EXTREME'),
(r'wget.*https?://[^\s"]+', '🚨', 'wget 到未知 URL', 'EXTREME'),
(r'eval\(|exec\(', '🚨', 'eval 或 exec', 'EXTREME'),
(r'sudo|su |runas', '🚨', '请求 sudo 权限', 'EXTREME'),
(r'\.ssh[\\/]', '🔴', '访问 ssh 目录', 'HIGH'),
(r'\.aws[\\/]', '🔴', '访问 aws 目录', 'HIGH'),
(r'MEMORY\.md|USER\.md|SOUL\.md', '🔴', '访问个人记忆文件', 'HIGH'),
The skill advertises workflows that invoke local Python tools and publishing commands, yet it declares no explicit tool scope such as permissions or allowed-tools. In an agent environment, this creates ambiguous authority and can lead to unintended shell or file access being granted when the skill is triggered.
Nearly all user-facing instructions and invocation examples are written in Chinese, which implicitly constrains the skill to a specific language experience. The file does not offer user opt-in for language preference or explain that the skill is intentionally region- or language-specific.
The activation phrases are broad enough to match common user requests like creating, improving, testing, or auditing a skill. Overbroad triggers can cause the skill to activate in unintended contexts, exposing shell/file capabilities and steering workflows without clear user intent.
The trigger phrases are broad generic requests like '调用某个 API' and '获取某个服务的数据', which can match many ordinary user intents and cause the skill to activate outside a narrowly scoped context. In a skill designed to build or operate API integrations, overbroad activation increases the chance of unintended invocation, mishandling of external requests, and accidental collection or transmission of sensitive data through API workflows.
The trigger phrases are broad, natural-language requests like '帮我自动化这个流程' and '生成每日报告', which can overlap with ordinary user intents and cause the skill to activate unexpectedly. For an automation-oriented skill, unintended invocation is risky because it may steer the assistant into proposing or initiating multi-step workflows, scheduling, or monitoring actions without sufficiently explicit user intent.
The documentation describes scheduling, monitoring, retries, timeout handling, and workflow execution patterns without warning that these behaviors may be persistent, recurring, or system-affecting. In an automation context, users may not realize that a configured task could continue running, retry repeatedly, or observe service state over time, creating operational and safety risks.
The trigger phrases are broad, generic requests like querying databases, analyzing data, and generating visualizations that overlap with many ordinary user intents. This can cause the skill to activate in unintended contexts, increasing the chance that it handles sensitive data operations or database-related tasks without clear scoping or explicit user confirmation.
The trigger phrases are broad, generic requests such as converting or batch-processing files, which can easily overlap with ordinary user intents and cause unintended invocation. In a file-handling skill, accidental activation is more dangerous because the documented capabilities include modifying user data, increasing the chance of unwanted file operations or confusing handoffs.
The skill advertises write, rename, move, and delete operations without any warning, confirmation requirement, or safety constraints around destructive changes. This is dangerous because file-processing skills operate on potentially valuable user data, and even benign mistakes or unintended invocation can lead to irreversible loss, corruption, or movement of files.
The trigger phrases are broad everyday requests like '回滚', '恢复', and '帮我提交代码', which can cause the skill to activate in ambiguous contexts and perform or suggest repository-affecting actions without sufficiently specific user intent. In a Git operations skill, accidental invocation is more dangerous because the described capabilities include commit, branch switching, and rollback-style actions that can alter working state or history.
This markdown file contains natural-language guidance stating '多语言内容 | 只保留目标语言', which encourages removing multilingual content in favor of one target language. That can create a locale/language policy issue because it promotes forcing a specific language rather than offering user choice or opt-in.
This markdown file contains user-facing instructions exclusively in Chinese, and there is no indication that the skill is region-specific or that users may choose another language. Under the policy rule for natural-language violations, forcing a specific language without opt-in is a reportable issue.
The module docstring and CLI description are written only in Chinese, and all user-facing status/error messages in the script also appear exclusively in Chinese. This imposes a specific language on users without opt-in or any documented justification that the skill is intended only for a Chinese-speaking or region-specific environment.
The module docstring describes the tool as a 'Git intelligent commit script' that 'automatically generates规范的 commit message', which frames its role as message generation. However, the code also performs state-changing git operations: it can stage all files with git add -A and always executes git commit -m ..., so the documentation understates and partially contradicts the script's actual behavior.
The --all option performs git add -A immediately, which can stage unintended files including secrets, generated artifacts, or unrelated work without any confirmation. In a skill focused on automating development workflows, this increases the chance of accidental sensitive-data exposure or repository state changes caused by routine use.
The script's docstring and all printed user-facing messages are in Chinese, which imposes a specific language on users. Under the policy, language-specific behavior should either provide user opt-in/choice or be clearly justified as region-specific, neither of which appears in this file.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
import sys
def run_git(args):
result = subprocess.run(['git'] + args, capture_output=True, text=True)
return result.stdout.strip(), result.stderr.strip(), result.returncode
def main():
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
import sys
def run_git(args):
result = subprocess.run(['git'] + args, capture_output=True, text=True)
return result.stdout.strip(), result.stderr.strip(), result.returncode
def main():
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
import sys
def run_git(args):
result = subprocess.run(['git'] + args, capture_output=True, text=True)
return result.stdout.strip(), result.stderr.strip(), result.returncode
def main():