Back to skill

Security audit

SerpAPI

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed SerpAPI search helper whose network use, API key requirement, and optional location configuration fit its stated purpose.

Install this only if you are comfortable sending search terms, selected engine parameters, and any explicit or configured default location to SerpAPI. Do not use it for sensitive internal queries or private addresses unless that disclosure is acceptable, and keep SERPAPI_API_KEY scoped to this service.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (6)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/serp.py (reported line 62)May include surrounding context.

python
def get_api_key() -> str:
    """Get API key from environment."""
    key = os.environ.get("SERPAPI_API_KEY")
    if not key:
        print("Error: SERPAPI_API_KEY environment variable not set", file=sys.stderr)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill advertises capabilities that include environment-variable access, file reads, and network use, but it does not declare an explicit tool scope such as permissions or allowed-tools. That makes the runtime trust boundary unclear and increases the risk of over-privileged execution, especially for a skill that sends user-supplied queries to an external API and may read workspace configuration like TOOLS.md.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The description is broad enough to match many ordinary search-related prompts, which can cause the skill to trigger in contexts where users did not intend third-party API usage. In practice, that can lead to unnecessary transmission of user queries, including potentially sensitive search terms or location-related requests, to an external service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The setup and usage text encourages passing search queries and location values to SerpAPI but does not clearly warn that this data is sent to a third-party service. Because the skill supports local searches and explicit location parameters, users may unknowingly disclose sensitive interests, addresses, or geolocation-related information externally.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill reads local workspace files (including a path influenced by the CLAWDBOT_WORKSPACE environment variable) to infer a default location, which exceeds the minimal capability needed to perform a search query. This can expose contextual data from local files to the tool and then onward to the external SerpAPI service when used as a fallback, creating unnecessary data access and potential privacy leakage.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The code sends the user query and optional location directly to SerpAPI over the network without any runtime notice, consent prompt, or clear indication in output that third-party transmission is occurring. In an agent setting, users may reasonably assume local processing, so this creates a privacy risk, especially for sensitive searches or inferred location data.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.