Back to skill

Security audit

Google Search (Serper.dev)

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly does what it advertises, but its documented runtime path executes an unpinned third-party package through npx while handling an API key and outbound search traffic.

Install only if you are comfortable sending search terms to Serper.dev and exposing `SERPER_API_KEY` to the local skill process. Prefer a version that pins or vendors `tsx`, includes a lockfile, or ships compiled JavaScript instead of relying on unpinned `npx tsx` at runtime.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:31
Finding

Unpinned runtime dependency is downloaded and executed through npx

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:31-42; repeated in README.md:48, 53, 58, 63, 68, 73, 78, 83, 88, 93
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: Medium

Vulnerable Code

bash
SCRIPT_DIR="~/.openclaw/workspace/skills/google-search/scripts"

# Web search (default)
npx tsx $SCRIPT_DIR/google-search.ts search "query" [--num 10] [--time day|week|month|year] [--country us] [--lang en]

# Specialized
npx tsx $SCRIPT_DIR/google-search.ts news "query" [--num 10]
npx tsx $SCRIPT_DIR/google-search.ts images "query"
npx tsx $SCRIPT_DIR/google-search.ts videos "query"
npx tsx $SCRIPT_DIR/google-search.ts places "query"
npx tsx $SCRIPT_DIR/google-search.ts shopping "query"
npx tsx $SCRIPT_DIR/google-search.ts scholar "query" [--year 2023]
npx tsx $SCRIPT_DIR/google-search.ts patents "query"
npx tsx $SCRIPT_DIR/google-search.ts suggest "query"
npx tsx $SCRIPT_DIR/google-search.ts credits

The same unpinned invocation pattern appears throughout the README, for example:

bash
npx tsx scripts/google-search.ts search "openclaw ai agent"
npx tsx scripts/google-search.ts news "AI regulation" --num 10
npx tsx scripts/google-search.ts credits

The project does not declare tsx in package.json, and no dependency lockfile is present. The README also states that the project has “zero dependencies,” despite requiring tsx to execute its TypeScript source.

Technical Analysis

npx tsx executes the package version resolved by npm at invocation time. If tsx is unavailable locally or in the package cache, npx may retrieve it from the configured npm registry before executing it. Because neither an exact version nor a lockfile integrity record is provided, the effective executable dependency can change after this Skill has been reviewed.

This creates a supply-chain trust boundary outside the audited project. A compromised future package release ...[truncated 2097 chars]

Remediation
View remediation

Remediation Suggestions

  1. Declare tsx as a project dependency or development dependency using an exact reviewed version rather than a floating range.
  2. Generate and commit a package lockfile containing resolved versions and integrity hashes.
  3. Install dependencies during a controlled installation or build phase, rather than allowing npx to retrieve executable code when each search runs.
  4. Invoke the locked project-local binary, such as through a package script, and configure execution so that missing local packages cause failure instead of network retrieval.
  5. Prefer compiling the TypeScript files into reviewed JavaScript during release and executing them directly with Node.js. This removes the runtime TypeScript loader from the Skill's normal execution path.
  6. Update the README and SKILL.md commands to use the hardened invocation method and remove or correct the “zero dependencies” claim.
  7. In controlled environments, restrict npm registry configuration to an approved registry and verify dependency provenance and integrity during installation.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (27)

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

If the implementation supports an undeclared account capability while the description only advertises search features, reviewers and users may underestimate what data can be queried or exposed. Hidden or undocumented functionality increases the chance of misuse, especially if account or credit details can be fetched without being clearly disclosed in the manifest.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The README advertises Google search via Serper.dev but does not clearly warn that user queries and potentially sensitive prompts are transmitted to a third-party service. In an agent skill, users may submit proprietary, personal, or regulated data through search requests, so omission of this disclosure creates a real privacy and compliance risk.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill invokes a local script runner and requires both network access and an environment variable (SERPER_API_KEY), but the manifest does not explicitly declare tool scope or permissions. This weakens sandboxing and review because operators cannot easily see that the skill can access secrets and make outbound requests.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger language is broad enough that the skill may activate for many generic web-information requests, causing unnecessary external queries and possible disclosure of user prompts to a third-party API. Over-broad routing is especially relevant here because the skill sends search terms over the network and consumes an API-backed account resource.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Instructing the agent to use the skill for 'any Google search request' is overly permissive and can bypass more privacy-preserving or safer default tools. Because this skill performs outbound requests and may fetch richer data, broad invocation increases exposure of user input and raises the chance of unintended third-party data sharing.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

Using npx tsx without a pinned version allows execution to depend on whatever package version resolves at runtime, which can change unexpectedly or be replaced by a malicious upstream package. In a skill context, this creates a supply-chain execution risk whenever the command is run.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

Using npx tsx without a pinned version allows execution to depend on whatever package version resolves at runtime, which can change unexpectedly or be replaced by a malicious upstream package. In a skill context, this creates a supply-chain execution risk whenever the command is run.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

Using npx tsx without a pinned version allows execution to depend on whatever package version resolves at runtime, which can change unexpectedly or be replaced by a malicious upstream package. In a skill context, this creates a supply-chain execution risk whenever the command is run.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

Using npx tsx without a pinned version allows execution to depend on whatever package version resolves at runtime, which can change unexpectedly or be replaced by a malicious upstream package. In a skill context, this creates a supply-chain execution risk whenever the command is run.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

Using npx tsx without a pinned version allows execution to depend on whatever package version resolves at runtime, which can change unexpectedly or be replaced by a malicious upstream package. In a skill context, this creates a supply-chain execution risk whenever the command is run.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

Using npx tsx without a pinned version allows execution to depend on whatever package version resolves at runtime, which can change unexpectedly or be replaced by a malicious upstream package. In a skill context, this creates a supply-chain execution risk whenever the command is run.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

Using npx tsx without a pinned version allows execution to depend on whatever package version resolves at runtime, which can change unexpectedly or be replaced by a malicious upstream package. In a skill context, this creates a supply-chain execution risk whenever the command is run.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

Using npx tsx without a pinned version allows execution to depend on whatever package version resolves at runtime, which can change unexpectedly or be replaced by a malicious upstream package. In a skill context, this creates a supply-chain execution risk whenever the command is run.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

Using npx tsx without a pinned version allows execution to depend on whatever package version resolves at runtime, which can change unexpectedly or be replaced by a malicious upstream package. In a skill context, this creates a supply-chain execution risk whenever the command is run.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.env_credential_access

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/lib/serper.ts:4