Back to skill

Security audit

反向穷游

Security checks for vulnerabilities and agentic risk

Overview

This travel-planning skill is mostly purpose-aligned, but it asks agents to use unsafe network, install, and persistence practices that users should review before installing.

Install only if you are comfortable reviewing and changing the workflow first: keep TLS verification enabled, avoid sudo/global @latest package installs, use a verified pinned FlyAI CLI in an isolated environment, and make profile storage opt-in with a clear way to inspect and delete saved travel data.

Vulnerability Patterns
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
reference/workflow.md:94
Finding

Shell Command Injection Through User-Controlled Travel Parameters

Content
View full analysis

Vulnerability Details

File Location: reference/workflow.md:94-115
Vulnerability Type: Shell command injection
Risk Level: High

Vulnerable Code

bash
NODE_TLS_REJECT_UNAUTHORIZED=0 flyai keyword-search --query "[出发城市]出发 [天数]天 人均[预算/人数]以内 [偏好]"
bash
NODE_TLS_REJECT_UNAUTHORIZED=0 flyai search-flight \
  --origin "[出发城市]" --destination "[候选目的地]" \
  --dep-date [出发日期] --back-date [返回日期] \
  --sort-type 3
bash
NODE_TLS_REJECT_UNAUTHORIZED=0 flyai search-hotel \
  --dest-name "[目的地]" \
  --check-in-date [入住日期] --check-out-date [退房日期] \
  --max-price [预算/晚数/60%] --sort rate_desc
bash
NODE_TLS_REJECT_UNAUTHORIZED=0 flyai search-poi --city-name "[目的地]"

Technical Analysis

The workflow instructs the agent to place user-controlled values—including the departure city, destination, preferences, dates, and budget—directly into shell command templates.

Quoting a value with double quotes does not make arbitrary input safe in POSIX-compatible shells. Shell constructs such as $(command) and backtick command substitution remain active inside double quotes. Several unquoted placeholders, including dates and calculated price values, provide additional opportunities for shell metacharacter injection.

If the agent constructs a command string from these templates and executes it through a shell, an attacker can supply a crafted travel parameter that changes the command's behavior or executes an additional local command.

Attack Path

  1. An attacker provides a departure city, destination, or preference containing shell syntax, such as command substitution.
  2. The agent replaces a placeholder in one of the documented command templates without strict validation.
  3. The resulting string is passed to a shell.
  4. The shell evaluates the injected syntax before or while invoking the FlyAI CLI.
  5. The attacker's command executes with the same operating-system privile ...[truncated 690 chars]
Remediation
View remediation

Remediation Suggestions

  • Do not construct shell command strings using user-controlled values.
  • Invoke the CLI through a process API that accepts an executable and a separate argument array, with shell processing explicitly disabled.
  • Apply allowlist validation to city and destination fields, restricting values to expected Unicode letters, spaces, hyphens, and other explicitly supported characters.
  • Parse dates with a strict YYYY-MM-DD validator and reject malformed values.
  • Parse budget, duration, and price parameters as bounded numeric values rather than text.
  • Do not rely on double quotes or ad hoc escaping as the primary defense.
  • Run the CLI under a dedicated, unprivileged account with minimal filesystem and network access.
  • Add tests containing command substitutions, backticks, semicolons, newlines, redirections, and option-injection payloads.

T08 · Insecure Dependencies

Error
Location
reference/workflow.md:3
Finding

Mandatory Execution of Mutable and Inconsistently Named Third-Party Packages

Content
View full analysis

Vulnerability Details

File Location: reference/workflow.md:3-20; additional evidence at reference/tools.md:26-28
Vulnerability Type: Unsafe dependency installation and supply-chain exposure
Risk Level: High

Vulnerable Code

From reference/workflow.md:

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

The documented failure handling also recommends:

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

From reference/tools.md:

text
使用 `npx @anthropic-ai/flyai-cli@latest` 调用飞猪数据。

Technical Analysis

The workflow requires installation or upgrading before searches and selects the mutable latest release rather than a reviewed, immutable version. Global npm installation can execute package lifecycle scripts and place executable files into shared command paths.

The fallback recommendation uses sudo, meaning package installation scripts may execute with root privileges. This substantially increases the impact of a compromised package, registry account, transitive dependency, or malicious release.

The documentation also contains inconsistent package identities: @fly-ai/flyai-cli in the installation workflow and @anthropic-ai/flyai-cli in the tool reference. This inconsistency creates package-confusion risk and makes it unclear which publisher and package have been reviewed. The npx ...@latest form can download and immediately execute mutable remote package content.

Attack Path

  1. The agent follows the mandatory pre-search setup instruction.
  2. npm resolves the current latest version of the specified package, or the agent selects the inconsistent package name from the tool reference.
  3. A compromised, replaced, malicious, or unintended package is downloaded from the registry.
  4. npm lifecycle scripts or the package executable run locally.
  5. If t ...[truncated 831 chars]
Remediation
View remediation

Remediation Suggestions

  • Establish and document one verified official package identity.
  • Pin an exact reviewed package version rather than using latest.
  • Verify package provenance, publisher identity, signatures where supported, and integrity hashes.
  • Use a lockfile and a reproducible dependency installation process.
  • Remove the instruction to reinstall or upgrade the package automatically before every search.
  • Never recommend global installation with sudo.
  • Install dependencies in an isolated, unprivileged environment or container.
  • Disable unnecessary lifecycle scripts during installation where operationally possible.
  • Require explicit user approval before downloading or executing a new dependency.
  • Review dependency changes before upgrading and maintain an allowlist of approved versions.

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:69
Finding

TLS Certificate Verification Is Explicitly Disabled for Travel Searches

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:69-73; repeated in reference/workflow.md:94-115
Vulnerability Type: Insecure TLS configuration
Risk Level: High

Vulnerable Code

From SKILL.md:

text
| SSL 证书验证失败 | 确保命令前加 `NODE_TLS_REJECT_UNAUTHORIZED=0` |

From reference/workflow.md:

bash
NODE_TLS_REJECT_UNAUTHORIZED=0 flyai keyword-search --query "[出发城市]出发 [天数]天 人均[预算/人数]以内 [偏好]"
bash
NODE_TLS_REJECT_UNAUTHORIZED=0 flyai search-flight \
  --origin "[出发城市]" --destination "[候选目的地]" \
  --dep-date [出发日期] --back-date [返回日期] \
  --sort-type 3
bash
NODE_TLS_REJECT_UNAUTHORIZED=0 flyai search-hotel \
  --dest-name "[目的地]" \
  --check-in-date [入住日期] --check-out-date [退房日期] \
  --max-price [预算/晚数/60%] --sort rate_desc
bash
NODE_TLS_REJECT_UNAUTHORIZED=0 flyai search-poi --city-name "[目的地]"

Technical Analysis

NODE_TLS_REJECT_UNAUTHORIZED=0 instructs Node.js to accept HTTPS connections without validating the remote server's certificate. This removes the authentication property provided by TLS and allows certificates signed by untrusted authorities, self-signed certificates, or certificates for the wrong hostname to be accepted.

The setting is applied to every documented FlyAI search command rather than being limited to diagnostic use. Any HTTPS communication performed by the CLI process can therefore be vulnerable to interception. Encryption alone does not provide protection when the peer cannot be authenticated.

An attacker positioned on the network path can impersonate the intended service, observe submitted travel parameters, and return manipulated search data or booking links.

Attack Path

  1. The agent launches the FlyAI CLI with NODE_TLS_REJECT_UNAUTHORIZED=0.
  2. The CLI initiates an HTTPS request to its backend service.
  3. An attacker controlling a local proxy, compromised router, public Wi-Fi network, DNS response, o ...[truncated 895 chars]
Remediation
View remediation

Remediation Suggestions

  • Remove NODE_TLS_REJECT_UNAUTHORIZED=0 from every command and example.
  • Treat certificate-validation failures as blocking security errors rather than bypassing them.
  • Repair the server certificate chain, hostname configuration, or local CA trust store.
  • If a private certificate authority is legitimately required, configure only the specific trusted CA through an appropriate CA bundle.
  • Do not disable certificate validation globally for a process.
  • Keep hostname verification enabled and use current TLS libraries.
  • Consider certificate or public-key pinning where the service architecture and rotation process can support it safely.
  • Log certificate failures without including sensitive query data.
  • Add integration tests confirming that expired, self-signed, hostname-mismatched, and untrusted certificates are rejected.
Vulnerability Patterns
  • 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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (35)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill explicitly instructs operators to disable TLS certificate verification via NODE_TLS_REJECT_UNAUTHORIZED=0. That removes server identity validation and enables man-in-the-middle interception or tampering of flight, hotel, or booking-related traffic, which is unjustified for a travel-planning skill.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The referenced documentation describes a Marriott hotel search capability, which does not match the declared reverse-budget travel-planning purpose of the skill. This kind of capability/documentation mismatch can mislead the agent into invoking an unrelated tool, causing unintended data flows, incorrect planning behavior, or policy bypass through hidden scope expansion.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The workflow repeatedly disables TLS verification for networked commands but provides no warning that certificate checks are being bypassed. This omission is dangerous because it normalizes insecure transport behavior in a consumer travel skill, making interception and manipulation of search responses much more likely to go unnoticed.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The workflow explicitly prefixes all FlyAI network searches with NODE_TLS_REJECT_UNAUTHORIZED=0, which disables TLS certificate verification for outbound HTTPS connections. In a travel-search skill that depends on remote results, this enables man-in-the-middle tampering of flight, hotel, and POI data and can expose any transmitted tokens or sensitive query data.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The description says to use this skill when users mention phrases like "这些钱能去哪", "穷游推荐", and "预算旅行", which are broad natural-language expressions that could appear in ordinary conversation without clearly indicating intent to invoke this specific skill. The trigger list also lacks exclusion conditions or negative examples to clarify when the skill should not activate.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill instructs persistent storage and reuse of user preferences, history, departure city, and companion information as part of a memory system. Retaining travel-related personal data without strict minimization, consent, retention limits, and access controls increases the risk of unnecessary profiling or later disclosure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill says it reads stored user profile and preference data at startup, including via memory search or a local file, without a clear user-facing notice or consent step at the point of use. This can lead to silent collection, reuse, and exposure of personal travel preferences and history beyond what the user expects in a given session.

Content

No source excerpt is available for this finding.

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
99% confidence
Finding

Setting NODE_TLS_REJECT_UNAUTHORIZED=0 creates an unsafe default by globally bypassing TLS certificate checks. In this skill's context, that can expose travel search and booking workflows to traffic interception, data leakage, and manipulated pricing or links.

Content

Scanner excerpt · SKILL.md (reported line 73)May include surrounding context.

md
| 某档方案超预算 | 给出"如果多加¥X就能解锁XX"的升级提示 |
| 价格波动导致超预算 | 标注"按当前价格计算,建议尽快预订锁价" |
| 搜索返回空结果 | 调整搜索条件,或用 AI 通识知识推荐替代目的地 |
| SSL 证书验证失败 | 确保命令前加 `NODE_TLS_REJECT_UNAUTHORIZED=0` |

---

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The referenced capability describes a broad, general-purpose AI travel search interface covering hotels, attractions, flights, trains, and mixed intent, which exceeds the manifest’s narrower 'reverse-budget' assistant scope. This kind of scope expansion can cause the skill to be invoked or relied on for requests outside its declared purpose, increasing the chance of unintended behavior, policy bypass through overly broad query handling, or misuse of integrated search features.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The document explicitly states that the skill will remember user parameters, learn preference patterns, and accumulate past cases, which exceeds the described trigger-based travel recommendation scope. This creates a scope-creep and privacy risk because users may disclose travel, budget, and location data without clear consent for persistent storage or profile-building.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file describes storing user preferences and learning from successful and failed cases, but gives no notice about retention, privacy implications, access controls, or whether data is anonymized. For a travel assistant, this can expose sensitive behavioral data such as home city, budget range, and travel habits, enabling profiling beyond the user's expectations.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
98% confidence
Finding

The tool documentation instructs use of npx @anthropic-ai/flyai-cli@latest, which fetches and executes the newest package version at runtime. This creates a supply-chain risk: a compromised upstream package, malicious new release, or breaking change could lead to arbitrary code execution or unsafe behavior in environments that follow the documentation. In an agent skill context, this is more dangerous because the command is presented as a core capability and may be copied directly into automation workflows.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The document expands a budget-travel recommendation skill into persistent cross-session profile collection and storage across platform memory and local files. That introduces retention of personal preference and family-context data beyond what is necessary for a single recommendation flow, increasing privacy and misuse risk if the data is later accessed, correlated, or exposed.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The main storage instructions describe creating and updating persistent user-profile records in memory and local files but omit prominent privacy notice, retention policy, or security expectations at the point of collection. Users and integrators may therefore store personal data indefinitely without informed consent or lifecycle controls, creating avoidable privacy and compliance risk.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file documents storing detailed travel profiles including city, airport, budget range, family composition, travel history, and special needs in persistent storage without clearly tying each field to the skill's stated purpose. This creates unnecessary accumulation of user data, some of which may be sensitive in context, and broadens the privacy blast radius if storage is compromised or reused unexpectedly.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
89% confidence
Finding

The documented creation of a persistent directory and profile file under ~/.flyai establishes cross-session local storage of user data on the host system. In the context of a lightweight travel-budget skill, this persistence increases exposure to unintended local access, stale sensitive data retention, and silent accumulation of personal information.

Content

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

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

bash
mkdir -p ~/.flyai

文件格式

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The workflow mandates a global npm install/upgrade of a CLI before performing the skill, and even suggests sudo when permissions fail. For a travel recommendation workflow, requiring system-wide package installation and possible elevation expands the attack surface unnecessarily and can lead to execution of package lifecycle scripts with broad host impact.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The instructions tell users to run a global npm install/upgrade command without clearly warning that it changes the system environment and may execute install scripts. In this skill context, users may treat the step as routine, increasing the chance of unsafe execution of third-party code with broad local impact.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
90% confidence
Finding

The skill suggests using sudo npm install -g to overcome permission issues, which can execute package installation steps as root. If the package or dependency chain is compromised, or if the command is mistyped or substituted, the result can be full-system compromise rather than a limited user-scoped impact.

Content

Scanner excerpt · reference/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

Using NODE_TLS_REJECT_UNAUTHORIZED=0 as a default for keyword-search disables HTTPS certificate validation for that network call. That unsafe default makes tampering or interception of returned destination data feasible and is unjustified in a normal travel recommendation workflow.

Content

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

2.1 自然语言广泛搜索

bash
NODE_TLS_REJECT_UNAUTHORIZED=0 flyai keyword-search --query "[出发城市]出发 [天数]天 人均[预算/人数]以内 [偏好]"

2.2 对每个候选目的地搜索机票

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
99% confidence
Finding

Using NODE_TLS_REJECT_UNAUTHORIZED=0 for flight search disables certificate checks while retrieving itinerary and pricing data. This creates a straightforward opportunity for manipulated results, data exposure, or phishing-style redirection in a context where users may make purchase decisions based on the output.

Content

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

2.2 对每个候选目的地搜索机票

bash
NODE_TLS_REJECT_UNAUTHORIZED=0 flyai search-flight \
  --origin "[出发城市]" --destination "[候选目的地]" \
  --dep-date [出发日期] --back-date [返回日期] \
  --sort-type 3

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
99% confidence
Finding

Using NODE_TLS_REJECT_UNAUTHORIZED=0 for hotel search makes insecure transport the default for lodging lookups. An attacker on the network path could alter prices, ratings, or destination mappings, undermining both user trust and downstream decision-making.

Content

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

2.3 搜索对应酒店

bash
NODE_TLS_REJECT_UNAUTHORIZED=0 flyai search-hotel \
  --dest-name "[目的地]" \
  --check-in-date [入住日期] --check-out-date [退房日期] \
  --max-price [预算/晚数/60%] --sort rate_desc

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
99% confidence
Finding

Using NODE_TLS_REJECT_UNAUTHORIZED=0 for POI search disables endpoint authentication for attraction data retrieval. Even though this may seem lower sensitivity, it still permits silent manipulation of results and demonstrates an unsafe pattern repeated across the whole workflow.

Content

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

2.4 搜索景点门票

bash
NODE_TLS_REJECT_UNAUTHORIZED=0 flyai search-poi --city-name "[目的地]"

第3步:计算并筛选方案

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
71% confidence
Finding

The workflow says the output includes booking links, which can direct users to third-party booking services and may expose travel intent or itinerary context once followed. The skill description does not include any warning that external providers may handle related data or that users should review those sites before booking.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The example dialogue and all user-facing content are presented exclusively in Chinese, with no indication that the user can choose another language. This can violate language/locale policy expectations when a skill implicitly enforces a specific language without opt-in.

Content

No source excerpt is available for this finding.