T09 · Insecure Skill Coding Practices
- Location
scripts/main.py:410- Finding
Full-Account Authentication Cookies Stored in a Plaintext Project File
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Baidu Netdisk skill is coherent, but it uses full-account cloud credentials and can perform destructive account actions without built-in confirmation safeguards.
Install only if you are comfortable giving the skill full Baidu Netdisk account access. Prefer environment variables or a protected secret store over config.json, use a low-value or test account where possible, narrow invocation triggers, and require explicit user approval before delete, move, rename, transfer, or directory creation actions.
scripts/main.py:410Full-Account Authentication Cookies Stored in a Plaintext Project File
scripts/main.py:270Destructive Cloud-File Deletion Has No Explicit Confirmation Safeguard
The module description advertises only benign capabilities like listing, upload/download, share extraction, transfer, and search, but the implementation also supports destructive operations including delete, move, and rename. This mismatch can mislead users or integrators about the true risk profile of the skill, increasing the chance that destructive actions are invoked without informed consent.
The delete operation directly performs a remote file deletion using authenticated Baidu Netdisk APIs with no confirmation prompt, dry-run mode, allowlist, or guardrails. In an agentic context, a mistaken instruction, prompt injection, or parameter confusion could immediately destroy user data with little opportunity to recover.
The skill loads BDUSS and STOKEN credentials from config or environment and then uses them to authenticate outbound requests, but there is no explicit disclosure to the user at runtime that sensitive account tokens are being accessed and transmitted. In agent environments, this can violate user expectations and create risk if secrets are supplied implicitly or reused in unintended contexts.
The trigger list includes broad terms such as "网盘", "转存", and "创建目录" that can appear in ordinary user requests unrelated to this specific skill. Because the skill has access to an exec-capable tool and manages cloud files using sensitive session credentials, accidental invocation could cause unintended file operations or expose the user to destructive actions in the wrong context.
The skill documentation and all invocation examples are exclusively written in Chinese, including the example agent messages users are expected to send. Under the policy for natural-language constraints, this can be a locale/language restriction because the file does not indicate that other languages are supported or provide an opt-in choice.
The file presents all instructions, warnings, and usage examples only in Chinese, which effectively forces a specific language without indicating user opt-in or providing an alternative. Under the stated policy, language-specific behavior should either offer a choice or clearly justify the locale constraint.
The Accept-Language header is fixed to prefer zh-CN/zh, which enforces a specific locale choice in network interactions without offering the user an option to select language or locale. This is a natural-language policy concern because the implementation bakes in a language preference rather than making it configurable or clearly justified as region-specific.
The natural-language description and multiple trigger phrases are Chinese-only, with no indication that users may interact in another language or that the skill is intentionally restricted to a Chinese-language audience. Under the stated policy, forcing a specific language without opt-in can be a locale-policy issue unless the constraint is clearly documented and justified.
No suspicious patterns detected.