Back to skill

Security audit

flight-pickup-tracker

Security checks for vulnerabilities and agentic risk

Overview

The skill is purpose-aligned for flight pickup tracking, but its shipped files do not match the promised workflow and it handles API keys in ways that can expose them.

Review before installing. Only use this with explicit address confirmation, restricted API keys, and visible/cancellable scheduled checks. Expect that the current package may not actually perform the promised drive-time leave-by calculation without additional missing code, and avoid passing API keys through command-line arguments when possible.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:85
Finding

Google Maps API Key Exposed Through Process Command-Line Arguments

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 85–89
Vulnerability Type: Secret exposure through command-line arguments
Risk Level: Medium

Vulnerable Code

bash
python3 scripts/drive_time.py \
  --origin "<your address>" \
  --dest "Seattle-Tacoma International Airport" \
  --api-key "$(cat scripts/data/google_maps_api_key.txt)" \
  --json

Technical Analysis

The documented command reads the Google Maps API key from a local file and expands it directly into the spawned process's argument list. Although the key is stored in a file initially, shell substitution causes its plaintext value to appear in argv.

Depending on operating-system permissions and monitoring configuration, command-line arguments may be observable through process inspection interfaces such as /proc, process-management utilities, audit logs, crash reports, job schedulers, or endpoint-monitoring software. This exposes the credential more broadly than required for the declared drive-time functionality.

The behavior does not grant operating-system privileges directly. It may, however, disclose the Google Maps credential and grant an attacker the API access, quota, and billing capabilities assigned to that key.

Attack Path

  1. A user or scheduled agent invokes the documented drive-time command.
  2. The shell reads scripts/data/google_maps_api_key.txt and inserts the key into the --api-key argument.
  3. A local process, monitoring agent, or user with sufficient process-inspection access observes the command line while the process is active or retrieves it from retained diagnostic logs.
  4. The observer extracts the plaintext API key.
  5. The observer submits requests to Google APIs permitted by the key.
  6. If the key lacks API, application, quota, or billing restrictions, the attacker consumes quota, incurs charges, or accesses other services enabled for the same key.

Impact Assessment

Explo ...[truncated 441 chars]

Remediation
View remediation

Remediation Suggestions

  • Do not pass API keys through command-line arguments.
  • Modify the drive-time implementation to read the credential internally from a permission-restricted file or a dedicated secret manager.
  • If environment-variable delivery is necessary, ensure the execution environment does not expose environment values to unauthorized processes or logs.
  • Set the key file permissions to allow access only to the account running the Skill.
  • Restrict the Google API key to the specific APIs required by the Skill.
  • Apply supported application restrictions, conservative quotas, billing alerts, and usage monitoring.
  • Ensure schedulers, error reports, and audit systems redact secret values.
  • Rotate the key if it has previously appeared in process or scheduler logs.

T09 · Insecure Skill Coding Practices

Warning
Location
flight_tracker.py:116
Finding

AirLabs API Key Included in URL Query String

Content
View full analysis

Vulnerability Details

File Location: flight_tracker.py, lines 116–120
Vulnerability Type: Secret exposure through URL query parameters
Risk Level: Medium

Vulnerable Code

python
def get_flight_airlabs(api_key, flight_iata):
    """Query AirLabs (needs key). Returns normalized flight dict."""
    url = f"{AIRLABS_BASE}/flights?flight_iata={flight_iata}&api_key={api_key}"
    try:
        req = Request(url, headers={"User-Agent": "OpenClaw-FlightTracker/1.0"})

Technical Analysis

The optional AirLabs credential is interpolated into the request URL as the api_key query parameter. HTTPS protects the URL path and query while transmitted between the client and TLS endpoint, but it does not prevent the complete URL from being recorded at either endpoint or by trusted intermediary infrastructure.

URLs can be retained in application diagnostics, exception telemetry, debugging proxies, network-monitoring products, reverse-proxy logs, and provider access logs. Query strings are commonly logged by default, making them an unsafe location for reusable credentials.

The external request itself is consistent with the Skill's declared fallback flight-tracking functionality: it targets the documented AirLabs HTTPS endpoint and transmits the requested flight code. No unrelated local or user data is sent. The security issue is specifically the credential's placement in the URL.

Attack Path

  1. OpenSky fails to return flight information and an AIRLABS_API_KEY or --api-key value is configured.
  2. The fallback constructs an AirLabs URL containing the plaintext key in its query string.
  3. A diagnostic system, local proxy, monitoring product, or AirLabs-side access log records the complete URL.
  4. An attacker or unauthorized operator obtains read access to the retained logs.
  5. The attacker extracts the value of the api_key parameter.
  6. The attacker reuses the credential to issue AirLabs API ...[truncated 532 chars]
Remediation
View remediation

Remediation Suggestions

  • Use an authorization header or another non-URL credential mechanism if supported by AirLabs.
  • If AirLabs requires a query-string key, configure all client diagnostics, proxies, monitoring systems, and server-side logs under the operator's control to redact api_key.
  • Avoid including the complete request URL in exceptions or user-visible error messages.
  • Restrict the key's permissions and quota to the minimum required for flight lookups.
  • Add usage alerts and investigate anomalous request volume.
  • Rotate any key that may already have been retained in logs.
  • Keep the credential out of source control and command-line arguments; load it through a protected secret-delivery mechanism.
Vulnerability Patterns
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The code substantially matches the flight-tracking portion of the description: it monitors a flight, estimates distance and ETA, and emits events for approaching/landed states. However, it does not implement the key user-facing behavior of notifying when to leave for airport pickup. There is no logic involving the travel time from the user's location to the airport, no pickup scheduling calculation, and no actual 'leave now' decision. Additionally, the declared permissions are empty, while the code makes outbound network requests to OpenSky and optionally AirLabs, which is an externally accessed resource not reflected in the declaration. Therefore, the description overstates a primary capability and omits network access behavior.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill clearly relies on network access to OpenSky and optionally Google Maps, and may access local key material from scripts/data/google_maps_api_key.txt, yet it declares no explicit tool scope or permissions. That creates a governance gap: an agent or reviewer cannot accurately understand what external access and sensitive resources the skill requires, increasing the chance of unintended data exposure or unauthorized execution.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest describes a skill that notifies when to leave for airport pickup based on distance to destination. In the implementation, the program tracks flight position relative to the airport and emits only "approaching" or "landed" events; it does not accept pickup location or travel time inputs, calculate ground travel time, or determine when the user should leave.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The top-level documentation describes an alerting behavior, which implies notifying a user when action is needed. The implementation merely prints JSON/status lines during polling and exits on certain phases; there is no notification channel, callback, or explicit alert mechanism beyond console output.

Content

No source excerpt is available for this finding.