T09 · Insecure Skill Coding Practices
Error
- Location
- SKILL.md:25
- Finding
- Hard-Coded API Credential in Skill Documentation## Vulnerability Details **File Location**: `SKILL.md:25` **Vulnerability Type**: Plaintext hard-coded API credential **Risk Level**: High ### Vulnerable Code ```markdown | 机构资金 | ARKM API | API key: e77c4a5d-f752-4a49-a49e-503970893e37 | ``` ### Technical Analysis The skill package embeds an ARKM API key directly in its documentation. Anyone who can download, inspect, log, or otherwise access the package can recover the credential without authentication. Embedding a credential in skill content prevents effective access control and secret lifecycle management. The key may also be exposed through source repositories, package archives, backups, model context, generated logs, or copied documentation. The project contains no code that exfiltrates this credential, and the audit could not independently establish whether the key remains active or what permissions it has. Nevertheless, publishing an API credential is an insecure coding and configuration practice. ### Attack Path 1. An attacker obtains or inspects the skill package. 2. The attacker opens `SKILL.md` and copies the plaintext ARKM API key from line 25. 3. If the credential is active, the attacker submits requests to the corresponding ARKM API using the exposed key. 4. The attacker consumes any permissions, quota, or billable capacity assigned to that credential until it is revoked, expires, or is otherwise restricted. ### Impact Assessment If active, the exposed credential may permit unauthorized access to the API capabilities granted to it. Potential consequences include: - Unauthorized API requests. - Consumption or exhaustion of API quotas. - Financial costs if usage is billable. - Access to data available under the credential's assigned permissions. - Service disruption caused by rate-limit exhaustion or provider revocation. - Loss of accountability because legitimate and unauthorized requests use the same identity. The impact is limited to the privileges assigned to the exposed API key. Th ...[truncated 157 chars]
- Remediation
- ## Remediation Suggestions 1. Revoke the exposed API key immediately and issue a replacement only if the integration still requires it. 2. Remove the credential from `SKILL.md` and from all package versions, repository history, release archives, logs, and cached artifacts where feasible. 3. Require users or deployment operators to supply the credential through an approved secret manager or protected environment variable. 4. Apply least privilege to the replacement key, restricting accessible endpoints, operations, quotas, source addresses, and expiration time where supported. 5. Ensure scripts and agent instructions never print, interpolate into reports, or persist the replacement credential. 6. Add secret scanning to development and release pipelines to block future publication of API keys. 7. Document only a placeholder, such as `ARKM_API_KEY`, rather than a real credential.
