T09 · Insecure Skill Coding Practices
- Location
SKILL.md:29- Finding
API Key Solicitation Through the Agent Conversation
- Content
View full analysis
"Since you have not configured the BrowserAct API Key yet, please go to the [BrowserAct Console](https://www.browseract.com/reception/integrations) first to get your Key." ``` `scripts/youtube_comments_api.py:85-88`: ```python 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 script legitimately requires a BrowserAct API key and supports retrieving it from the `BROWSERACT_API_KEY` environment variable. However, the Skill instructions require the Agent to request the key from the user, while the runtime guidance explicitly suggests providing the credential “to me.” Submitting an API key through an Agent conversation is not necessary for the declared functionality. The key can instead be configured directly in the execution environment. Credentials entered into a conversation may be exposed through chat history, application telemetry, model-provider logs, Agent memory, tool traces, debugging records, or access by other users and administrators who can inspect the session. The script subsequently uses the credential as a Bearer token: ```python headers = {"Authorization": f"Bearer {api_key}"} ``` Transmission of that token to the documented Brow ...[truncated 1619 chars]- Remediation
View remediation
