T09 · Insecure Skill Coding Practices
- Location
SKILL.md:34- Finding
API Credential Solicitation Through Agent Conversation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:34-37;scripts/amazon_reviews_api.py:86-94
Vulnerability Type: API credential exposure through an insecure secret-provisioning workflow
Risk Level: MediumVulnerable Code and Instructions
SKILL.md:34-37: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/amazon_reviews_api.py:86-94: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) sys.exit(1)Technical Analysis
The Skill explicitly directs the Agent to ask the user for a reusable BrowserAct API key and tells the user to “Provide it to me.” This creates an insecure credential-provisioning path through the conversation rather than requiring direct configuration through a local environment variable or secret-management facility.
Credentials submitted through an Agent conversation may be retained in conversation history, execution traces, observability systems, support records, or other platform logs. The script does not itself print the value or transmit it to unrelated destinations; its legitimate network use sends the key to
https://api.browseract.comas a Bearer token. The vulnerability is therefore the unnecessary solicitation and handling of the secret by the Agent, not the required authenticated BrowserAct API call.Attack Path
- The user invokes th ...[truncated 1054 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove all instructions asking users to provide API keys through the Agent conversation.
- Replace “Provide it to me” with instructions to configure
BROWSERACT_API_KEYdirectly in the local process environment or an approved secret-management interface. - Make the missing-key message state explicitly that the credential must not be pasted into chat, logs, command-line arguments, or source files.
- Keep the key out of standard output, error messages, exception details, and task results.
- Document key rotation and revocation procedures for users who may already have disclosed a key.
- Where supported, use narrowly scoped, short-lived credentials with usage limits rather than long-lived account-wide API keys.
- Ensure Agent and platform telemetry applies secret redaction to values matching the BrowserAct credential format as defense in depth.
A safer failure message would be:
python if not api_key: print( "BROWSERACT_API_KEY is missing. Configure it directly in your " "environment or approved secret store. Do not paste the key into chat.", flush=True, ) sys.exit(1)
