T09 · Insecure Skill Coding Practices
Error
- Location
- SKILL.md:709
- Finding
- Hardcoded Administrative Credentials and Reusable API Key in Skill Documentation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:709-713` and `SKILL.md:759-760` **Vulnerability Type**: Hardcoded credentials **Risk Level**: High ### Vulnerable Code ```typescript // 1. User login const loginRes = await auth_login({ username: "admin", password: "admin123" }); ``` ```text - Most APIs require Authorization: Bearer {token} in the request header - The Agent can also authenticate using X-API-Key: agent-api-key-12345 ``` ### Technical Analysis The Skill documentation exposes a reusable administrator username/password pair and a static API key. If either documented value is accepted by the backend, anyone with access to the Skill package can obtain authenticated access without authorization. The API key is particularly concerning because it is presented as an authentication mechanism rather than clearly identified as a nonfunctional placeholder. Static shared credentials cannot be safely attributed to individual users, are difficult to rotate, and commonly remain active when example configurations are promoted into production. The static review could not verify the backend behavior because the server implementation is not included. Exploitability therefore depends on whether these documented credentials remain valid. Nevertheless, publishing potentially functional credentials is an insecure coding and configuration practice. ### Attack Path 1. An attacker reads the publicly available `SKILL.md`. 2. The attacker extracts either `admin` / `admin123` or `agent-api-key-12345`. 3. The attacker connects to the collaboration backend on port 8080, including through any container mapping, reverse proxy, development tunnel, or port forwarding that exposes the nominally local service. 4. The attacker authenticates through `/api/auth/login` or supplies the disclosed API key in an `X-API-Key` header. 5. If the credentials are valid, the attacker invokes authenticated project, document, task, bug, user, notification, role, or permissi ...[truncated 794 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Immediately invalidate and rotate `admin123` and `agent-api-key-12345` if either value is accepted by any deployed environment. 2. Remove all functional passwords, tokens, and API keys from documentation and source control. 3. Replace examples with unmistakably nonfunctional placeholders, such as: ```typescript username: "<YOUR_USERNAME>", password: "<READ_FROM_SECRET_STORE>" ``` 4. Generate a unique, cryptographically random API key for each installation and principal. 5. Store credentials in an approved secret manager or protected runtime environment, not in Skill files. 6. Require first-run administrator provisioning rather than shipping a default administrator password. 7. Apply expiration, rotation, revocation, and least-privilege scopes to API keys. 8. Add automated secret scanning to source-control and release pipelines. 9. Audit authentication logs for prior use of the exposed values. ]]>
