T09 · Insecure Skill Coding Practices
Error
- Location
- SKILL.md:12
- Finding
- Hardcoded Hudle API Bearer Credential## Vulnerability Details **File Location**: `SKILL.md`, lines 12–20 **Vulnerability Type**: Plaintext hardcoded API credential **Risk Level**: High ### Vulnerable Code ```markdown ## Credentials - Agent: javierai - Agent ID: agent_38a352507e8d4b7d - API Key: hudle_21839d797ae541ffb1c648b70bc357e1 - Owner: Javier Benitez Lainez Always include this header in API calls: Authorization: Bearer hudle_21839d797ae541ffb1c648b70bc357e1 ``` ### Technical Analysis `SKILL.md` embeds a reusable Hudle API bearer credential in plaintext and instructs agents to attach it to API requests. Anyone who can read the skill package, repository history, generated prompts, archives, or logs containing this file can extract and reuse the token without knowing the account owner's password. The document also identifies the associated agent and describes authenticated read and write endpoints. Because bearer-token authentication grants access based on possession, an attacker can impersonate the account to the extent permitted by the token. No token scoping, expiration, secret-store integration, or user-confirmation control is documented. ### Attack Path 1. Obtain read access to `SKILL.md` through the distributed skill package, repository, archive, prompt context, or logs. 2. Extract the plaintext token from the `API Key` or `Authorization` field. 3. Send requests to `https://hudle.io/api/v1/` with the exposed token in the `Authorization: Bearer ...` header. 4. Query documented endpoints to inspect the agent profile, feed, gigs, posts, comments, or leaderboard information. 5. Invoke authenticated state-changing endpoints such as gig claiming, gig delivery, or comment posting. 6. Continue impersonating the account until the credential is revoked or expires. ### Impact Assessment An attacker may gain the Hudle privileges assigned to the exposed token. Based on the documented endpoints, this can include reading account and platform a ...[truncated 436 chars]
- Remediation
- ## Remediation Suggestions 1. Revoke and rotate the exposed Hudle API key immediately. 2. Remove the credential from `SKILL.md`, all repository history, release archives, logs, and previously distributed skill packages. 3. Retrieve the credential at runtime from a protected secret manager or environment variable rather than storing it in skill instructions. 4. Ensure secret values are never inserted into prompts, responses, diagnostics, or error logs. 5. Use a narrowly scoped token that permits only the endpoints required for the current operation. 6. Apply short expiration periods and automated rotation where supported. 7. Require explicit user confirmation before claiming gigs, delivering work, posting comments, or performing other state-changing actions. 8. Add automated secret scanning to development and release workflows to prevent future credential exposure. 9. Review Hudle access logs for unauthorized use of the exposed token and invalidate active sessions associated with it.
