Back to skill

Security audit

ClawFlight

Security checks for vulnerabilities and agentic risk

Overview

This flight-search skill mostly matches its stated purpose, but it needs review because it stores travel data and an API bearer token locally and uses flagged HTTP dependencies.

Review this skill before installing. It is not malicious based on the inspected artifacts, but users should know it uses Amadeus API credentials, stores an access token and travel-related records locally, returns affiliate-tagged booking links, and currently depends on scanner-flagged HTTP packages. Install only if you are comfortable with those behaviors, and prefer a version that documents token storage, adds deletion/retention controls, restricts cache file permissions, clarifies the Kiwi API-key text, and updates dependencies.

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
clawflight.js:46
Finding
OAuth Bearer Token Stored in a Plaintext File Without Restrictive Permissions<![CDATA[ ## Vulnerability Details **File Location**: `clawflight.js`, lines 46–76 **Vulnerability Type**: Plaintext sensitive-token storage with insufficient filesystem protection **Risk Level**: Medium ### Vulnerable Code ```js async function getAmadeusToken() { // Check cache first if (existsSync(TOKEN_CACHE_FILE)) { try { const cached = JSON.parse(readFileSync(TOKEN_CACHE_FILE, 'utf-8')); if (cached.expires_at > Date.now() + 60000) { return cached.access_token; } } catch (e) { /* ignore */ } } // Fetch new token const response = await axios.post( `${AMADEUS_BASE_URL}/v1/security/oauth2/token`, new URLSearchParams({ grant_type: 'client_credentials', client_id: AMADEUS_CLIENT_ID, client_secret: AMADEUS_CLIENT_SECRET, }), { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } } ); const token = { access_token: response.data.access_token, expires_at: Date.now() + (response.data.expires_in * 1000), }; writeFileSync(TOKEN_CACHE_FILE, JSON.stringify(token)); return token.access_token; } ``` The cache path is defined at line 27: ```js const TOKEN_CACHE_FILE = join(PROJECT_ROOT, 'data', '.amadeus-token.json'); ``` ### Technical Analysis After obtaining an OAuth access token from the fixed, official Amadeus HTTPS endpoint, the application stores the bearer token as plaintext JSON in the project-level `data` directory. The call to `writeFileSync` does not specify a restrictive file mode. For a newly created file, effective permissions therefore depend on the process umask and surrounding directory permissions. In a shared or incorrectly configured environment, other local accounts or processes may be able to read the token. A bearer token grants access based solely on possession. Any process that retrieves the cached value can replay it against the Amadeus API until it expires. Although caching reduces authentication requests, persistent token storag ...[truncated 2204 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Avoid persistent token caching when unnecessary.** Retain the access token only in process memory if the command lifecycle and API usage permit it. 2. **Use a private credential or cache location.** If persistence is required, use an operating-system credential store or a per-user cache directory instead of the project data directory. 3. **Enforce restrictive permissions.** Create the parent directory with mode `0700` and the cache file with mode `0600`, for example: ```js import { mkdirSync, writeFileSync } from 'fs'; mkdirSync(PRIVATE_CACHE_DIR, { recursive: true, mode: 0o700, }); writeFileSync(TOKEN_CACHE_FILE, JSON.stringify(token), { encoding: 'utf8', mode: 0o600, flag: 'w', }); ``` 4. **Harden replacement behavior.** Write to a securely created temporary file in the same private directory and atomically rename it into place. Reject symbolic links and verify that existing cache files are regular files owned by the current user before reading or replacing them. 5. **Correct existing permissions.** Do not assume that supplying `mode` will repair an already existing permissive file. Explicitly validate and, where appropriate, change existing file permissions to `0600`. 6. **Limit token exposure.** Never print the token in errors or logs, delete expired cache entries, and keep access-token lifetimes and API scopes as narrow as Amadeus supports. 7. **Protect repository and backup boundaries.** Add the cache file to ignore rules, document that it contains sensitive authentication material, and exclude it from source-control commits and broadly accessible backups. ]]>
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (15)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The declared purpose is flight search, but the documented behavior also stores flight details locally, collects user-submitted ratings, and supports follow-up nudges. That mismatch can cause users or orchestrators to invoke the skill without realizing it performs persistent data collection and retention, increasing privacy and consent risks beyond the expected search-only scope.

Known Vulnerable Dependency: axios==1.13.6 — 16 advisory(ies): CVE-2026-44494 (axios Vulnerable to Full Man-in-the-Middle via Prototype Pollution Gadget in `co); CVE-2026-44495 (axios Vulnerable to Credential Theft and Response Hijacking via Prototype Pollut); CVE-2025-62718 (Axios has a NO_PROXY Hostname Normalization Bypass that Leads to SSRF) +13 more

High
Category
Supply Chain
Confidence
94% confidence
Finding
The lockfile pins axios 1.13.6, and the supplied advisories include high-risk issues such as SSRF-related proxy bypass and prototype-pollution-based request/response compromise. In a flight-search skill that makes outbound HTTP requests and returns affiliate booking links, a compromised HTTP client can expose credentials, misroute requests, or let attacker-controlled endpoints influence network behavior.

Known Vulnerable Dependency: form-data==4.0.5 — 1 advisory(ies): CVE-2026-12143 (form-data: CRLF injection in form-data via unescaped multipart field names and f)

High
Category
Supply Chain
Confidence
82% confidence
Finding
form-data 4.0.5 is reported as vulnerable to CRLF injection through unescaped multipart field names and filenames. If this skill ever builds multipart requests using attacker-influenced values, an attacker may be able to alter request structure or inject unintended headers/content to upstream services.

Known Vulnerable Dependency: axios==1.13.6 — 16 advisory(ies): CVE-2026-44494 (axios Vulnerable to Full Man-in-the-Middle via Prototype Pollution Gadget in `co); CVE-2026-44495 (axios Vulnerable to Credential Theft and Response Hijacking via Prototype Pollut); CVE-2025-62718 (Axios has a NO_PROXY Hostname Normalization Bypass that Leads to SSRF) +13 more

High
Category
Supply Chain
Confidence
90% confidence
Finding
The dependency tree reportedly resolves axios to a version with multiple known advisories, including SSRF-related and prototype-pollution/MITM impact paths. This skill is flight-search oriented and likely performs outbound HTTP requests to airline, affiliate, or API endpoints, so a vulnerable HTTP client is especially relevant because it can expose requests, credentials, or internal network access if attacker-controlled inputs reach request configuration.

Lp3

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding
The skill documents use of environment variables for API credentials but does not declare any tool scope or permission boundaries. In an agent ecosystem, undeclared env access can lead to overbroad secret exposure and makes it harder for the host to enforce least privilege or for users to understand what sensitive data the skill may access.

Description-Behavior Mismatch

Medium
Confidence
92% confidence
Finding
The manifest emphasizes Starlink-only flight filtering, while the body reveals additional stateful features that save flight data and collect ratings for later use. This incomplete disclosure is dangerous because users may share travel details assuming a one-shot lookup, not realizing the information may be retained and used for future prompts.

Intent-Code Divergence

Medium
Confidence
98% confidence
Finding
The setup text first claims no other API key is required, then later instructs users to obtain and configure a Kiwi API key. Inconsistent security-relevant setup guidance can mislead users about external data sharing and credential exposure, causing them to provision additional secrets without clear expectations about when those secrets are used.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The save workflow stores flight details locally and schedules later prompts, but the description does not clearly warn users about this persistence and follow-up behavior at the point of use. Travel itineraries are sensitive personal data, so silent or poorly disclosed storage creates meaningful privacy risk even if the data remains local.

Vague Triggers

Medium
Confidence
94% confidence
Finding
The invocation guidance is broad enough to activate this specialized skill on generic flight-search requests. Because the skill prioritizes Starlink-equipped airlines and includes affiliate-linked booking behavior, overbroad triggering can bias results, steer users commercially, and invoke data-handling features in situations where a neutral flight search was expected.

Description-Behavior Mismatch

Medium
Confidence
94% confidence
Finding
The manifest describes a flight-search skill that filters and ranks Starlink-equipped flights and returns booking links. In addition to that search behavior, the code implements separate `save` and `rate` commands that store flight history and user-submitted ratings on disk, expanding the skill into local data collection and persistence beyond the stated search purpose.

Context-Inappropriate Capability

Low
Confidence
79% confidence
Finding
The manifest frames the skill as a flight finder focused on Starlink WiFi, filtering and ranking results for users. While network access to a flight API is expected for that purpose, direct dependency on environment-stored credentials is an additional privileged capability not disclosed in the manifest description.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
The skill formats dates and times using toLocaleDateString('en-US') and toLocaleTimeString('en-US'), which hard-codes a specific locale for all users. This is a natural-language/locale policy concern because users are not offered any language or locale choice, and the constraint is not documented as region-specific or necessary.

Known Vulnerable Dependency: follow-redirects==1.15.11 — 1 advisory(ies): CVE-2026-40895 (follow-redirects leaks Custom Authentication Headers to Cross-Domain Redirect Ta)

Low
Category
Supply Chain
Confidence
87% confidence
Finding
follow-redirects 1.15.11 is flagged for leaking custom authentication headers across cross-domain redirects. Because this skill likely consumes third-party flight APIs over HTTP, redirect-based header leakage could expose API keys or bearer tokens to an attacker-controlled domain if a redirect chain is abused.

Unpinned Dependencies

Low
Category
Supply Chain
Content
"author": "Antoine & Samantha",
  "license": "MIT",
  "dependencies": {
    "axios": "^1.6.0",
    "commander": "^11.1.0"
  }
}
Confidence
40% confidence
Finding
Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Unpinned Dependencies

Low
Category
Supply Chain
Content
"license": "MIT",
  "dependencies": {
    "axios": "^1.6.0",
    "commander": "^11.1.0"
  }
}
Confidence
40% confidence
Finding
Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Static analysis

Detected: suspicious.env_credential_access, suspicious.exposed_secret_literal, suspicious.potential_exfiltration

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
clawflight.js:31

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
clawflight.js:64

Sensitive-looking file read is paired with a network send.

Warn
Code
suspicious.potential_exfiltration
Location
clawflight.js:51