T09 · Insecure Skill Coding Practices
Error
- Location
- config.json:9
- Finding
- Plaintext MiniMax API Credential Committed to Configuration<![CDATA[ ## Vulnerability Details **File Location**: `config.json:9` **Vulnerability Type**: Hardcoded secret / plaintext sensitive credential **Risk Level**: High ### Vulnerable Code ```json { "artist": "传澈", "credits": { "lyrics": "传澈", "compose": "传澈", "sing": "风吟", "produce": "传澈" }, "minimax_api_key": "[REDACTED EXPOSED sk-cp- CREDENTIAL]" } ``` The credential value is intentionally redacted from this report to prevent further disclosure. The audited file contains the complete plaintext value. ### Technical Analysis A live-looking MiniMax API credential is stored directly in a project configuration file. Any person or process able to download the project, inspect a packaged Skill, access a repository clone, read an artifact cache, or retrieve repository history can recover the credential without authentication. The scripts reviewed during this audit do not directly read or transmit this field. Nevertheless, committing a secret to a distributable project is independently exploitable because the credential can be extracted and used outside the Skill. Removing it from only the current revision would also be insufficient if previous revisions, build artifacts, or caches remain accessible. ### Attack Path 1. An attacker obtains the Skill archive, repository contents, build artifact, or historical revision. 2. The attacker opens `config.json`. 3. The attacker extracts the plaintext `minimax_api_key` value. 4. The attacker submits the key to MiniMax-compatible API or CLI endpoints. 5. If the key remains valid, the attacker consumes its quota and accesses any API capabilities authorized to that credential. No local code execution is required to exploit this issue. ### Impact Assessment Successful exploitation may provide unauthorized use of the associated MiniMax account's API privileges. The precise scope depends on server-side permissions assigned to the key, but may include: - Unauthorized model requests - Quota exhaustion ...[truncated 377 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Revoke the exposed credential immediately through the MiniMax account console. 2. Generate a replacement credential with only the minimum permissions and quota required. 3. Remove the credential from `config.json` and all distributable packages. 4. Purge it from version-control history, release archives, CI artifacts, logs, caches, and mirrors where feasible. 5. Load the replacement from a protected source, such as: - An environment variable - An operating-system credential store - A managed secrets service - The authenticated `mmx` CLI credential store 6. Commit only a non-sensitive template such as `config.example.json`. 7. Add `config.json` and other local secret files to `.gitignore`. 8. Add automated secret scanning to pre-commit and CI workflows. 9. Monitor account activity and billing for unauthorized requests made with the exposed key. ]]>
