T09 · Insecure Skill Coding Practices
Error
- Location
- README.md:111
- Finding
- Documentation Directs Users to Store Social Media Credentials in Plaintext## Vulnerability Details **File Locations**: - `SKILL.md:55-62` - `README.md:111-127` - `README.md:225-229` - `src/README.md:235-251` **Vulnerability Type**: Plaintext storage of passwords, session cookies, API secrets, and access tokens **Risk Level**: High ### Vulnerable Code and Documentation `SKILL.md:55-62`: ```markdown 在 `TOOLS.md` 中添加社交媒体账号配置: ```markdown ### Social Media - xiaohongshu: {username: "xxx", cookie: "xxx"} - weibo: {username: "xxx", password: "xxx"} - twitter: {api_key: "xxx", api_secret: "xxx"} ``` ``` `README.md:111-127`: ```markdown 在 `TOOLS.md` 中添加平台凭证: ```markdown ### Social Media - xiaohongshu: username: "your_username" cookie: "your_cookie" - weibo: username: "your_username" password: "your_password" - twitter: api_key: "your_api_key" api_secret: "your_api_secret" access_token: "your_access_token" ``` ``` `src/README.md:235-251`: ```markdown 在 `TOOLS.md` 中配置平台凭证: ```markdown ### Social Media - xiaohongshu: username: "your_username" cookie: "your_cookie" - weibo: username: "your_username" password: "your_password" - twitter: api_key: "your_api_key" api_secret: "your_api_secret" access_token: "your_access_token" ``` ``` The guidance also conflicts with the security claims in `README.md:225-229`: ```markdown ## 🔐 安全 - 本地运行,数据不出设备 - 平台凭证加密存储 - 无第三方数据收集 ``` ### Technical Analysis The documentation instructs users to put authentication material directly into a plaintext Markdown file named `TOOLS.md`. The affected secrets include: - Account passwords - Authenticated session cookies - API keys and API secrets - Access tokens The project contains no implementation that reads and encrypts these values, integrates with an operating-system credential store, or applies restrictive file permissions. Therefore, the claim that platform credentials are ...[truncated 2232 chars]
- Remediation
- ## Remediation Suggestions 1. Remove all instructions that direct users to store raw credentials in `TOOLS.md` or any other general-purpose Markdown file. 2. Integrate with an operating-system credential facility such as macOS Keychain, Windows Credential Manager, or a Linux secret service. 3. For automated deployments, support a dedicated secret manager and accept only secret identifiers or references in project configuration. 4. If environment variables are supported as a compatibility fallback, document their process-exposure risks and never print their values. 5. If local file storage is unavoidable, encrypt secrets using a key stored separately from the encrypted data and enforce owner-only filesystem permissions. 6. Add `TOOLS.md` and other local secret files to `.gitignore`, while noting that ignore rules do not protect files already committed. 7. Add secret scanning to development and release workflows to detect passwords, cookies, tokens, and API secrets. 8. Redact credentials from logs, errors, generated reports, telemetry, and command output. 9. Request narrowly scoped, short-lived access tokens instead of passwords or unrestricted session cookies wherever supported. 10. Document credential rotation and revocation procedures for users who previously followed the plaintext configuration instructions. 11. Remove or revise the claim that credentials are encrypted until encryption is implemented and independently verified. 12. Add tests confirming that secret values are never persisted in plaintext or exposed through CLI output.
