Back to skill

Security audit

amazon-product-reviews-scraper-api-skill

Security checks for vulnerabilities and agentic risk

Overview

The skill performs the advertised Amazon review scraping through BrowserAct, but it insecurely tells users to provide an API key through the agent chat if the environment variable is missing.

Install only if you are comfortable sending the requested Amazon product parameters and resulting data to BrowserAct. Do not paste your BrowserAct API key into chat; configure BROWSERACT_API_KEY locally or through a secrets manager, and rotate the key if it has already been shared in a conversation.

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:27
Finding
API Key Solicitation Through Agent Conversation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:27-31`; `scripts/amazon_product_reviews_scraper_api.py:105-109` **Vulnerability Type**: Sensitive credential exposure through insecure secret-handling instructions **Risk Level**: Medium ### Vulnerable Code Snippets `SKILL.md:27-31`: ```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-reviews-scraper) to get your Key." ``` `scripts/amazon_product_reviews_scraper_api.py:105-109`: ```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 instructs the Agent to ask the user to provide a reusable BrowserAct API key, and the script explicitly presents giving the key to the Agent as a supported configuration method. Supplying secrets through an Agent conversation can expose them to conversation history, application telemetry, model-provider infrastructure, debugging records, downstream Agent context, or other systems that process prompts. This disclosure is unnecessary because the implementation already reads the credential from the `BROWSERACT_API_KEY` environment variable. The script legitimately transmits that credential as a Bearer token only to the fixed BrowserAct HTTPS API endpoint. That network transmission is required for the declared functionality; collecting the same key through the conversation is not. No hardcoded credential was found ...[truncated 1541 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the instruction to ask users to provide API keys through the Agent conversation. 2. Replace the relevant `SKILL.md` guidance with instructions to configure the secret locally through an environment variable or supported secret manager. 3. Change the script message so it never suggests providing the key to the Agent. For example: ```python if not api_key: print("\n[!] ERROR: BrowserAct API Key is missing.", flush=True) print(f"Obtain a key from: {API_KEY_URL}", flush=True) print( "Configure it locally as BROWSERACT_API_KEY using your environment " "or an approved secret manager. Do not paste the key into chat.", flush=True, ) sys.exit(1) ``` 4. In `SKILL.md`, state explicitly that the Agent must not request, repeat, print, store, or accept the key in conversation. 5. Keep the credential limited to the child process environment for the duration of execution and avoid command-line arguments, files, diagnostic output, or exception messages that could disclose it. 6. Recommend revocation and rotation if a key has already been pasted into a conversation. 7. Where BrowserAct supports it, use a narrowly scoped credential with task, spending, rate, and expiration limits to reduce the impact of compromise. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (3)

Lp3

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding
The skill invokes a Python script that consumes an environment secret (`BROWSERACT_API_KEY`) and performs outbound API/network operations, but it does not declare explicit permissions for those capabilities. That creates a transparency and policy-enforcement gap: an agent or platform may allow the skill to run without clearly surfacing that it accesses secrets and sends data to a third party.

Vague Triggers

Medium
Confidence
82% confidence
Finding
The description is broad enough to match many generic scraping, research, enrichment, monitoring, and export requests, which can cause the skill to be selected outside a narrowly intended Amazon-reviews context. Overbroad triggering increases the chance of unnecessary third-party data transfer, unintended scraping activity, or use in contexts where the user did not specifically consent to this external automation service.

Ssd 3

Medium
Confidence
99% confidence
Finding
The script explicitly tells the operator to "Provide it to me" when referring to the BrowserAct API key, creating a social-engineering path for secret disclosure to the assistant or any intermediary system handling the interaction. In an agent skill context, this is especially risky because users may paste live credentials into chat or tool inputs, causing credential exposure beyond the local runtime environment.

Static analysis

No suspicious patterns detected.