Back to skill

Security audit

SerpApi Flights (Google Flights)

Security checks for vulnerabilities and agentic risk

Overview

This is a straightforward flight-search helper that uses Node and a SerpApi key to query Google Flights, with no hidden persistence or unrelated data access found.

Install only if you are comfortable providing a SerpApi key and using SerpApi/Google Flights for flight searches. Expect queries to consume SerpApi quota and note that default output is Chinese-oriented unless options such as --lang and --currency are changed.

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
  • 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 (3)

Lp3

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding
The skill invokes Node.js and requires both an environment secret (SERPAPI_KEY) and outbound network access, but it does not declare an explicit tool/permission scope such as allowed-tools or permissions. This creates a governance gap: a host may expose broader execution or network capabilities than users expect, making secret use and external requests insufficiently constrained or auditable.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The CLI sets `lang` to `zh-CN` by default, which forces a specific locale unless the user explicitly overrides it. This is a natural-language policy concern because the script imposes a language choice rather than offering a neutral default or requiring opt-in.

Natural-Language Policy Violations

Low
Confidence
83% confidence
Finding
The description explicitly says to use the skill for flight queries including Chinese terms like '机票/航班', and the document later centers Chinese city names and Chinese output labels. Because the file does not state that language choice is optional or user-driven, it risks violating language/locale policy by assuming Chinese usage without opt-in.

Static analysis

Detected: suspicious.env_credential_access

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/query.mjs:11