T09 · Insecure Skill Coding Practices
- Location
SKILL.md:75- Finding
API Key Persisted in Plaintext User Configuration
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 75–87
Vulnerability Type: Plaintext credential storage
Risk Level: MediumThe following commands are provided for persisting the API key. The placeholder has been normalized to English without changing the commands' behavior:
bash echo 'export SEARCH_360_API_KEY="replace-with-your-key"' >> ~/.bashrc && source ~/.bashrc echo 'export SEARCH_360_API_KEY="replace-with-your-key"' >> ~/.zshrc && source ~/.zshrc setx SEARCH_360_API_KEY "replace-with-your-key"Technical Analysis
The installation instructions direct users to place
SEARCH_360_API_KEYin plaintext shell initialization files on Linux and macOS or in a persistent user environment variable on Windows. Shell initialization files are not purpose-built secret stores and may be exposed through local backups, diagnostic bundles, accidental repository commits, support archives, or other processes operating under the same user account.Sourcing the complete shell initialization file immediately after modification also executes every command already present in that file, which is unnecessary for configuring the current skill. The persistent filesystem write additionally conflicts with the statement at
SKILL.md:35that the skill does not write to the filesystem.No hardcoded credential was found in the package itself. Exploitation depends on a user following these setup instructions and an attacker subsequently obtaining local read access, access to exported environment data, or access to a copied configuration file.
Attack Path
- A user replaces the placeholder with a valid 360 API key and runs one of the documented commands.
- The credential is stored persistently in plaintext in a shell profile or the user's persistent environment.
- A local process, another actor with access to the user's files or environment, a backup collector, or an accidentally publis ...[truncated 846 chars]
- Remediation
View remediation
Remediation Suggestions
- Store the API key in an operating-system credential manager, an agent-managed secret vault, or another dedicated secret-management facility.
- Retrieve the credential only at runtime and avoid printing it in commands, logs, error messages, generated files, or user-facing output.
- If file-backed configuration is unavoidable, place the key in a dedicated file outside the project directory, restrict permissions to the owning user, and ensure the file is excluded from source control, backups where appropriate, and diagnostic collection.
- Avoid appending secrets directly to
.bashrcor.zshrc. Do not instruct users to source their entire startup file as part of key configuration. - On Windows, prefer Credential Manager or an equivalent protected secret store instead of a persistent plaintext environment variable.
- Correct the security declaration so that it accurately discloses any persistent configuration write required by the documented setup process.
- Document key rotation and revocation procedures, and recommend using a narrowly scoped key with quota or billing limits where the provider supports them.
