Back to skill

Security audit

google-trends-interest-scraper-api-skill

Security checks for vulnerabilities and agentic risk

Overview

The skill does run a Google Trends BrowserAct workflow, but it asks users to share an API key in chat and documents broader, potentially sensitive scraping outputs than its stated purpose requires.

Review before installing. Use this only for the named Google Trends BrowserAct workflow, set BROWSERACT_API_KEY locally instead of pasting it into chat, and avoid using it for contact-data extraction or broad public-record scraping unless the skill is narrowed and redaction guidance is added.

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
BrowserAct API Key Is Solicited Through the Agent Conversation## Vulnerability Details **File Location**: `SKILL.md:20` and `scripts/google_trends_interest_scraper_api.py:95-102` **Vulnerability Type**: Insecure bearer-credential 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/google_trends_interest_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 `BROWSERACT_API_KEY` is used as a bearer credential in the HTTP `Authorization` header. Although reading it from an environment variable is appropriate, both the Skill instructions and the script tell the user to provide the credential to the Agent as an alternative. Pasting a bearer token into an Agent conversation unnecessarily exposes it to conversation history, model context, diagnostic logs, integrations, and other systems with access to the session. Possession of a bearer token is generally sufficient for authentication within the permissions granted to that token; no additional proof of identity is demonstrated by this implementation. This behavior exceeds the minimum privileges and data exposure required for the declared functionality. The script can operate entirely by reading `BROWSERACT_API_KEY` from the local environment and therefore does not need the credential to enter the conversation. The script otherwise transmits the key only to the declared HTTPS BrowserAct endpoint. No evidence was found that it deliberate ...[truncated 1505 chars]
Remediation
## Remediation Suggestions 1. Remove every instruction asking the user to provide or paste the API key into the Agent conversation. 2. Change `SKILL.md:20` to require secure local configuration, for example: ```markdown If `BROWSERACT_API_KEY` is not set, stop and instruct the user to configure it locally through an environment variable or approved secret manager. Never ask the user to paste the key into chat. ``` 3. Replace the script message with a local-only instruction: ```python print( "Set BROWSERACT_API_KEY locally using an environment variable or " "approved secret manager. Do not paste the key into chat.", flush=True, ) ``` 4. Prefer a platform-provided secret store over interactive input, command-line arguments, or plaintext configuration files. 5. Ensure the credential is never printed, included in exceptions, persisted in task output, or recorded by debug-level HTTP logging. 6. Document credential rotation and revocation procedures in case a key has already been shared through a conversation. 7. Where BrowserAct supports it, use a narrowly scoped token with minimum permissions and enforce expiration, usage monitoring, and quota limits.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (3)

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The documented output fields include unrelated and privacy-sensitive data such as email, phone, and address, which do not align with a Google Trends interest scraper. This mismatch can mislead an agent or user into treating the skill as a generic scraper, enabling overcollection, accidental exposure of sensitive data, or invocation against unintended data targets.

Vague Triggers

Medium
Confidence
83% confidence
Finding
The trigger phrases are broad enough to match generic scraping, export, enrichment, and monitoring requests beyond Google Trends. That increases the chance the skill is invoked in inappropriate contexts, causing unintended browsing/API actions, overbroad data collection, or routing users to a third-party service when a narrower skill was intended.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The skill instructs printing the full BrowserAct API response and lists possible contact fields without any warning about sensitive-data handling. If the external service returns personal or otherwise sensitive information, logs, terminal history, or downstream tooling could retain and expose that data unnecessarily.

Static analysis

No suspicious patterns detected.