T09 · Insecure Skill Coding Practices
Warning
- Location
- SKILL.md:19
- Finding
- API Key Disclosure Through Agent Conversation< to get your Key." ``` ### Technical Analysis The instructions direct the Agent to ask the user to provide a reusable BrowserAct API key. Supplying a credential through an Agent conversation can expose it to conversation history, model context, telemetry, debugging records, or other logging systems. The credential only needs to be available to the local process through the `BROWSERACT_API_KEY` environment variable. Transmitting it through the conversation is therefore unnecessary and violates least-privilege and secret-handling principles. The script legitimately sends the API key as an HTTPS bearer token to the declared `api.browseract.com` service. The vulnerability is not that network transmission; it is the instruction encouraging the user to disclose the credential to the Agent before execution. ### Attack Path 1. The Skill checks whether `BROWSERACT_API_KEY` is configured. 2. If it is absent, the Skill instructs the Agent to ask the user to provide the key. 3. The user pastes the BrowserAct API key into the conversation. 4. The credential becomes part of Agent context or retained conversation and telemetry records. 5. A party with access to those records retrieves the reusable credential. 6. The exposed key is used to invoke BrowserAct operations under the victim's account until it is revoked or expires. ### Impact Assessment An attacker who obta ...[truncated 450 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Replace the instruction to “ask and wait for the user to provide” the key with an instruction requiring local secret configuration. - Explicitly tell users never to paste API keys into Agent conversations. - Require users to set `BROWSERACT_API_KEY` through a protected shell environment, operating-system credential store, or secret manager. - Ensure that error messages, command output, and diagnostic logs never print the credential. - Recommend immediate key rotation if a credential has already been disclosed through chat. - Use narrowly scoped and short-lived credentials if BrowserAct supports them. A safer instruction would be: ```markdown If `BROWSERACT_API_KEY` is not configured, stop and ask the user to set it locally through a protected environment variable or secret manager. Never ask the user to paste the API key into the conversation. ``` ]]>
