T09 · Insecure Skill Coding Practices
- Location
SKILL.md:85- Finding
Untrusted Code Execution Workflow Relies on Non-Enforced Sandbox Controls
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is coherent, but it should be reviewed because it promises safe execution of untrusted code without providing an enforceable sandbox.
Use this only with a real, independently enforced sandbox such as a fresh container or microVM with no network, restricted mounts, low privileges, and hard resource limits. Do not rely on the markdown blacklist or sample configuration as a security boundary, and require explicit user confirmation before running any untrusted code.
SKILL.md:85Untrusted Code Execution Workflow Relies on Non-Enforced Sandbox Controls
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
'/var',
'*.key',
'*.pem',
'.env',
],
'max_file_size': 10 * 1024 * 1024, # 10MB
}
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
'/var',
'*.key',
'*.pem',
'.env',
],
'max_file_size': 10 * 1024 * 1024, # 10MB
}
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).
def dangerous_code():
import os
os.system('rm -rf /') # ❌ 拦截!
# 错误: 检测到危险操作 "rm -rf /"
# 建议: 这是破坏性操作,禁止执行
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).
def dangerous_code():
import os
os.system('rm -rf /') # ❌ 拦截!
# 错误: 检测到危险操作 "rm -rf /"
# 建议: 这是破坏性操作,禁止执行
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).
def dangerous_code():
import os
os.system('rm -rf /') # ❌ 拦截!
# 错误: 检测到危险操作 "rm -rf /"
# 建议: 这是破坏性操作,禁止执行
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).
def dangerous_code():
import os
os.system('rm -rf /') # ❌ 拦截!
# 错误: 检测到危险操作 "rm -rf /"
# 建议: 这是破坏性操作,禁止执行
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).
import os os.system('rm -rf /') # ❌ 拦截!
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).
SANDBOX_REJECT = {
'status': 'rejected',
'reason': 'dangerous_pattern',
'pattern': 'rm -rf /',
'line': 5,
'suggestion': '删除根目录是破坏性操作',
}
The primary description is written entirely in Chinese and the document consistently presents the skill behavior in Chinese without indicating that language is optional or user-selectable. Under the language/locale policy, forcing a specific language without user opt-in is a natural-language policy concern unless the locale restriction is clearly documented and justified.
The markdown declares activation phrases as "安全执行 / 沙箱运行 / 验证代码", but it does not specify when these phrases should or should not invoke the skill. Terms like "验证代码" are broad enough to overlap with ordinary requests for code review or validation, which can cause unintended activation without negative examples or tighter constraints.
No suspicious patterns detected.