T09 · Insecure Skill Coding Practices
Error
- Location
- SKILL.md:18
- Finding
- Hardcoded API Credential in Skill Documentation## Vulnerability Details **File Location**: `SKILL.md:18` **Vulnerability Type**: Hardcoded secret / exposed API credential **Risk Level**: High ### Vulnerable Code Snippet ```markdown - **API Key**: `sk_e0c26b0e9826d17c309bd5030cbe95ef04ed33cf4f05c03dae0f23358ee5e956` ``` ### Technical Analysis A credential-shaped API key is embedded directly in the distributable Skill documentation. Any user or system with access to the project can read and copy it without authentication. If the exposed key is active and accepted by SkillPay or an associated API, an attacker could reuse it outside the intended Skill. Secrets committed to project files must be considered compromised because removing them from the current version does not remove copies from package archives, caches, logs, forks, or version-control history. ### Attack Path 1. An attacker downloads or reads the Skill package. 2. The attacker opens `SKILL.md` and extracts the key from line 18. 3. The attacker identifies the service or API that accepts the credential. 4. The attacker submits requests using the exposed key. 5. If the key remains valid, requests execute under the associated account's authorization and billing context. Exploitation depends on the key being active and on its server-side permissions. ### Impact Assessment A valid exposed key may permit unauthorized API use, paid-quota consumption, billing abuse, rate-limit exhaustion, and impersonation of the associated service account. The exact scope is limited to the permissions assigned to the credential and cannot be determined from the available file. No evidence indicates access to host operating-system privileges or cryptocurrency private keys.
- Remediation
- ## Remediation Suggestions 1. Revoke and rotate the exposed key immediately. 2. Remove the credential from `SKILL.md` and replace it with a clearly invalid placeholder such as `your_api_key`. 3. Remove the secret from version-control history, release archives, registries, caches, and published Skill packages where feasible. 4. Load operational credentials from environment variables or a managed secret store rather than source files or documentation. 5. Apply least-privilege permissions, spending limits, rate limits, expiration, and service restrictions to replacement credentials. 6. Review provider access and billing logs for unauthorized use of the exposed key. 7. Add automated secret scanning to pre-commit and CI workflows to prevent recurrence.
