T09 · Insecure Skill Coding Practices
- Location
scripts/check_quota.py:25- Finding
Authentication Cookie Is Stored in Plaintext When Encryption Support Is Unavailable
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill does what it says by checking Kimi quota data, but it handles reusable login cookies and can store them with weak or no real encryption.
Install only if you are comfortable giving the skill a reusable Kimi login cookie. Avoid using --save unless cryptography is installed and you set a strong KIMI_QUOTA_KEY; otherwise the saved cookie may be exposed from your local config directory or backups. Prefer clearing saved credentials after use with --clear.
scripts/check_quota.py:25Authentication Cookie Is Stored in Plaintext When Encryption Support Is Unavailable
scripts/check_quota.py:48Cookie Encryption Key Is Derived from Predictable Machine Attributes
SKILL.md:51Third-Party Python Dependencies Are Installed Without Version or Integrity Pinning
The declared behavior says the skill checks Kimi quota and account usage, but the analyzed behavior reportedly packages the skill directory into an archive, performs local archive creation/renaming, and does not implement the promised Kimi querying logic. This mismatch is a strong red flag because deceptive descriptions can hide unrelated or unauthorized actions, enabling stealthy data collection, packaging, or exfiltration under the pretense of a benign account utility.
The skill advertises code-related capabilities including environment access, filesystem reads/writes, network access, and shell usage, but does not declare any explicit tool scope or permissions boundaries. In an agent setting, this increases the chance the skill can access or perform actions beyond what a user would reasonably expect from a quota-checking utility, especially since it handles authentication material such as cookies.
The description says to use the skill when the user asks about several phrases or 'needs to check Kimi Code usage,' but it does not clearly bound when the skill should not activate. Terms like '剩余次数' and the broad condition about checking usage could overlap with general conversation and may cause unintended invocation without clearer scope or exclusions.
The code sends a supplied or stored login cookie and derived authorization token in HTTP requests to external Kimi API endpoints. While the file broadly states it queries usage/subscription data, there is no direct runtime disclosure near the network operations that credential-bearing data will be transmitted to remote services.
The request headers force language and locale values such as "accept-language: zh-CN", "x-language: zh-CN", and "Asia/Shanghai". This is a natural-language/locale policy issue because the skill does not provide opt-in, configurability, or justification for imposing a specific language/region setting.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
return None
try:
response = requests.post(url, headers=headers, json={}, timeout=10)
if response.status_code == 200:
return response.json()
except Exception:
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
return None
try:
response = requests.post(url, headers=headers, json={}, timeout=10)
if response.status_code == 200:
return response.json()
except Exception:
A second request repeats forced locale settings using Chinese language headers and the Asia/Shanghai timezone. Because this behavior is embedded in the skill and not exposed as a user option, it violates the locale-choice requirement.
No suspicious patterns detected.