T09 · Insecure Skill Coding Practices
- Location
scripts/send_message.py:48- Finding
Documented Authorization and Recipient Restrictions Are Not Enforced
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is meant to send WeChat messages, but its actual sender does not enforce the promised user authorization, contact allowlist, or meaningful rate limits.
Review this skill before installing. It should only be used where you trust the agent and the local OpenClaw Gateway to enforce consent, recipient restrictions, and rate limits, because the packaged sender script does not enforce those protections itself. Avoid using file sending until authorization, allowlisting, path review, and quota controls are fixed in the actual send path.
scripts/send_message.py:48Documented Authorization and Recipient Restrictions Are Not Enforced
scripts/send_message.py:23Process-Local Delay Does Not Enforce Documented Messaging Quotas
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
curl -X POST http://127.0.0.1:18789/api/wechat/send \
-H "Content-Type: application/json" \
-d '{
"channel": "openclaw-weixin",
The request_auth() API includes an auto_confirm path that directly grants authorization without interactive user consent. In an agent skill whose purpose is to ensure explicit approval before sending messages, this bypass can be invoked by surrounding code or misconfiguration to silently authorize sensitive actions, defeating the consent control entirely.
return False
def request_auth(operation, auto_confirm=False):
"""
请求用户授权
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
Args:
operation: 操作描述
auto_confirm: 是否自动确认(仅用于测试)
Returns:
bool: 是否获得授权
This line is the concrete branch where auto_confirm causes grant_auth(operation) to execute immediately and returns success. Because the skill context involves authorization for sending WeChat messages, including potentially dangerous bulk or automated sending, this bypass materially increases the risk of unauthorized messaging or spam if reachable by the agent or wrapper code.
Returns:
bool: 是否获得授权
"""
if auto_confirm:
grant_auth(operation)
return True
The helper stores a caller-supplied authorization duration in grant_auth(), but all authorization checks and status reporting use the fixed AUTH_VALIDITY constant instead of the stored value. This creates a security-policy mismatch: operators may believe consent duration is constrained or extended as configured, while the enforcement logic always grants up to one hour of access, which can allow actions outside the intended approval window.
该文档标题及全文内容均固定使用中文,没有提供可选语言、双语说明或适用范围说明。若组织要求技能文档避免在无用户选择的情况下强制特定语言,这属于自然语言层面的语言策略问题。
This code file contains natural-language documentation and command help entirely in Chinese, starting with the module docstring and continuing throughout the user-facing interface. Under the policy, forcing a specific language without offering the user a language or locale choice is a natural-language policy violation.
Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.
if method_name.startswith('test_'):
total += 1
try:
getattr(instance, method_name)()
passed += 1
print(f" ✅ {method_name}")
except Exception as e:
No suspicious patterns detected.