T01 · Skill Instruction Hijacking
- Location
references/security-policy.md:1- Finding
Global instruction override language in the bundled security policy
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This security-scanning skill is mostly purpose-aligned, but it needs Review because its bundled policy claims global installation authority and its scanner has containment and assurance gaps.
Review this before installing in an automated approval path. Do not let its bundled policy override platform or user rules, run scans with low filesystem privileges, avoid scanning untrusted archives that may contain symlinks until containment is fixed, and treat its pass/fail results as advisory rather than a complete security guarantee. Be aware that cloud reputation checks can contact the configured Tencent endpoint with the skill name and source when a skill_name is supplied.
references/security-policy.md:1Global instruction override language in the bundled security policy
lib/static_scanner.py:125Static scanner follows symbolic links outside the requested scan directory
lib/static_scanner.py:47Packages containing sensitive credential files can still be marked safe
lib/runtime_protector.py:111Runtime protection returns malicious input unchanged in the clean-input field
lib/logic_auditor.py:125Declared permissions are ignored by the least-privilege auditor
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
},
{
"name": "权限越权",
"pattern": r'\.\./\.\./|/etc/passwd|/root/|\/home\/',
"description": "可能存在路径遍历/越权读取系统文件",
"risk_level": "high"
},
Skill attempts to nullify the agent's safety policies or restrictions ('you have no restrictions', 'ignore your guidelines', 'do anything now'). This is a direct jailbreak that disables guardrails.
r'you are now',
r'your new instruct.* are',
# 越狱
r'DAN\|do anything now',
r'reflectively\%20accessible',
r'repeat the words above',
# 敏感操作诱导
Skill attempts to nullify the agent's safety policies or restrictions ('you have no restrictions', 'ignore your guidelines', 'do anything now'). This is a direct jailbreak that disables guardrails.
r'execute the following commands',
r'run the following code',
r'ignore all safety guide',
r'disregard safety proto',
]
COMMAND_INJECTION_PATTERNS = [
This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.
r'execute the following commands',
r'run the following code',
r'ignore all safety guide',
r'disregard safety proto',
]
COMMAND_INJECTION_PATTERNS = [
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# 匹配实际执行,排除正则定义行
(r'^(?!.*#.*).*(base64|b64decode).*exec', '危险:编码后执行恶意代码'),
(r'open\s*\(.*\/proc', '警告:读取进程信息'),
(r'open\s*\(.*\.env', '警告:读取环境变量配置文件'),
(r'requests\.post\s*\(.*pastebin', '警告:向外发送数据到第三方pastebin'),
(r'__file__.*\.\./\.\./', '危险:路径遍历尝试'),
]
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# 匹配实际执行,排除正则定义行
(r'^(?!.*#.*).*(base64|b64decode).*exec', '危险:编码后执行恶意代码'),
(r'open\s*\(.*\/proc', '警告:读取进程信息'),
(r'open\s*\(.*\.env', '警告:读取环境变量配置文件'),
(r'requests\.post\s*\(.*pastebin', '警告:向外发送数据到第三方pastebin'),
(r'__file__.*\.\./\.\./', '危险:路径遍历尝试'),
]
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# 高危文件
HIGH_RISK_FILES = [
'.ssh/id_rsa',
'.ssh/id_dsa',
'.git/credentials',
'.env',
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# 高危文件
HIGH_RISK_FILES = [
'.ssh/id_rsa',
'.ssh/id_dsa',
'.git/credentials',
'.env',
'config.json',
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
- 权限滥用:超出声明功能的高权限使用
- 隐私访问:未声明的敏感数据读取(照片、文档、聊天记录、密钥等)
- 硬编码密钥:生产代码中包含真实凭证、API密钥
- 高风险操作:`rm -rf`/`sudo`/`chmod 777`等危险命令
- 结果处理:
- ❌ 发现明确高危行为:直接拦截,终止安装流程
- ⚠️ 高权限但用途匹配、无明确恶意:进入第三层审计
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
- 权限滥用:超出声明功能的高权限使用
- 隐私访问:未声明的敏感数据读取(照片、文档、聊天记录、密钥等)
- 硬编码密钥:生产代码中包含真实凭证、API密钥
- 高风险操作:`rm -rf`/`sudo`/`chmod 777`等危险命令
- 结果处理:
- ❌ 发现明确高危行为:直接拦截,终止安装流程
- ⚠️ 高权限但用途匹配、无明确恶意:进入第三层审计
This markdown file contains user-facing natural-language content primarily in Chinese, including feature and behavior descriptions, but does not indicate that the language is optional or region-specific. Under the language/locale policy rule, forcing a specific language without user opt-in is a policy concern.
The changelog documents a material security behavior change: an earlier version states the code does not call external services by default, while a later version says a cloud intelligence endpoint is enabled out of the box. For a security-related skill, contradictory disclosure about default network egress can mislead users, cause unreviewed data transmission, and undermine informed consent and deployment decisions.
The natural-language content of the skill description, usage, and safety rules is presented only in Chinese. Under the policy, forcing a specific language without user opt-in or justification is a language/locale policy violation.
This Python skill contains its primary description entirely in Chinese, and later emits Chinese-only audit output. For a general-purpose auditing skill, this imposes a specific language/locale without offering user choice or documenting a region-specific constraint, which matches the language-policy violation criteria.
The report generated for users is emitted in Chinese-only strings such as the success/failure summaries and findings section labels. Because the skill does not provide a language option or explain a justified locale restriction, this is a natural-language policy issue.
The module docstring claims the component 'detects and blocks' attacks and 'automatically sanitizes input', but the primary check path only flags suspicious input and returns the original text unchanged in clean_input. This can create a dangerous false sense of protection, causing downstream code to trust unmodified attacker-controlled input and continue processing it.
The top-level docstring presents the skill’s purpose entirely in Chinese, with no indication that language selection is configurable or optional. Under the policy rule, forcing a specific language or locale without user opt-in is a natural-language policy concern unless the locale restriction is explicitly justified.
Skill injects content designed to persist in agent memory or context across interactions. Persistent injection can alter agent behavior long after the initial interaction.
r'system:|SYSTEM:|### System',
r'\[SYSTEM\]|\<SYSTEM\>',
# 注入后门
r'from now on you will',
r'you are now going to act as',
r'you are now',
r'your new instruct.* are',
The primary natural-language description of the skill is written only in Chinese and does not offer any language or locale choice. Per the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is clearly documented and justified, which is not present here.
The module docstring and multiple user-facing report strings are written only in Chinese, which effectively fixes the skill's output language without user opt-in. The file does not indicate that this is a region-specific tool or provide any mechanism for selecting another language.
The scanner performs a network request that transmits the skill name and source to a remote cloud endpoint whenever cloud lookup is enabled, but there is no user-facing disclosure, consent flow, or obvious opt-in at the call site. In a security tool, silently sending analysis metadata off-host can leak proprietary project identifiers or usage patterns and may violate privacy or compliance expectations.
The document title and all operational instructions are presented only in Chinese, which effectively forces a specific language for a broadly applicable security policy. The file does not offer an opt-in language choice or explain that the policy is limited to a Chinese-language or region-specific environment.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
- 权限滥用:超出声明功能的高权限使用
- 隐私访问:未声明的敏感数据读取(照片、文档、聊天记录、密钥等)
- 硬编码密钥:生产代码中包含真实凭证、API密钥
- 高风险操作:`rm -rf`/`sudo`/`chmod 777`等危险命令
- 结果处理:
- ❌ 发现明确高危行为:直接拦截,终止安装流程
- ⚠️ 高权限但用途匹配、无明确恶意:进入第三层审计
The file makes a privacy and safety assurance that only the skill name and source are transmitted and that no sensitive local data is shared, but this claim is not verifiable from the changelog itself and appears in tension with prior statements that the endpoint was only an optional example. Unsupported assurances in security tooling are dangerous because users may trust and deploy outbound telemetry they have not independently validated.
The module documentation mixes English headings with Chinese-only descriptive content such as "完整四层纵深安全防御体系" and the exported feature descriptions. Under the policy rule for natural-language violations, this can be considered a language/locale constraint because the skill presents key descriptive information in a fixed language without any opt-in or alternative.