Back to skill

Security audit

Google Search API

Security checks for vulnerabilities and agentic risk

Overview

This is a legitimate Google search API wrapper, but it should go to Review because it exposes the API key through command-line arguments and sends sensitive search/location inputs to a third-party API without strong privacy controls.

Review carefully before installing. Use it only if you are comfortable sending search terms, localization filters, public image URLs, and related identifiers to Just Serp API. Avoid precise location fields and private or signed image URLs unless necessary, and prefer a version that reads JUST_SERP_API_KEY directly from the environment rather than passing it as --api-key; rotate the key if it may have been captured by process logs or monitoring.

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
bin/run.mjs:3411
Finding
API Key Exposed Through Process Command-Line Arguments## Vulnerability Details **File Location**: `bin/run.mjs:3411, 3422-3424, 3436-3440, 3505-3508` **Related Documentation**: `SKILL.md:40` **Vulnerability Type**: Credential exposure through process arguments **Risk Level**: Medium ### Vulnerable Code The documented invocation expands the secret into the command-line argument vector: ```bash node {baseDir}/bin/run.mjs --operation "<operation-id>" --api-key "$JUST_SERP_API_KEY" --params-json '{"key":"value"}' ``` The runtime then reads the API key from `process.argv` and places it in the authentication header: ```js const args = parseArgs(process.argv.slice(2)); if (!args.apiKey) { fail("Missing required --api-key argument."); } const requestInit = { headers: { "accept": "application/json", "X-API-Key": args.apiKey, }, method: operation.method, }; ``` Argument parsing explicitly accepts the secret through `--api-key`: ```js if (flag === "--api-key") { parsed.apiKey = value; index += 1; continue; } ``` ### Technical Analysis Although transmitting the API key to the fixed Just Serp API endpoint in an authentication header is necessary for the declared functionality, passing the key through `--api-key` is not necessary. The shell expands `$JUST_SERP_API_KEY` before Node starts, placing the plaintext credential in the process argument vector. Depending on the host configuration, command-line arguments may be exposed through process inspection interfaces, system monitoring software, audit logs, process supervisors, diagnostic snapshots, or command-history capture. Any local user or monitoring component with sufficient visibility could recover the key while the process is running or from retained telemetry. The network destination itself is constrained to the hard-coded HTTPS origin `https://api.justserpapi.com`; no evidence was found that user parameters can redirect the credential to another host. ### Attack Path 1. A user invokes the Skill using the documented command. 2. ...[truncated 961 chars]
Remediation
## Remediation Suggestions 1. Remove the `--api-key` command-line option and read the credential directly from the declared environment variable: ```js const apiKey = process.env.JUST_SERP_API_KEY; if (!apiKey) { fail("Missing required JUST_SERP_API_KEY environment variable."); } ``` 2. Use the environment-derived value only when constructing the authentication header: ```js const requestInit = { headers: { accept: "application/json", "X-API-Key": apiKey, }, method: operation.method, }; ``` 3. Update `SKILL.md` so the invocation does not expand the secret into `argv`: ```bash node {baseDir}/bin/run.mjs --operation "<operation-id>" --params-json '{"key":"value"}' ``` 4. If explicit credential injection is operationally required, accept it through protected standard input or a permission-restricted file descriptor rather than through command-line arguments. 5. Ensure error handling, debug logging, process supervisors, and telemetry systems never record the API key or complete authentication headers. 6. Rotate any key that may previously have been captured in process-monitoring or audit logs, and review associated API usage for unauthorized quota consumption.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (12)

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
- Project site: [Just Serp API](https://justserpapi.com/?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justserpapi_google&utm_content=project_link).
- Authentication details: [Just Serp API Docs](https://docs.justserpapi.com/?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justserpapi_google&utm_content=project_link).

## Output Rules

- Lead with the Google surface you used and the exact query or filters applied.
- For SERP-style responses, summarize the top result patterns before raw JSON.
Confidence
85% confidence
Finding
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Lp3

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding
Without declared permissions the skill's intent is opaque and cannot be validated.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
This skill forwards user-supplied search queries and potentially sensitive location data (for example, location, uule, ll, place_id, ludocid, image URLs, and other targeting fields) to a third-party service at api.justserpapi.com without any built-in consent prompt, minimization, or warning. In an agent context, users may reasonably believe they are interacting with a generic search capability, so silent transmission of precise geolocation or other user-provided identifiers to an external vendor creates a real privacy and data-governance risk.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
This skill sends user-provided search queries and, for many endpoints, potentially sensitive localization data such as country, location, UULE, coordinates, and place identifiers to an external third-party service. Without an explicit warning or consent guidance in the manifest, users may unknowingly disclose sensitive interests, whereabouts, or business targets to the provider and upstream search surfaces.

Description-Behavior Mismatch

Medium
Confidence
97% confidence
Finding
The manifest says the skill searches Google web, news, maps, trends, shopping, scholar, finance, hotel, and media surfaces, but the operation set also exposes autocomplete, jobs, images, lens, patents, AI Overview/AI Mode, local search, maps photos/posts/reviews/place details, immersive product, and shorts endpoints (for example L0008-L0010, L0133-L0135, L0514-L0516, L0828-L0830, L0940-L0942, L1593-L1595, L1025-L1027, L1137-L1139, L1204-L1206, L1262-L1264, L1311-L1313, L0752-L0754, L2916-L2918). These are substantive user-facing capabilities, not merely implementation details, so the manifest understates what the skill can do.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The operations document omits a privacy warning that user queries, location fields such as country/location/uule, and optionally raw HTML retrieval requests are sent to an external SERP provider. This can lead users or higher-level agents to disclose sensitive search intent or location data without informed consent, which is especially relevant because this skill is explicitly a third-party Google SERP API wrapper.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The Lens operation accepts an image URL and sends it to an external analysis service, but the documentation does not warn that the submitted URL may reveal sensitive third-party content, private infrastructure locations, or user-associated media. Because image URLs can embed identifiers or point to private-but-publicly-reachable assets, users may unknowingly expose sensitive information to the external provider.

Description-Behavior Mismatch

Medium
Confidence
97% confidence
Finding
The manifest says the skill searches Google web, news, maps, trends, shopping, scholar, finance, hotel, and media surfaces, but this operations file also exposes Google Patents endpoints for patent search and patent detail retrieval. Patent functionality is a distinct search surface and is not included in the stated manifest scope.

Natural-Language Policy Violations

Low
Confidence
85% confidence
Finding
This manifest repeatedly defines a "language" parameter as the mechanism for controlling result language, but nowhere in the file states that language selection should follow the user's preference or require opt-in. Because the skill is broadly applicable across many operations, this creates a natural-language policy risk that implementers may default to a fixed language rather than offering user choice.

Description-Behavior Mismatch

Low
Confidence
85% confidence
Finding
The manifest's listed categories describe search, news, maps, trends, shopping, scholar, finance, hotel, and media surfaces, but dedicated patent and job search APIs are separately exposed at L1593-L1809 and L0828-L0915. Patent due diligence and hiring/recruitment analysis are distinct domains that are not naturally implied by the manifest wording.

Description-Behavior Mismatch

Low
Confidence
93% confidence
Finding
The manifest enumerates supported Google surfaces such as web, news, maps, trends, shopping, scholar, finance, hotel, and media, but it does not mention jobs. This file documents a dedicated Google Jobs search operation, which expands the advertised scope beyond the listed surfaces.

Description-Behavior Mismatch

Low
Confidence
84% confidence
Finding
Beyond dedicated patent endpoints, the patent search API includes cross-surface behavior such as a 'scholar' toggle and patent discovery workflows, reinforcing that the skill supports intellectual-property research not disclosed in the manifest. This is broader than the manifest's listed surfaces and purpose statement.

Static analysis

No suspicious patterns detected.