Back to skill

Security audit

amazon-product-details-scraper-api-skill

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to perform its advertised Amazon product scraping task, but it gives unsafe guidance to provide a BrowserAct API key through the agent conversation and has broad routing language.

Review before installing. Use this only when you intentionally want BrowserAct to scrape Amazon product details for a specified marketplace and ASIN. Configure BROWSERACT_API_KEY through your local environment or a secret manager, and do not paste the API key into chat. If you previously pasted the key into a conversation, rotate it in BrowserAct.

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
scripts/amazon_product_details_scraper_api.py:101
Finding
Unsafe Solicitation of BrowserAct API Keys Through the Agent Conversation## Vulnerability Details **File Location**: `SKILL.md:26-29`; `scripts/amazon_product_details_scraper_api.py:101-106` **Vulnerability Type**: Credential exposure through insecure secret-handling instructions **Risk Level**: Medium ### Vulnerable Code and Instructions `SKILL.md:26-29`: ```markdown ## 🔑 API Key Guide 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 yet, please go to the [BrowserAct Console](https://www.browseract.com/reception/integrations?co-from=amazon-product-details-scraper) to get your Key." ``` `scripts/amazon_product_details_scraper_api.py:101-106`: ```python 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) ``` ### Technical Analysis The Skill explicitly instructs the user to provide an API key to the Agent when the environment variable is absent. The script reinforces this by presenting disclosure to the Agent as an alternative to configuring `BROWSERACT_API_KEY`. API keys are bearer credentials and should not be entered into conversational context. Agent conversations may be retained in transcripts, diagnostic logs, observability systems, or made available to integrated tools. Consequently, asking a user to paste the key into a conversation unnecessarily expands the credential's exposure boundary. The script itself does not print the value of the key. Its use of the key in an `Authorization: Bearer` header sent over HTTPS to the declared BrowserAct API is necessary for the documented functionality. The vulnerabili ...[truncated 1442 chars]
Remediation
## Remediation Suggestions 1. Remove every instruction suggesting that users provide or paste the API key into the Agent conversation. 2. Require `BROWSERACT_API_KEY` to be configured locally through an environment variable, runtime secret injection, or an operating-system/cloud secret manager. 3. Replace the vulnerable script message with guidance such as: ```python print( "Set BROWSERACT_API_KEY securely in your local environment or secret manager. " "Do not paste API keys into chat.", flush=True, ) ``` 4. Update `SKILL.md` to require the Agent to report only that the environment variable is missing and to wait until the user confirms that it has been configured locally. 5. Ensure exceptions, HTTP diagnostics, and debug logs never include request headers or the credential value. 6. Recommend revocation and rotation of any API key previously pasted into a conversation. 7. Where supported, use narrowly scoped, short-lived credentials and enforce account-level usage and billing alerts.
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 (2)

Lp3

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding
The skill declares only OpenClaw metadata requirements but does not explicitly declare permissions despite instructing the agent to read an environment variable and invoke a remote API over the network. This can undermine permission transparency and review controls, causing the skill to access secrets or external services without clear user-visible authorization boundaries.

Vague Triggers

Medium
Confidence
82% confidence
Finding
The description contains broad phrases like research, monitoring, export, enrichment, and API automation that could cause the skill to be selected for many generic data-gathering requests unrelated to a narrowly scoped Amazon product-details workflow. Over-broad routing increases the chance of unintended execution, unnecessary secret use, and data being sent to a third-party scraping service when a user did not specifically request that tool.

Static analysis

No suspicious patterns detected.