Back to skill

Security audit

酒店三选一

Security checks for vulnerabilities and agentic risk

Overview

This hotel comparison skill has a coherent purpose, but it asks for risky system installation, disables HTTPS safety checks, and persists personal travel profile data.

Review before installing. Only use this skill if you are comfortable with a third-party FlyAI CLI being installed, and avoid running the suggested sudo install or TLS-bypass commands. Treat saved travel profiles as personal data, especially if stored in ~/.flyai/user-profile.md, and consider using the skill only after those installation, TLS, and persistence behaviors are tightened.

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

T08 · Insecure Dependencies

Error
Location
SKILL.md:102
Finding

Mandatory Installation of an Unpinned Global Dependency

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 102–118
Vulnerability Type: Supply-chain exposure through automatic installation of a mutable global package
Risk Level: High

Vulnerable Code

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

The documented permission-error fallback further recommends privileged installation:

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

Technical Analysis

The skill requires the agent to install or upgrade @fly-ai/flyai-cli before performing searches. The @latest tag is mutable, so the effective package contents may change after the skill has been audited. There is no exact version pin, lockfile, integrity verification, package review, or isolation boundary.

Global npm installations can run package lifecycle scripts and modify globally accessible executables and modules. The documented sudo fallback is particularly dangerous because lifecycle scripts may then execute with root privileges. This creates a supply-chain trust boundary in which compromise of the package, its maintainer account, publishing credentials, or a transitive dependency could turn ordinary skill activation into arbitrary code execution.

Attack Path

  1. An attacker compromises the package publisher, release process, or a dependency included in a future latest release.
  2. The attacker publishes a malicious version under the package's existing name and updates the latest distribution tag.
  3. A user activates the skill for a hotel-search task.
  4. The agent follows the mandatory installation instruction and downloads the mutable release.
  5. Malicious npm lifecycle code executes during installation.
  6. If the permission-error fallback is used, that code executes under sudo and may obtain root privileges.
  7. The globally installed executable can subsequently run attacker-controlled behavior whenever the skill invokes flyai.

...[truncated 620 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the requirement to install or upgrade the CLI automatically during every skill run.
  2. Pin the package to a reviewed exact version rather than using @latest.
  3. Verify package integrity using a lockfile and trusted registry integrity metadata.
  4. Prefer a project-local, isolated dependency over global installation.
  5. Run the dependency with the minimum required user privileges and disable unnecessary lifecycle scripts where feasible.
  6. Remove the recommendation to use sudo npm install.
  7. Require explicit, informed user approval before installing third-party software.
  8. Establish a controlled upgrade process that reviews new versions before changing the approved pin.
  9. Consider distributing a reviewed, reproducible artifact or invoking a constrained API directly instead of installing mutable executable code.

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:126
Finding

TLS Certificate Verification Disabled for Travel Searches

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 126–160 and 215–217
Vulnerability Type: Disabled TLS peer authentication
Risk Level: High

Vulnerable Code

bash
# Note: if SSL certificate verification fails, add an environment variable to bypass it
NODE_TLS_REJECT_UNAUTHORIZED=0 flyai search-hotel \
  --dest-name "[destination]" \
  --check-in-date [check-in date] \
  --check-out-date [check-out date] \
  --max-price [budget limit] \
  --sort rate_desc
bash
NODE_TLS_REJECT_UNAUTHORIZED=0 flyai search-poi \
  --city-name "[destination]" \
  --keyword "[attraction keyword]"
bash
NODE_TLS_REJECT_UNAUTHORIZED=0 flyai search-poi \
  --city-name "[destination]" \
  --poi-level 5

The exception-handling table repeats the unsafe policy:

text
| SSL certificate verification failure | Use the `NODE_TLS_REJECT_UNAUTHORIZED=0` environment variable to bypass it |

Technical Analysis

Setting NODE_TLS_REJECT_UNAUTHORIZED=0 disables TLS certificate verification for Node.js HTTPS connections made by the command. Encryption without certificate validation does not authenticate the remote service. Consequently, the client may accept certificates issued by an untrusted party or certificates presented by an active network attacker.

The skill presents this bypass as the standard execution form for hotel and POI searches and as the remedy for certificate failures. Certificate errors are security signals that should cause the operation to fail closed; bypassing them enables man-in-the-middle attacks instead of addressing the trust-store or endpoint configuration problem.

Attack Path

  1. The agent invokes a documented FlyAI search command with NODE_TLS_REJECT_UNAUTHORIZED=0.
  2. An attacker gains a network interception position, such as through a hostile Wi-Fi access point, compromised proxy, poisoned DNS response, or local network gateway.
  3. The attacker presents an arbitrary certificate while impersonating the serv ...[truncated 1224 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove every use of NODE_TLS_REJECT_UNAUTHORIZED=0.
  2. Configure the CLI to fail closed when certificate verification fails.
  3. Repair the underlying trust problem by updating the operating system and Node.js CA stores.
  4. Confirm that the service uses a valid certificate with the correct hostname and complete certificate chain.
  5. If a private certificate authority is legitimately required, configure only that trusted CA through an explicit CA bundle rather than disabling verification globally.
  6. Avoid broad process-level TLS overrides; scope any trust configuration to the intended service.
  7. Log certificate failures without exposing sensitive query data and provide users with safe diagnostic guidance.
  8. Consider certificate or public-key pinning where operationally appropriate, together with a secure rotation process.
  9. Add tests or policy checks that reject documentation and commands containing NODE_TLS_REJECT_UNAUTHORIZED=0.
Vulnerability Patterns
  • 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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (26)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill requires a global npm install/upgrade of a CLI before performing a simple hotel-comparison task, which is unnecessary privilege and capability expansion for the stated purpose. Global package installation changes the host environment, can execute package lifecycle scripts, and increases supply-chain risk, especially when combined with advice to keep reinstalling or upgrading to the latest version.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
100% confidence
Finding

The skill instructs disabling TLS certificate verification via NODE_TLS_REJECT_UNAUTHORIZED=0 for hotel and POI searches, which permits man-in-the-middle interception and tampering of network traffic. This is unjustified for a travel recommendation workflow and weakens transport security for all affected Node-based requests in that process.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
100% confidence
Finding

The skill tells operators to disable TLS certificate validation without a clear warning about the severe security implications. This normalizes an unsafe workaround that can expose requests and responses to interception or manipulation, making the recommendation pipeline and any retrieved data untrustworthy.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The referenced file documents flight-search behavior inside a skill whose declared purpose is hotel selection, creating a clear scope mismatch. This can cause the agent to invoke or prioritize irrelevant travel-booking actions, confuse tool routing, and potentially expose users to unintended workflows or data handling outside the skill’s expected hotel-only context.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The description says to use the skill when the user mentions phrases like "酒店推荐", "帮我选酒店", and "住哪里好", which are broad requests that could arise in many ordinary conversations about travel. The file does not provide exclusion conditions or tighter activation constraints to distinguish this skill from other general travel or recommendation skills.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The skill reads persisted user profile data from memory or a local file at startup without prominently disclosing this data access in the description or obtaining contextual consent. While this may be intended for convenience, it creates privacy and transparency concerns because users may not expect automatic retrieval of prior personal preference data.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The file says the CLI "必须先执行安装命令(无论是否已安装,确保为最新版本)", but later says "此步骤只在首次使用时执行,后续调用会直接跳过已安装的情况." These statements conflict about whether installation should always run or only on first use, creating intent ambiguity in operational behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill instructs users to perform a global CLI install and even suggests sudo for permission issues without a prominent warning that this changes the system and may run code with elevated privileges. That creates avoidable risk of system modification and privilege misuse for a task that should not require administrator-level actions.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
95% confidence
Finding

Recommending sudo npm install -g encourages elevated execution of package installation, which can grant package scripts root-level impact on the host. In the context of a hotel-picking assistant, this is disproportionate and expands the blast radius of any package compromise or operator mistake.

Content

Scanner excerpt · SKILL.md (reported line 118)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
100% confidence
Finding

Setting NODE_TLS_REJECT_UNAUTHORIZED=0 disables certificate validation for the search-hotel command, making HTTPS connections vulnerable to interception and tampering. Because search results drive recommendations, an attacker could manipulate returned hotel data or observe user travel queries.

Content

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

bash
# 注意:如遇SSL证书验证失败,添加环境变量绕过
NODE_TLS_REJECT_UNAUTHORIZED=0 flyai search-hotel \
  --dest-name "[目的地]" \
  --check-in-date [入住日期] \
  --check-out-date [离店日期] \

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
100% confidence
Finding

Using NODE_TLS_REJECT_UNAUTHORIZED=0 for search-poi disables server certificate checks and undermines the integrity and confidentiality of location/POI lookups. This can lead to manipulated POI data and untrusted location analysis in the final recommendation.

Content

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

调用 FlyAI search-poi 获取景点信息:

bash
NODE_TLS_REJECT_UNAUTHORIZED=0 flyai search-poi \
  --city-name "[目的地]" \
  --keyword "[景点关键词]"

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
100% confidence
Finding

The same unsafe TLS-bypass default is repeated for the fallback POI search path, showing a systemic practice of weakening transport security rather than handling errors safely. Repetition increases the chance this behavior is copied broadly and treated as normal operating procedure.

Content

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

如用户未指定景点,搜索热门景点作为参考:

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

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
99% confidence
Finding

Documenting TLS bypass in the exception-handling table institutionalizes an unsafe default as the prescribed response to SSL failures. This makes the skill more dangerous because it converts a security error into a routine workaround instead of a blocking condition requiring secure remediation.

Content

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

md
| 用户没输入景点 | 用 search-poi 搜热门景点作为参考锚点 |
| 酒店信息不完整 | 标注"该信息暂无,建议点击详情确认" |
| 三家都不满意 | 支持"换一批",调整筛选权重后重新推荐 |
| SSL证书验证失败 | 使用 `NODE_TLS_REJECT_UNAUTHORIZED=0` 环境变量绕过 |

## ask_user_question 工具说明

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The reference documents a general-purpose travel semantic search capability covering hotels, attractions, flights, trains, itineraries, and mixed travel intent, which is materially broader than the declared hotel N选1 decision-assistant scope. This scope drift can cause an agent to invoke or justify actions outside the user-approved capability boundary, increasing the risk of over-collection, unintended tool use, or policy bypass through ambiguous travel queries.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The referenced keyword-search capability accepts broad natural-language travel queries well beyond hotel selection, including flights, tours, visas, telecom, and cruises. For a hotel-picking skill, this creates unnecessary capability expansion and increases the chance the agent will retrieve or act on unrelated domains, undermining least-privilege design and enabling prompt-driven scope drift.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Visa, insurance, telecom, cruise, and package-search options are not justified by the stated purpose of choosing among hotels. Their presence invites misuse of the skill as a general travel broker, increasing attack surface, making output less predictable, and allowing adversarial prompts to pivot the agent into unrelated workflows or commercial actions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The parameter examples and allowed category values are presented entirely in Chinese, and the file does not state that the skill is China-specific or offer any language/locale option. This can violate language/locale policy because it implicitly requires a specific language without user opt-in or documented justification.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The document establishes a shared, persistent travel-profile store collecting broad personal data such as city, airport, family composition, travel history, and preferences, which exceeds what is necessary for a hotel comparison helper. This creates avoidable privacy and data-minimization risk because the skill can perform its stated purpose with session-only inputs rather than building a cross-session profile.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The storage spec discusses saving user profile data but does not prominently warn that it includes personal preferences, family details, travel history, and other potentially sensitive information. Without clear privacy notice and informed consent framing, users may not understand the scope or consequences of persistent profiling across sessions and platforms.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

These lines explicitly instruct writing user travel-profile data to either Qoder Memory or a local file, enabling durable storage of personal preference data without a strong justification from the skill's hotel-picking purpose. Persistent writes increase exposure surface, especially if other tools, skills, or local users can later access or reuse that data outside the user's expectations.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The fallback local-file mode stores detailed travel-profile information in ~/.flyai/user-profile.md, expanding the skill from decision support into local persistence of personal data. Plain local storage increases the chance of unintended disclosure through other software, backups, shared accounts, or later skill access, and is not clearly necessary for selecting among hotels.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The local-file mode directs saving the profile in a plaintext file under ~/.flyai without warning that local files may be readable by other local users, tools, backups, or later processes. This omission understates a realistic confidentiality risk for personal travel and family-preference data.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
89% confidence
Finding

The instruction to create ~/.flyai and persist a user-profile file introduces cross-session state for personal data. Session persistence itself is not always unsafe, but in this context it broadens the skill's capability beyond hotel comparison and creates privacy and data-retention risks if the stored profile is reused or exposed unexpectedly.

Content

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

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

bash
mkdir -p ~/.flyai

文件格式

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The only natural-language query examples are written in Chinese, which can imply the skill is intended or expected to be used in a specific language. There is no surrounding text indicating multilingual support, user language choice, or a justified locale restriction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file includes example commands using Chinese city names and output fields/values in Chinese, but it does not state that the skill is China-specific or give users a choice of locale/language. That can violate the policy against forcing a specific language or locale without user opt-in.

Content

No source excerpt is available for this finding.