Back to skill

Security audit

go2Travel — 飞猪旅行智能规划

Security checks for vulnerabilities and agentic risk

Overview

This travel-planning skill is mostly coherent, but it gives agents raw shell and network command templates with user-controlled inputs and relies on an unpinned global CLI install.

Install only if you are comfortable with a travel skill that may run local CLI and curl commands, contact Fliggy plus third-party weather/currency services, and use a globally installed npm CLI. Prefer reviewing or sandboxing command execution, pinning the CLI version, and treating health or medication suggestions as general travel preparation rather than medical advice.

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
roles/flight-expert.md:14
Finding

Shell Command Injection Through Flight Search Parameters

Content
View full analysis

Vulnerability Details

File Location: roles/flight-expert.md, lines 14-30
Vulnerability Type: T09: Insecure Skill Coding Practices
Risk Level: High

bash
# Outbound flight search
flyai search-flight --origin "{departure_city}" --destination "{destination_city}" --dep-date "{departure_date}"

# Return flight search
flyai search-flight --origin "{destination_city}" --destination "{departure_city}" --dep-date "{return_date}"

# Sort by ascending price
flyai search-flight --origin "{departure_city}" --destination "{destination_city}" \
  --dep-date "{date}" --sort-type 3

# Apply a maximum price
flyai search-flight --origin "{departure_city}" --destination "{destination_city}" \
  --dep-date "{date}" --max-price 2000

# Prefer direct flights
flyai search-flight --origin "{departure_city}" --destination "{destination_city}" \
  --dep-date "{date}" --sort-type 8

Technical Analysis

The documented commands interpolate user-controlled city and date values into shell command strings. Double quotation marks do not provide a security boundary when an attacker can include a quotation mark in the substituted value. A crafted value can terminate the quoted argument and introduce shell operators such as command substitution, pipes, redirections, or command separators.

The vulnerability applies when an agent or integration constructs these command strings through direct textual substitution and submits them to a shell. The documentation does not require strict input validation, escaping, or argument-array execution.

Attack Path

  1. An attacker submits a crafted departure city, destination, or date containing a closing quotation mark and shell syntax.
  2. The agent substitutes the value into one of the documented command templates.
  3. The resulting command is passed to a shell rather than directly to the flyai executable as an argument array.
  4. The shell interprets the injected syntax as addi ...[truncated 719 chars]
Remediation
View remediation

Remediation Suggestions

  • Do not build shell command strings through textual interpolation.
  • Invoke flyai directly with an argument array, ensuring that each city and date remains a single argument.
  • Validate dates against a strict calendar-date format such as YYYY-MM-DD.
  • Apply explicit length and character restrictions to city and airport inputs.
  • Reject control characters, quotation marks, command substitutions, redirection operators, and shell separators if shell execution cannot be eliminated.
  • Do not use shell=True, bash -c, sh -c, or equivalent shell-evaluation mechanisms.
  • Run the command with a minimally privileged service account and a restricted environment.
  • Add tests using adversarial values containing quotation marks, semicolons, pipes, newlines, backticks, and command substitutions.

T09 · Insecure Skill Coding Practices

Error
Location
roles/weather-expert.md:16
Finding

Shell Command and URL Injection Through Weather Location Input

Content
View full analysis

Vulnerability Details

File Location: roles/weather-expert.md, lines 16-28
Vulnerability Type: T09: Insecure Skill Coding Practices
Risk Level: High

bash
# Current weather summary
curl -s "wttr.in/{city}?format=3"

# Detailed current weather
curl -s "wttr.in/{city}?format=j1"

# Three-day forecast
curl -s "wttr.in/{city}?lang=zh"

# Seven-day forecast
curl -s "wttr.in/{city}?format=v2&lang=zh"

# Selected forecast day
curl -s "wttr.in/{city}?1&lang=zh"

Technical Analysis

The city value is user-controlled and is directly interpolated into a quoted shell command. If an attacker supplies a value containing a closing quotation mark, the attacker can escape the intended URL argument and introduce shell syntax.

Even where shell injection is prevented by the caller, the city value is not URL-encoded or structurally validated. Special URL characters can therefore alter the request path or query string. The Skill documentation provides no requirement for safe process invocation, location validation, or URL construction through a structured HTTP client.

Attack Path

  1. An attacker provides a crafted city value containing a quotation mark followed by shell operators and an attacker-selected command.
  2. The agent inserts the value into a documented curl command.
  3. The generated string is executed by a shell.
  4. The quotation mark terminates the intended URL argument.
  5. The shell evaluates the remaining injected syntax with the privileges of the agent process.

Impact Assessment

Exploitation can lead to arbitrary command execution under the agent's operating-system account. An attacker may read accessible local data, expose environment variables, modify files, or make arbitrary outbound requests. The impact is constrained by the permissions and network access of the agent runtime, but those permissions exceed what is required merely to retrieve a public weather forecast.

Remediation
View remediation

Remediation Suggestions

  • Replace shell-based curl templates with a structured HTTP client.
  • Build the request URL using a URL library and percent-encode the city as a path component.
  • If curl must be used, invoke it directly through an argument array without a shell.
  • Restrict city input to an appropriate maximum length and reject control characters.
  • Permit only expected location characters or resolve user input to a trusted canonical location identifier.
  • Set HTTPS explicitly, enforce certificate verification, and configure connection and response timeouts.
  • Apply outbound network restrictions so the Skill can contact only approved weather endpoints.
  • Add security tests for quotation marks, newlines, URL delimiters, shell operators, and command-substitution syntax.

T08 · Insecure Dependencies

Warning
Location
SECURITY.md:7
Finding

Unpinned Global npm Dependency Installation

Content
View full analysis

Vulnerability Details

File Location: SECURITY.md, lines 7-9
Vulnerability Type: T08: Insecure Dependencies
Risk Level: Medium

markdown
- **Package**: `@fly-ai/flyai-cli` (npm)
- **Source**: https://github.com/alibaba-flyai/flyai-skill
- **Install**: `npm i -g @fly-ai/flyai-cli`

Technical Analysis

The installation command does not specify an exact package version or integrity value. It therefore resolves whichever release is associated with the package's current default distribution tag at installation time. This makes the installed code mutable after the Skill has been reviewed.

npm installation may also execute package lifecycle scripts. Installing globally increases the affected scope compared with a project-local, locked dependency. The stated GitHub source does not cryptographically bind the npm package resolved by the command to a reviewed commit.

Attack Path

  1. The npm package account, release process, registry entry, or a future package version is compromised or publishes unsafe code.
  2. A user follows the documented unversioned global installation command.
  3. npm resolves and downloads the altered release.
  4. Package installation or lifecycle scripts execute with the privileges used for installation.
  5. The compromised CLI subsequently receives travel-search arguments and may access its configured API data or perform unrelated local and network operations.

Impact Assessment

A compromised dependency can execute code with the privileges of the user running npm. If the command is run with elevated privileges to permit global installation, the impact may extend to system-wide files and tools. Without elevation, the likely scope includes the user's files, environment, global npm directories, network access, and configuration readable by the CLI.

No evidence was found that the currently referenced package is malicious. The risk arises from the unpinned and globally installed s ...[truncated 23 chars]

Remediation
View remediation

Remediation Suggestions

  • Pin the dependency to an audited exact version rather than using the registry's current default release.
  • Record and verify package integrity metadata and provenance.
  • Bind the reviewed npm artifact to a specific trusted source commit or signed release.
  • Prefer a project-local installation with a committed lockfile over global installation.
  • Avoid elevated installation and execution privileges.
  • Review lifecycle scripts and use an installation mode that disables them when they are not required.
  • Execute the CLI in a sandbox with limited filesystem and network permissions.
  • Establish a dependency-update process that requires review and security testing before changing the pinned version.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
Findings (51)

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

The role includes a shell pipeline that fetches remote content and processes it with an inline Python command. Although the current Python snippet parses JSON rather than executing downloaded code, this pattern encourages agent behaviors involving shell execution and trust in remote data, which is dangerous in a skill because small future modifications could turn it into command-execution or supply-chain abuse.

Content

Scanner excerpt · roles/currency-expert.md (reported line 16)May include surrounding context.

bash
# 实时汇率(免费 API)
curl -s "https://api.exchangerate-api.com/v4/latest/CNY"

# 特定货币汇率
curl -s "https://api.exchangerate-api.com/v4/latest/CNY" | python3 -c "

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Allowing detailed reports to be triggered by very short generic phrases like 'review' or 'verify' creates prompt-routing ambiguity and can cause the skill to enter specialized analysis modes without sufficient user intent. This can lead to over-collection of context, confusing outputs, or activation of checks the user did not knowingly request.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest describes travel planning, itinerary arrangement, and travel-related search tasks such as flights, hotels, attractions, car rental, visas, guides, budgets, and luggage. The addition of a health_advice intent and a '医疗健康专家' role introduces medical guidance capabilities not described in the manifest and not obviously required for the stated scope.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

Describing activation through broad keyword matching for new intents increases the chance of scope confusion and accidental invocation on unrelated user requests. In a multi-role skill, overbroad routing can expose users to off-topic or higher-risk advice paths, especially for sensitive domains like health, without clear user intent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

Generic keyword-based role activation creates ambiguous routing and makes it easy for ordinary words to trigger specialized behaviors unintentionally. This is risky in a travel skill with many expanding subroles because users may receive irrelevant, misleading, or unnecessarily sensitive guidance without having requested that function.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest explicitly excludes '纯天气查询' and '纯汇率查询' from this skill's scope, but the changelog states that SKILL.md added dedicated intents and keyword patterns for weather_check and currency_exchange. That reflects an expansion of actual skill behavior beyond the manifest's declared trigger boundaries.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The file is entirely written in Chinese and includes output requirements such as specific Chinese phrasing, but it does not indicate that language selection is optional or limited to a justified Chinese-only context. This creates a natural-language policy concern because it effectively imposes a locale/language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The file is entirely written in Chinese and the output requirements are specified only in Chinese, with no indication that users may choose another language. This creates a natural-language locale constraint without user opt-in, which matches the policy-violation category for language or locale restrictions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The reference specifies price in CNY and the examples/output are entirely localized in Chinese, including city names and weekday strings, with no indication that language or locale is configurable. Under the policy, forcing a specific language/locale without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The entire skill, including role description, commands context, output format, and error handling, is written only in Chinese and presents a fixed Chinese-language interaction pattern. There is no indication that users may choose another language, nor any documented region-specific justification for the locale restriction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown skill mandates a specific language for interaction through its natural-language instructions and examples, but does not indicate that Chinese is optional or limited to a region-specific use case. That can violate language/locale policy when users are not given an explicit choice or opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This file presents the role, responsibilities, and output format entirely in Chinese, which effectively forces a specific language/locale for the skill's behavior. The policy allows locale constraints only when they are explicitly justified or when the user is given a choice, 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
90% confidence
Finding

The skill title and all operational instructions are written in Chinese and present the role directly as the expected interaction mode, with no indication that users may choose another language. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown skill specifies all instructions and output format in Chinese, which can effectively force a specific language/locale on users. The file does not mention that Chinese is optional, user-selectable, or required for a documented region-specific use case.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill is written as a role definition entirely in Chinese and directly instructs the agent in Chinese without indicating that language selection depends on user preference. This can violate language/locale policy when a skill implicitly forces a specific language rather than offering user choice or documenting a justified locale restriction.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest for go2Travel explicitly says the skill should not trigger for '纯汇率查询(用独立工具)'. This role file is dedicated to exchange rates, currency conversion, and related commands, including real-time FX lookup as its primary responsibility, which exceeds the manifest's stated scope for this travel-planning skill.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The file provides concrete commands to call an external exchange-rate API and format FX outputs, enabling the skill to function as a dedicated currency tool. Because the manifest explicitly routes pure exchange-rate requests to an independent tool, this capability is context-inappropriate within the stated purpose of go2Travel.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

The skill instructs use of an external third-party API via curl, which causes outbound network access to a domain outside the trusted platform. Even though no sensitive data is explicitly sent here, this expands the attack surface, creates dependency on an unvetted external service, and could leak usage patterns or later be repurposed to transmit user-derived data.

Content

Scanner excerpt · roles/currency-expert.md (reported line 16)May include surrounding context.

bash
# 实时汇率(免费 API)
curl -s "https://api.exchangerate-api.com/v4/latest/CNY"

# 特定货币汇率
curl -s "https://api.exchangerate-api.com/v4/latest/CNY" | python3 -c "

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

This second instance again embeds direct outbound requests to a third-party exchange-rate endpoint as part of the skill workflow. In skill content, examples often become implementation guidance; normalizing raw external fetches increases the chance that agents will perform uncontrolled network requests and rely on untrusted data.

Content

Scanner excerpt · roles/currency-expert.md (reported line 19)May include surrounding context.

md
curl -s "https://api.exchangerate-api.com/v4/latest/CNY"

# 特定货币汇率
curl -s "https://api.exchangerate-api.com/v4/latest/CNY" | python3 -c "
import sys, json
data = json.load(sys.stdin)
rates = data.get('rates', {})

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file contains user-facing instructions and templates exclusively in Chinese, which can amount to a language policy violation when no opt-in or alternative language handling is provided. The file does not state that the skill is China-specific or otherwise justified to require Chinese output.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The file is entirely written as a role/instruction in Chinese and presents no opt-in or alternative language behavior. Under the policy, forcing a specific language without user choice can be a natural-language policy violation unless the locale restriction is explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The entire skill is written as a role definition in Chinese and instructs the agent as a Chinese-language 'flight expert' without any opt-in, fallback, or note that the skill is intended only for Chinese-speaking users. Under the policy, forcing a specific language or locale without user choice 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 file presents the role, instructions, and output format entirely in Chinese and frames the assistant as a fixed Chinese-speaking 'food expert' without any opt-in or alternative language guidance. Under the policy, forcing a specific language without user choice is a natural-language locale violation unless the restriction is explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file presents the role and all required content structure entirely in Chinese, indicating the skill is intended to operate in a fixed language. There is no instruction allowing the user to choose another language or locale, which violates the policy against forcing a specific language without opt-in.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This role materially expands the skill from travel planning into medical guidance, including symptom handling, preventive recommendations, and medication suggestions. In a travel context, users may over-rely on this advice as professional healthcare guidance, creating risk of unsafe self-treatment, delayed care, or inappropriate recommendations for vulnerable groups.

Content

No source excerpt is available for this finding.