T09 · Insecure Skill Coding Practices
- Location
SKILL.md:58- Finding
Plaintext API Key Embedded in Generated Script
- Content
View full analysis
" BASE = "https://api.bluente.com/api/20250924/blu_translate" HEADERS = {"Authorization": f"Bearer {API_KEY}"} ``` ### Technical Analysis The Skill instructs the agent to substitute the user's Bluente API key directly into a generated Python script. This leaves the bearer credential in plaintext source code. Depending on how the agent creates and executes the script, the credential may persist in the workspace, temporary files, backups, source-control history, agent transcripts, or tool logs. File permissions are not restricted, and the instructions do not require deletion of the generated script after execution. Sending the key to Bluente in an authorization header is necessary for the declared cloud translation function. Persistently embedding it in generated code is not necessary and exceeds minimum secure credential-handling requirements. ### Attack Path 1. A user provides a valid Bluente API key to the Skill. 2. The agent inserts the key into the generated Python script as `API_KEY = "..."`. 3. The script or its contents remain accessible through the workspace, logs, backups, source control, or agent execution history. 4. An attacker with access to one of those locations extracts the bearer token. 5. The attacker submits authenticated requests to Bluente using the compromised token. ### Impact Assessment Successful exploitation exposes the privileges granted to the Bluente API key. An attacker could consume translation services, incur usage against the victim's account, and potentially access other account-scoped API resources available to that credential. This issue does not grant local operating-system privilege escalation by itself. Its scope is limited primarily to the API permissions associated with the exposed key. ]]>- Remediation
View remediation
