T09 · Insecure Skill Coding Practices
- Location
SKILL.md:18- Finding
Unsafe Solicitation of BrowserAct API Credentials Through Agent Conversation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:18-22;scripts/google_maps_search_api.py:93-98
Vulnerability Type: Credential exposure through insecure secret-handling instructions
Risk Level: MediumVulnerable Code
SKILL.md:18-22:markdown ## 🔑 API Key Setup Before running, check the `BROWSERACT_API_KEY` environment variable. If not set, do not take other measures; ask and wait for the user to provide it. **Agent must inform the user**: > "Since you haven't configured the BrowserAct API Key, please visit the [BrowserAct Console](https://www.browseract.com/reception/integrations) to get your Key."scripts/google_maps_search_api.py:93-98:python if not api_key: print("\n[!] ERROR: BrowserAct API Key is missing.", flush=True) print("Please follow these steps:", flush=True) print("1. Go to: https://www.browseract.com/reception/integrations", flush=True) print("2. Copy your API Key.", flush=True) print("3. Provide it to me or set it as an environment variable (BROWSERACT_API_KEY).", flush=True)Technical Analysis
The Skill explicitly instructs the Agent to ask the user to provide a BrowserAct API key, and the script repeats that the user may provide the key “to me.” This encourages disclosure of a reusable bearer credential through the conversational interface.
Credentials submitted in a conversation may be retained in chat history, Agent execution traces, application telemetry, support records, or other logs. The disclosure is unnecessary because the script already reads the credential from the
BROWSERACT_API_KEYenvironment variable.The script later places this value into an authorization header:
python headers = {"Authorization": f"Bearer {api_key}"}Sending that header to the documented BrowserAct HTTPS endpoint is necessary for the declared hosted API functionality. The vulnerability is not that network transmission itself ...[truncated 1354 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove every instruction asking users to paste or otherwise provide an API key to the Agent.
- Change the missing-key message to require configuration through
BROWSERACT_API_KEYor an approved secret manager. - Do not accept API credentials through command-line arguments because they may be exposed through process listings and shell history.
- Ensure application logs and Agent traces redact authorization headers and values resembling API keys.
- Recommend immediate key rotation if a credential has already been disclosed in a conversation.
- Use narrowly scoped, short-lived credentials where BrowserAct supports them.
- Replace the script message with wording such as:
python print( "Set BROWSERACT_API_KEY through your local environment or approved " "secret manager. Do not paste API keys into chat.", flush=True, )
