T09 · Insecure Skill Coding Practices
- Location
scripts/secure-storage.js:14- Finding
Universal Hardcoded Encryption Key Allows Offline Secret Recovery
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a local secret-storage tool, but its implementation materially undercuts its security claims and could expose stored API keys if users rely on it.
Install only for low-risk local convenience, not for real credential protection. Do not store production API keys, cloud credentials, repository tokens, or account secrets in this version unless you accept that the storage file can be decrypted offline with the public code. Prefer an OS keychain, password manager, KMS-backed secret store, or a revised version using user-controlled key material and authenticated encryption.
scripts/secure-storage.js:14Universal Hardcoded Encryption Key Allows Offline Secret Recovery
scripts/secure-storage.js:89Secret Values Are Exposed Through Command-Line Arguments
scripts/secure-storage.js:18AES-CBC Encryption Does Not Authenticate Stored Records
This is a substantive security issue, not just a documentation mismatch: the stated purpose is secure storage of secrets, but the described behavior includes decrypting secrets to console output, listing metadata, using reversible encryption with a static key, and storing data in a local JSON file. In the context of a secret-storage skill, these behaviors materially weaken confidentiality and can expose API keys through logs, local file compromise, or predictable key recovery.
The skill documentation describes a program that reads encryption material from environment variables, but it does not declare any explicit tool scope or permissions boundary for that capability. In agent environments, undeclared access to env-sourced secrets reduces auditability and can enable broader-than-expected secret handling, especially for a skill explicitly designed to process sensitive data.
The skill description and operational guidance are written in Chinese, including the title, feature descriptions, trigger notes, and warnings. This creates a language-policy concern because the file presents a fixed locale without offering an alternative language or stating that the skill is intended only for Chinese-speaking users.
The file's natural-language strings and locale behavior are explicitly fixed to Chinese, including the bilingual header and zh-CN date formatting. This can violate language/locale policy because the skill does not offer opt-in, fallback, or configuration for other languages/locales.
The get command decrypts stored secrets and prints them directly to stdout, which can expose sensitive values through terminal history, shell logging, CI logs, process capture, or shoulder-surfing. In a skill explicitly marketed as secure storage for API keys and other secrets, returning plaintext by default materially weakens the protection boundary.
The inline documentation says the implementation is simple encryption based on Base64 and key obfuscation, which materially differs from the actual code path using scrypt-derived keys and AES-256-CBC. This is an active documentation/code contradiction, even though the broader warning that it is not production-grade is still present.