Back to skill

Security audit

目的地 PK 台

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent travel-comparison purpose, but it asks users to install mutable command-line software globally, suggests sudo and TLS-bypass workarounds, and reads or stores travel-profile data persistently.

Review before installing. Do not run the sudo install path, do not disable TLS certificate checks, and prefer a pinned, verified, unprivileged CLI installation. Expect the skill to read existing travel preferences and possibly save a local or memory-based profile only after confirmation; check or delete ~/.flyai/user-profile.md if you do not want persistent travel-profile data.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (4)

T08 · Insecure Dependencies

Error
Location
reference/core-workflow.md:3
Finding

Mandatory Installation and Execution of an Unpinned Third-Party Package

Content
View full analysis

Vulnerability Details

File Location: reference/core-workflow.md:3-12; related package identity inconsistency at reference/tools.md:26-34
Vulnerability Type: Supply-chain exposure through mutable dependency installation
Risk Level: High

Vulnerable Code:

markdown
### Prerequisite: Install/Upgrade FlyAI CLI

Before executing any search, the installation command must be executed first, regardless of whether the package is already installed, to ensure the latest version:

```bash
npm install -g @fly-ai/flyai-cli@latest --registry=https://registry.npmjs.org

After installation, verify it:

bash
flyai --help
text

The related tool documentation identifies a different package:

```markdown
## FlyAI Core Capabilities

Use `npx @anthropic-ai/flyai-cli@latest` to access travel data.

Technical Analysis

The workflow mandates installation and execution of the mutable latest version of a third-party npm package. Because latest can resolve to different code after the Skill has been audited, the effective executable payload is not fixed by the reviewed artifact.

npm installation may execute package lifecycle scripts, including preinstall, install, and postinstall. A compromised package release, maintainer account, registry response, or package name could therefore introduce arbitrary local code execution.

The project also identifies the CLI using two different package names: @fly-ai/flyai-cli and @anthropic-ai/flyai-cli. This inconsistency increases the likelihood that an unintended or spoofed package will be installed or executed.

Attack Path

  1. An attacker compromises the referenced npm package, its publisher account, or the package resolution process.
  2. The attacker publishes a malicious version and assigns it to the latest tag.
  3. A user activates the Skill and initiates a travel search.
  4. The mandatory prerequisite runs `npm install -g ...@late ...[truncated 820 chars]
Remediation
View remediation

Remediation Suggestions

  1. Select and document one verified package identity; resolve the discrepancy between @fly-ai/flyai-cli and @anthropic-ai/flyai-cli.
  2. Pin an exact audited version rather than using @latest.
  3. Lock and verify the package integrity hash through a lockfile or equivalent trusted manifest.
  4. Do not automatically install or upgrade the package when the Skill is invoked.
  5. Require explicit informed user approval before installing any executable dependency.
  6. Prefer a project-local installation in an isolated environment rather than a global package.
  7. Review package contents and lifecycle scripts before approving upgrades.
  8. Where practical, disable npm lifecycle scripts and execute the CLI inside a restricted container or sandbox.

T05 · Unauthorized Access and Privilege Escalation

Error
Location
reference/core-workflow.md:18
Finding

Privilege Escalation Through Recommended Root-Level npm Installation

Content
View full analysis

Vulnerability Details

File Location: reference/core-workflow.md:18-21
Vulnerability Type: Unnecessary privileged execution of third-party installation code
Risk Level: Critical

Vulnerable Code:

markdown
**Installation failure handling:**

| Condition | Handling |
|-----|---------|
| npm is not installed | Ask the user to install Node.js (https://nodejs.org/) |
| Insufficient permissions | Recommend `sudo npm install -g @fly-ai/flyai-cli@latest --registry=https://registry.npmjs.org` or use nvm to manage Node |
| Network issue | Ask the user to check the network or use the mirror `npm config set registry https://registry.npmmirror.com` |

Technical Analysis

The workflow recommends using sudo when global npm installation fails because of insufficient permissions. Destination comparison does not legitimately require root access, so granting root privileges violates least privilege.

The command combines elevated execution with a mutable third-party package. npm package lifecycle scripts can execute during installation, meaning code that has not been pinned or audited may run as root. The recommendation treats a security boundary as an installation inconvenience rather than failing safely or selecting a user-scoped deployment method.

Attack Path

  1. A user initiates the Skill and reaches the mandatory CLI installation step.
  2. Global installation fails due to permissions on the npm prefix.
  3. The Skill recommends rerunning the installation through sudo.
  4. The user authorizes the command with administrator credentials.
  5. npm retrieves the mutable latest package version.
  6. A malicious package payload or lifecycle script executes with root privileges.
  7. The payload modifies protected system files, installs persistent components, creates privileged accounts, or accesses root-readable data.

Impact Assessment

Exploitation can result in full host compromise with root pr ...[truncated 353 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the sudo npm install recommendation entirely.
  2. Install the CLI as a project-local, exact-version dependency under an unprivileged account.
  3. Use a user-scoped Node version manager or configure a user-owned npm prefix without weakening filesystem permissions.
  4. Run the CLI in an isolated container or sandbox with only the filesystem and network access required for travel searches.
  5. Refuse to continue if installation requires elevated privileges.
  6. Require explicit approval for dependency installation and clearly disclose the package identity, version, publisher, and requested privileges.
  7. Audit lifecycle scripts and package contents before deployment.

T09 · Insecure Skill Coding Practices

Error
Location
reference/core-workflow.md:102
Finding

TLS Certificate Verification Disabled for Flight Search

Content
View full analysis

Vulnerability Details

File Location: reference/core-workflow.md:102-109
Vulnerability Type: Insecure TLS configuration enabling man-in-the-middle attacks
Risk Level: High

Vulnerable Code:

markdown
```bash
/flyai search-flight --origin "{departure city}" --destination "{destination}" --dep-date {departure date} --back-date {return date} --sort-type 3

If the terminal command encounters UNABLE_TO_GET_ISSUER_CERT_LOCALLY, add the following environment variable before the command:

bash
NODE_TLS_REJECT_UNAUTHORIZED=0 flyai search-flight ...
text

### Technical Analysis

`NODE_TLS_REJECT_UNAUTHORIZED=0` disables TLS server-certificate verification for Node.js connections created by the command. Encryption without certificate authentication does not establish that the client is communicating with the intended service.

This workaround converts a certificate-chain or trust-store error into a fail-open network configuration. An attacker able to control or observe the network can present an arbitrary certificate, intercept requests, inspect submitted travel criteria, and modify returned flight data.

If the FlyAI CLI sends authentication tokens, session identifiers, or other credentials over the affected connection, those values may also become accessible to the intermediary. The reviewed documentation does not establish whether such credentials are present, but disabling certificate validation removes the protection that would normally prevent their interception.

### Attack Path

1. A user runs a flight search and receives a certificate validation error.
2. Following the Skill instructions, the user reruns the command with `NODE_TLS_REJECT_UNAUTHORIZED=0`.
3. An attacker on the local network, a compromised proxy, or a malicious DNS/network component redirects or intercepts the connection.
4. The attacker presents a self-signed or otherwise untrusted certificate.
5. The Node.js client ac
...[truncated 728 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove all instructions that set NODE_TLS_REJECT_UNAUTHORIZED=0.
  2. Fail closed when certificate validation fails.
  3. Correct the host trust store, install the appropriate CA certificate, or repair an incomplete server certificate chain.
  4. For managed proxy environments, install the organization's trusted CA through documented, narrowly scoped configuration.
  5. Do not suppress hostname validation or certificate-expiration checks.
  6. Add clear diagnostics identifying the target host and certificate-chain problem without exposing secrets.
  7. Consider certificate or public-key pinning where operationally appropriate.

T09 · Insecure Skill Coding Practices

Error
Location
reference/core-workflow.md:102
Finding

Shell Command Injection Through Unsanitized Travel Parameters

Content
View full analysis

Vulnerability Details

File Location: reference/core-workflow.md:102-129; duplicate command templates at SKILL.md:65-80
Vulnerability Type: Shell command injection
Risk Level: Critical

Vulnerable Code:

bash
/flyai search-flight --origin "{departure city}" --destination "{destination}" --dep-date {departure date} --back-date {return date} --sort-type 3
bash
/flyai search-hotel --dest-name "{destination}" --check-in-date {check-in date} --check-out-date {check-out date} --sort rate_desc
bash
/flyai search-poi --city-name "{destination city}"

Additional templates in SKILL.md include:

bash
/flyai search-flight --origin "{departure city}" --destination "{destination}" --dep-date {departure date} --back-date {return date}
bash
/flyai search-hotel --dest-name "{destination}" --check-in-date {check-in date} --check-out-date {check-out date} --hotel-stars "4,5" --sort rate_desc
bash
/flyai search-poi --city-name "{destination city}" --poi-level 5
bash
/flyai keyword-search --query "{destination} visa"

Technical Analysis

Values collected from the user are directly interpolated into shell-style command templates. Some parameters are enclosed in double quotes, but double quotes do not neutralize all shell interpretation. Command substitution using $() or backticks remains active inside double quotes, and an embedded quotation mark can terminate the intended argument and introduce shell operators.

Dates are also inserted without quoting or documented validation. If the Agent renders these templates into commands executed through a shell, crafted input can alter command structure and execute additional commands.

For example, a destination containing a command-substitution expression could remain syntactically valid inside a quoted argument while causing the shell to execute the embedded command before invoking FlyAI.

At

...[truncated 1312 chars]

Remediation
View remediation

Remediation Suggestions

  1. Never construct shell command strings by interpolating user-controlled values.
  2. Invoke the CLI through a process API that accepts an executable and a separate argument array, with shell execution explicitly disabled.
  3. Validate dates using a strict YYYY-MM-DD parser and reject malformed or out-of-range values.
  4. Validate city and destination fields against expected Unicode letters, spaces, hyphens, and a trusted destination database.
  5. Reject control characters, quotation marks, backticks, dollar-sign substitutions, shell separators, redirection operators, and newline characters.
  6. Treat escaping as defense in depth rather than the primary control; structured argument invocation should be mandatory.
  7. Run the CLI under a dedicated unprivileged account with restricted filesystem and network permissions.
  8. Add tests covering malicious inputs containing $(), backticks, embedded quotes, semicolons, pipes, redirections, and newlines.
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
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
Findings (25)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The workflow explicitly instructs users/operators to set NODE_TLS_REJECT_UNAUTHORIZED=0 to bypass TLS certificate validation for CLI network requests. This disables server identity verification and enables man-in-the-middle interception or tampering of flight-search traffic, which is especially risky because the skill depends on live remote data.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The instructions recommend bypassing certificate verification without a strong safety warning or constrained emergency procedure. That normalizes an insecure practice and can cause operators to ignore active TLS failures, exposing query contents and results to interception, spoofing, or manipulation.

Content

No source excerpt is available for this finding.

Ssd 1

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Telling users to disable TLS certificate validation to make CLI queries succeed creates an unsafe operational default. In a travel-comparison skill that relies on externally fetched pricing and availability data, an attacker on the network path could modify or forge results, misleading users and potentially redirecting them to malicious infrastructure.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The referenced file documents a train-search capability, while the skill manifest describes a destination-comparison assistant. This mismatch can cause the agent to invoke an unrelated tool or expose functionality outside the user’s expected scope, creating a tool-confusion / scope-bypass issue that may lead to unintended actions or misleading results. In this context, the inconsistency increases risk because routing decisions are triggered by broad travel-comparison prompts, but the backing reference only supports rail search semantics.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The activation cues listed in the metadata and description are broad natural-language phrases like “选哪个目的地”, “XX还是XX”, and “PK”, which can easily appear in ordinary travel conversation without the user intending to invoke this skill. That can cause unintended execution, leading the agent to ask for additional trip details or access profile data when a general response would have been more appropriate.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill instructs the agent to read user history at startup via memory search or a local profile file, but the markdown does not require a clear user-facing notice or consent step before accessing that data. Because this happens automatically on activation, an unintended trigger or ordinary use could expose or rely on personal preference data without the user's awareness, increasing privacy risk.

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 narrowly scoped assistant for comparing 2-3 candidate destinations and generating destination comparison cards. This file instead documents a generic 'ai-search' interface supporting hotels, attractions, flights, trains, mixed travel intent, and itinerary/hotel recommendation queries, which goes beyond destination comparison and suggests broader travel search behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

All prompts, options, and output templates are written as mandatory Chinese interactions, with no indication that users may choose another language. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation unless clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
87% confidence
Finding

The documentation suggests using sudo npm install -g to install a package globally. Running package installation as root increases the blast radius of any compromised package, malicious post-install script, typosquatted dependency, or registry-supply-chain event, because arbitrary code would execute with elevated privileges.

Content

Scanner excerpt · reference/core-workflow.md (reported line 20)May include surrounding context.

md
| 情况 | 处理方式 |
|-----|---------|
| npm 未安装 | 提示用户先安装 Node.js (https://nodejs.org/) |
| 权限不足 | 建议使用 `sudo npm install -g @fly-ai/flyai-cli@latest --registry=https://registry.npmjs.org` 或使用 nvm 管理 Node |
| 网络问题 | 建议用户检查网络或使用国内镜像 `npm config set registry https://registry.npmmirror.com` |

**注意:** 此步骤只在首次使用时执行,后续调用会直接跳过已安装的情况。

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
99% confidence
Finding

NODE_TLS_REJECT_UNAUTHORIZED=0 globally disables TLS certificate checks for the invoked Node process, making HTTPS connections accept invalid or forged certificates. In this skill context, that weakens the integrity and confidentiality of remote search requests and responses and can silently turn transient certificate errors into exploitable insecure behavior.

Content

Scanner excerpt · reference/core-workflow.md (reported line 107)May include surrounding context.

md
> **⚠️ SSL 证书问题**:如果通过终端执行 flyai CLI 命令时遇到 `UNABLE_TO_GET_ISSUER_CERT_LOCALLY` 错误,需要在命令前加上环境变量:
> ```bash
> NODE_TLS_REJECT_UNAUTHORIZED=0 flyai search-flight ...
> ```

**提取信息**:

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown example is entirely written as Chinese user/assistant interaction and presents the skill's output format in Chinese only. Because there is no indication that the skill is region-specific or that users can opt into another language, it suggests a fixed language behavior that may violate language/locale policy.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The file presents all user-facing instructions and examples exclusively in Chinese, which can amount to a language policy violation when no user opt-in or alternative language is offered. The documented tool behavior does not state that the skill is intentionally region- or locale-specific, so the language restriction appears implicit rather than justified.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

The documentation instructs use of npx @anthropic-ai/flyai-cli@latest, which pulls and executes the newest published package version at runtime instead of a vetted, fixed release. This creates a supply-chain risk: if the package or one of its dependencies is compromised, users of the skill may execute attacker-controlled code when invoking the tool.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
79% confidence
Finding

The file is entirely written as a Chinese-only specification and includes fixed Chinese strings for prompts and stored content, such as the confirmation UI text and profile field names. There is no indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking context for compliance or regional reasons.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The document defines cross-session storage and reuse of detailed traveler profile data for a destination-comparison skill whose stated purpose is only to compare candidate destinations. This expands data collection and retention beyond the skill’s declared need, creating unnecessary privacy exposure and increasing the blast radius if memory or local files are accessed by other tools or sessions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The document instructs reading and storing detailed travel-profile information in memory or local files without any privacy notice, sensitivity classification, consent language, retention limit, or deletion guidance. That omission makes inappropriate collection and persistence more likely and leaves users unaware that personal data such as family composition and travel history may be retained across sessions.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The Qoder Memory write path creates or updates long-term user preference records unrelated to a one-shot destination PK workflow. Cross-session memory of personal preferences can be unintentionally reused in later contexts, exposing personal data and enabling profiling beyond the user’s immediate request.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file-mode guidance instructs the agent to store a detailed travel profile, including city, airport, budget, family composition, travel history, and special needs, in ~/.flyai/user-profile.md. Persisting this sensitive profile on the local filesystem is risky because it may be readable by other local processes, future skills, or users on the same machine, and it is not clearly necessary for destination comparison.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% confidence
Finding

Creating ~/.flyai and storing profile data there introduces session persistence on the host filesystem, allowing user data to survive beyond the current interaction. In the context of a simple destination-comparison assistant, this persistence is not clearly necessary and increases privacy and cross-context data-leak risk.

Content

Scanner excerpt · reference/user-profile-storage.md (reported line 73)May include surrounding context.

如果 ~/.flyai/ 目录不存在,需要先创建:

bash
mkdir -p ~/.flyai

文件格式

Ssd 3

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The template explicitly instructs the skill to save and later reuse personal profile data after user confirmation, including residence, budget, family traits, and other travel preferences. Even with confirmation, this creates durable personal-data handling behavior that exceeds the core comparison task and can expose sensitive information across future sessions or skills.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The workflow first states that the install/upgrade command must be executed before any search regardless of current installation status, implying every run should reinstall or upgrade. Later it claims this step is only for first use and will be skipped subsequently, which directly contradicts the earlier instruction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown skill reference uses Chinese city names and Chinese-language output fields/examples, but does not state that the skill is China-specific or offer any language/locale choice. Under the policy, forcing a specific language or locale without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The parameter documentation requires specific Chinese terms such as 酒店, 民宿, 客栈, 大床房, 双床房, and 多床房 as accepted values. This imposes a locale-specific input requirement, but the file does not state that the skill is intentionally China/Chinese-market specific or offer an alternative language choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The file specifies parameter values and examples in Chinese, such as bed-type values and destination/hotel names, but does not indicate that the skill is China-specific or offer an alternative language/locale. This can conflict with a policy requiring user language or locale choice unless the locale restriction is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The parameter examples and allowed category values are presented entirely in Chinese, which can impose a specific language/locale expectation on users. The file does not state that the skill is region-specific or provide an explicit language choice, so this may conflict with a policy requiring user opt-in for locale constraints.

Content

No source excerpt is available for this finding.