Back to skill

Security audit

google-news-scraper-agent-built-api-skill

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it claims, but it unsafe­ly tells users they may provide a BrowserAct API key to the agent instead of only using a local secret or environment variable.

Install only if you are comfortable sending Google News search parameters and returned data to BrowserAct. Configure BROWSERACT_API_KEY through a local environment variable or approved secret manager, never by pasting the key into chat, and consider narrowing when the skill should be invoked.

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:23
Finding
API Key Requested Through Agent Conversation## Vulnerability Details **File Location**: `SKILL.md:23-27` and `scripts/google_news_scraper_api.py:96-100` **Vulnerability Type**: Credential exposure through insecure secret onboarding **Risk Level**: Medium ### Complete Vulnerable Code Snippets `SKILL.md:23-27`: ```markdown ## API Key Guide 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. Agent must tell 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=google-news-scraper) to get your Key." ``` `scripts/google_news_scraper_api.py:96-100`: ```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 directs the Agent to ask the user for a BrowserAct API key and wait for the user to provide it. The executable script reinforces this behavior by telling the user to “Provide it to me.” This creates an insecure credential-handling path because a user may paste the secret into the conversation. The API key could then be retained in chat transcripts, Agent context, telemetry, debugging records, platform logs, or other orchestration components. Such exposure is unnecessary: the script already supports reading the credential directly from the `BROWSERACT_API_KEY` environment variable. The outbound use of the credential itself is functionally justified. The script sends it as an HTTPS Bearer token only to the declared BrowserAct API for task creation, status polling, and result retrieval. The vulnerability is the conversational collection of the credential, which exceeds ...[truncated 1413 chars]
Remediation
## Remediation Suggestions 1. Remove the instruction to ask users to provide the API key to the Agent. 2. Replace it with a requirement that users configure `BROWSERACT_API_KEY` locally through an environment variable or approved secret manager. 3. Revise the script message so it never suggests pasting credentials into chat. 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 securely as BROWSERACT_API_KEY in your local environment " "or approved secret manager. Do not paste the key into chat.", flush=True, ) sys.exit(1) ``` 4. Update `SKILL.md` to state explicitly that the Agent must not request, receive, echo, log, or persist the API key. 5. Use a platform-native secret injection mechanism when available so the credential is supplied directly to the process. 6. Redact authorization headers and likely API-key patterns from application logs, telemetry, exception reports, and command traces. 7. Grant the BrowserAct key only the permissions required for this template, apply usage limits where supported, and rotate any key previously disclosed through conversation.
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 (4)

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill requires access to an environment variable and makes outbound API calls, but it does not declare permissions in a way that gives users clear visibility into those capabilities. This creates a transparency and consent problem: users may invoke the skill without understanding that their inputs and API key will be used with an external service.

Vague Triggers

Medium
Confidence
84% confidence
Finding
The invocation description contains broad trigger phrases such as dataset enrichment, public web data monitoring, and exporting public records, which can cause the skill to be selected for requests that are more general than Google News scraping. Over-broad routing increases the chance of unintended external data transfer or accidental execution in contexts where the user did not specifically ask to use BrowserAct.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The skill instructs the agent to collect parameters and use an external BrowserAct API, but it does not prominently warn users that their search terms, request metadata, and extracted results will be sent to a third-party service. This can expose potentially sensitive research topics or user-provided data without informed consent, even if the target content is nominally public.

Ssd 3

Medium
Confidence
96% confidence
Finding
The message explicitly tells the user to 'Provide it to me or set it as an environment variable,' which encourages disclosure of a sensitive API key directly to the agent or chat interface. In an agent/skill context, this is dangerous because users may paste credentials into logs, prompts, or third-party systems where retention and access controls are unclear.

Static analysis

No suspicious patterns detected.