T09 · Insecure Skill Coding Practices
Error
- Location
- SKILL.md:21
- Finding
- Hard-Coded API Credential in Skill Documentation## Vulnerability Details **File Location**: `SKILL.md`, line 21 **Vulnerability Type**: Hard-coded secret / plaintext API credential **Risk Level**: High ### Vulnerable Code ```markdown - **API Key**: `sk_3bf4e74479614724623768f5269c68251b09adf555a891eda68dbdfeac108f01` ``` ### Technical Analysis An API-key-shaped credential is embedded directly in a distributable documentation file. Anyone with access to the project package or its source history can retrieve the credential without authentication. The file does not identify the value as an example or nonfunctional placeholder. Because the project contains no executable integration, API endpoint, or credential-scoping configuration, the credential's validity and exact permissions could not be verified. Nevertheless, publishing a potentially active credential violates secret-management and least-exposure practices. ### Attack Path 1. An attacker downloads, clones, or otherwise obtains the Skill package. 2. The attacker opens `SKILL.md` and copies the credential from line 21. 3. The attacker identifies the associated service from the nearby SkillPay.me payment description or through API discovery. 4. If the credential is active, the attacker submits authenticated requests using it. 5. The attacker consumes available quota or paid operations until the key is revoked, restricted, or exhausted. ### Impact Assessment If valid, the credential may permit unauthorized use of its associated service within the key's configured privileges. Potential consequences include unauthorized paid requests, quota consumption, financial loss, service abuse, and request attribution to the legitimate account holder. The maximum scope cannot be established from the audited artifact because it contains no API implementation, endpoint, account configuration, or permission details. No evidence of local code execution, privilege escalation, persistence, or data exfiltration was found.
- Remediation
- ## Remediation Suggestions 1. Revoke and rotate the exposed credential immediately, treating it as compromised. 2. Remove the credential from `SKILL.md` and all other distributed artifacts. 3. Purge the exposed value from version-control history and previously published packages where feasible. 4. Replace the value in documentation with an unmistakable placeholder, such as: ```markdown - **API Key**: Set the `SKILLPAY_API_KEY` secret in your runtime environment. ``` 5. Load credentials at runtime from a protected secret manager or environment variable rather than source-controlled files. 6. Restrict replacement credentials to the minimum required permissions, quota, and billing limits. 7. Add automated secret scanning to pre-commit and CI workflows to prevent recurrence. 8. Review usage and billing logs for unauthorized activity involving the exposed key.
