Back to skill

Security audit

bbb-lead-scraper-agent-built-api-skill

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly does what it says, but it asks users to provide a BrowserAct API key through the agent conversation and supports broad business contact scraping.

Review before installing. Use this only for lawful, terms-compliant BBB/business data collection, and configure BROWSERACT_API_KEY through a local environment or approved secret manager instead of pasting the key into chat. Expect the skill to contact BrowserAct, consume account quota, and return scraped business contact data that should be handled carefully.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:20
Finding
API Key Solicitation Through Agent Conversation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:20`; `scripts/bbb_lead_scraper_api.py:95-102` **Vulnerability Type**: Plaintext credential solicitation and insecure secret handling **Risk Level**: Medium ### Vulnerable Code `SKILL.md:20`: ```markdown Before running, check the `BROWSERACT_API_KEY` environment variable. If it is not set, do not take other measures; ask and wait for the user to provide it. ``` `scripts/bbb_lead_scraper_api.py:95-102`: ```python api_key = os.getenv("BROWSERACT_API_KEY") if not api_key: print("\n[!] ERROR: BrowserAct API Key is missing.", flush=True) print("Please follow these steps:", flush=True) print(f"1. Go to: {API_KEY_URL}", 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 instructs the Agent to ask the user for a BrowserAct API key and the script tells the user to “Provide it to me.” This encourages disclosure of an authentication credential through the conversational interface. A secret pasted into a conversation may be retained in chat history, Agent context, telemetry, tool logs, or other records accessible to systems that process the conversation. The disclosure is unnecessary because the script already supports reading the credential from the `BROWSERACT_API_KEY` environment variable. The actual network use of the credential is consistent with the declared functionality: the script transmits it as a Bearer token only to the HTTPS BrowserAct API. The vulnerability is therefore the unnecessary conversational solicitation of the secret, not the authenticated API request itself. ### Attack Path 1. The user invokes the Skill without configuring `BROWSERACT_API_KEY`. 2. The Skill follows `SKILL.md` and asks the user to provide the key, or the script prints the instruction to “Provide it to me.” 3. The user pastes t ...[truncated 1200 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the instruction to ask the user to provide the API key: ```markdown Before running, check the `BROWSERACT_API_KEY` environment variable. If it is not set, instruct the user to configure it securely in the local environment or approved secret manager. Never ask the user to paste the key into the conversation. ``` 2. Replace the script’s disclosure prompt with environment-only guidance: ```python if not api_key: print("[!] ERROR: BROWSERACT_API_KEY is not configured.", flush=True) print( "Configure it through your local environment or approved secret manager. " "Do not paste API keys into chat.", flush=True, ) sys.exit(1) ``` 3. Prefer an approved secret manager or protected runtime environment injection over command-line arguments, configuration files, or chat messages. 4. Ensure the API key is never printed in logs, exception messages, task output, or diagnostic telemetry. 5. Document credential rotation procedures and advise users who previously pasted a key into chat to revoke and replace it. 6. Where supported, use a narrowly scoped BrowserAct key with quota controls and only the permissions required to run and retrieve this template’s tasks. ]]>
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (3)

Lp3

Medium
Category
MCP Least Privilege
Confidence
85% confidence
Finding
The skill declares runtime requirements for Python and an environment variable containing an API key, and it instructs execution of a script that performs external API calls, but it does not explicitly declare permissions for those sensitive capabilities. This weakens security review and user understanding because secret access and network use are effectively implicit, making it easier for a skill to exfiltrate data or perform unintended external actions without clear policy visibility.

Vague Triggers

Medium
Confidence
81% confidence
Finding
The description uses broad phrases like collecting public records, enriching datasets, monitoring public web data, and calling the template by API, which can match many ordinary user requests beyond the narrow intended BBB scraping use case. Over-broad invocation increases the chance the skill is auto-selected in contexts involving large-scale data collection or contact harvesting without adequate user scrutiny, expanding misuse potential.

Missing User Warnings

Low
Confidence
88% confidence
Finding
The skill explicitly promotes collection of phone numbers, websites, addresses, profile URLs, and other business lead fields but does not include any warning about privacy, terms-of-service compliance, lawful use, or downstream handling of scraped contact data. Even when data is publicly accessible, omitting these guardrails can normalize bulk harvesting and increase the risk of misuse, compliance issues, or inappropriate retention/sharing.

Static analysis

No suspicious patterns detected.