Back to skill

Security audit

住宿顾问

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent hotel-search assistant, but users should be careful because it asks them to install an unpinned global npm CLI and may persist an optional API key in FlyAI configuration.

Install only if you trust FlyAI and the npm package source. Prefer a pinned, local installation in a constrained environment, review where `flyai` stores configuration before adding an API key, and avoid running the global npm install with elevated privileges.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:25
Finding

Unpinned Global Installation of a Third-Party CLI Package

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 25
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: Medium

Vulnerable Code Snippet:

markdown
1. **Install CLI**: `npm i -g @fly-ai/flyai-cli`

Technical Analysis

The setup instruction installs @fly-ai/flyai-cli globally without specifying an exact version, validating an integrity hash, or using a reviewed lockfile. Consequently, npm resolves the package version available from the configured registry at installation time rather than a version represented by the audited project.

npm packages may execute lifecycle scripts during installation. Because the command uses global installation, those scripts run with the permissions of the invoking user and can modify user-accessible files, install or replace global executables, and affect later command resolution. The audited repository therefore does not fully determine the code that users will execute.

No evidence establishes that the named package is currently malicious. The confirmed issue is the unsafe, mutable supply-chain installation practice and its exposure to future package compromise, registry compromise, or an unexpectedly changed release.

Attack Path

  1. An attacker compromises the package publisher account, registry distribution path, or a future release of @fly-ai/flyai-cli.
  2. The attacker publishes a modified package version containing a malicious npm lifecycle script or executable.
  3. A user follows SKILL.md and runs npm i -g @fly-ai/flyai-cli.
  4. npm resolves and downloads the attacker-controlled version because no exact version or integrity value is specified.
  5. Package lifecycle code executes with the invoking user's privileges during installation.
  6. The globally installed executable can also run attacker logic when subsequent flyai commands are invoked.

Impact Assessment

Successful exploitation could provide arbitra ...[truncated 546 chars]

Remediation
View remediation

Remediation Suggestions

  1. Pin the CLI to a reviewed exact version, for example:

    bash
    npm install --save-exact @fly-ai/flyai-cli@<reviewed-version>
    
  2. Install it as a project-local dependency rather than globally, and invoke it through a package script or the local node_modules/.bin path.

  3. Commit package.json and a lockfile generated from the reviewed dependency graph.

  4. Use deterministic installation such as npm ci and verify registry provenance and expected integrity metadata.

  5. Review the package, transitive dependencies, and lifecycle scripts before approving version upgrades.

  6. Run installation and CLI commands as an unprivileged user in a constrained environment with only the network and filesystem access required for hotel searches.

  7. Document the trusted npm registry and prohibit unreviewed registry overrides.

Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (5)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown file uses Chinese for the description, headings, and operational instructions, which effectively forces a specific language on users. The policy allows locale constraints only when user choice is offered or the restriction is clearly documented and justified, neither of which appears here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown file contains all user-facing operational guidance in Chinese, and there is no indication that users may choose another language or that the skill is intentionally restricted to a Chinese-speaking or region-specific context. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The runbook template is entirely written in Chinese, including required field labels such as '执行日志', '城市', and '风险提示'. This imposes a specific language on operators or downstream users without any indication that language choice is optional or that the skill is region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown template appears to require Chinese as the interaction/output language, but the file does not provide user opt-in or explain that the skill is intentionally limited to a Chinese-speaking or region-specific context. That can violate language/locale policy when users are not given a choice.

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 file contains user-facing operational guidance exclusively in Chinese, and there is no indication that the skill is region-specific or that users can opt into another language. Under the natural-language policy rule, forcing a specific language without user choice can be a locale policy violation.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.