T09 · Insecure Skill Coding Practices
- Location
fetch_quota.py:24- Finding
Plaintext authentication secrets and insufficiently protected session-cookie storage
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill appears intended to monitor Kimi quota, but it asks users to store reusable login tokens and cookies in local files/source code and run an automated scheduled sender without enough safeguards.
Review carefully before installing. Only use this in a private, trusted environment, avoid committing the configured script or kimi_cookies.json, restrict file and log permissions, remove debug page-body logging, and understand that the cron job will repeatedly use your Kimi session and send reports through openclaw.
fetch_quota.py:24Plaintext authentication secrets and insufficiently protected session-cookie storage
SKILL.md:74Unpinned Playwright dependency creates an avoidable supply-chain risk
fetch_quota.py:138Authenticated page contents may be retained in cron logs
The skill instructs users to run a Python script, write local credential material such as cookies JSON, and invoke shell commands like openclaw and cron, yet the manifest declares no explicit tool scope or permission boundaries. This creates an authorization gap where an agent could be induced to use file-write and shell-capable tooling without clear consent controls, especially dangerous because the workflow handles sensitive authentication tokens and external messaging.
The trigger phrases are broad terms like 'Kimi额度' and '额度监控' without tight activation criteria, so the skill could activate in conversations that merely mention quotas rather than request automation. In this skill's context, mistaken activation is more dangerous because the documented workflow involves credential handling, shell commands, and possible outbound WeChat pushes.
The manifest says the skill checks Kimi quota, configures automated daily push via openclaw, and troubleshoots quota fetching. While WeChat delivery is in scope, this implementation achieves it by spawning the openclaw executable through subprocess.run, which is a broader host-command execution capability not justified by the stated business purpose itself.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
"--message", message,
]
try:
subprocess.run(cmd, capture_output=True, timeout=30)
except Exception as e:
print(f"[ERROR] Push failed: {e}")
The skill explicitly instructs storing and injecting sensitive authentication material, including cookies and localStorage tokens such as access_token and refresh_token, to automate access to a user account. This is dangerous because these credentials can be stolen from disk, logs, or misconfigured environments and reused to fully impersonate the user, and the document provides no safeguards, storage requirements, rotation guidance, or minimization controls.
The natural-language content is presented in Chinese and the file does not indicate that language selection is optional or based on user preference. Under the stated policy, forcing a specific language without user opt-in is a locale/language policy concern.
This code file contains user-facing documentation and runtime messaging that force a specific language/locale. The policy allows fixed locale only when the constraint is clearly documented and justified or when the user is offered a choice, which is not present here.
No suspicious patterns detected.