Back to skill

Security audit

Google SERP Local Search API

Security checks for vulnerabilities and agentic risk

Overview

This is a narrow Just Serp API wrapper for Google local search, with a credential-handling weakness users should understand before running it.

Install only if you are comfortable giving the skill a Just Serp API key and making outbound requests to api.justserpapi.com. Prefer a version that reads JUST_SERP_API_KEY directly from the environment instead of passing it through --api-key, and avoid running it where process command lines are logged or visible to other users.

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:49
Finding

API Key Exposed Through Process Command-Line Arguments

Content
View full analysis
"}' ``` ```javascript if (!args.apiKey) { fail("Missing required --api-key argument."); } ``` ```javascript function parseArgs(argv) { const parsed = { apiKey: null, operation: null, paramsJson: "{}" }; for (let index = 0; index < argv.length; index += 1) { const flag = argv[index]; const value = argv[index + 1]; if (flag === "--operation") { parsed.operation = value; index += 1; continue; } if (flag === "--params-json") { parsed.paramsJson = value; index += 1; continue; } if (flag === "--api-key") { parsed.apiKey = value; index += 1; continue; } fail(`Unknown argument "${flag}".`); } return parsed; } ``` ### Technical Analysis The documented invocation expands `JUST_SERP_API_KEY` into the process argument vector through the `--api-key` option. The executable requires and parses this command-line value rather than reading the credential directly from the environment. Depending on operating-system permissions and deployment configuration, process command lines can be exposed through process inspection facilities, monitoring agents, audit records, debugging tools, job metadata, shell tracing, or command-execution logs. Consequently, a secret that was initially protected as an environment variable may become visible outside the Node.js process. The API request itself uses HTTPS and sends the credential in the `X-API-Key` header. The issue is therefore local credential handling before the network request, not plaintext transmission to the API server. ### Attack Path 1. A user follows the do ...[truncated 1235 chars]
Remediation
View remediation
"}' ``` If the environment is already configured, the assignment should be omitted entirely: ```bash node {baseDir}/bin/run.mjs \ --operation "localSearch" \ --params-json '{"query":""}' ``` 5. If environment variables are unsuitable, accept the secret through a protected standard-input or file-descriptor mechanism rather than through `argv`. 6. Ensure command tracing and debug logging do not record credentials. Rotate the existing API key if it may previously have appeared in process telemetry, shell traces, job logs, or monitoring records. ]]>
Vulnerability Patterns
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (1)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill instructs use of a network-capable helper (node .../bin/run.mjs) against an external API, but it does not declare any explicit tool scope such as permissions or allowed-tools. This creates a policy/containment gap where an agent may be able to make outbound requests without a clearly declared capability boundary, reducing auditability and increasing the risk of unintended or overbroad network access.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.