Back to skill

Security audit

travel-schedule-brainstrom

Security checks for vulnerabilities and agentic risk

Overview

This travel-planning skill is coherent, but its documented CLI commands use unsafe shell patterns and explicitly disable TLS certificate checks.

Review before installing. The travel workflow itself is understandable, but users should remove the TLS-bypass environment variable, require valid certificates, and only run FlyAI commands through safe argument handling with validated dates, prices, and city or keyword values.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
skill.md:78
Finding
TLS Certificate Verification Disabled for FlyAI Requests## Vulnerability Details **File Location**: `skill.md`, lines 73 and 78–125 **Vulnerability Type**: TLS certificate validation bypass **Risk Level**: Medium The skill explicitly recommends setting `NODE_TLS_REJECT_UNAUTHORIZED=0` and includes this setting in every FlyAI command example. ```bash NODE_TLS_REJECT_UNAUTHORIZED=0 flyai search-hotels \ --dest-name "[destination]" \ --check-in-date [check-in date] \ --check-out-date [check-out date] \ --max-price [budget limit] \ --sort rate_desc ``` The same environment variable is applied to the documented `search-poi` and `search-flight` commands at lines 101–125. ### Technical Analysis `NODE_TLS_REJECT_UNAUTHORIZED=0` instructs Node.js to accept TLS certificates without validating their trust chain or hostname. Consequently, the client cannot reliably authenticate the remote FlyAI endpoint. Although the surrounding documentation describes this as a workaround for certificate errors, the bypass is embedded directly into every example and is therefore presented as the normal execution path. Disabling verification affects the confidentiality and integrity guarantees normally supplied by TLS. Encryption may still occur, but it can terminate at an attacker-controlled endpoint presenting an arbitrary certificate. ### Attack Path 1. A user asks the agent to search for a hotel, attraction, or flight. 2. The agent executes the documented command with `NODE_TLS_REJECT_UNAUTHORIZED=0`. 3. An attacker with a network interception position, malicious proxy, compromised DNS path, or control of a relevant network gateway redirects the connection. 4. The attacker presents an untrusted certificate, which the Node.js client accepts. 5. The attacker observes travel-search parameters or modifies API responses. 6. The agent may present manipulated prices, availability, flight details, hotel data, or attraction results as legitimate FlyAI output. ### Impact Assessment ...[truncated 538 chars]
Remediation
## Remediation Suggestions - Remove `NODE_TLS_REJECT_UNAUTHORIZED=0` from every command example. - Treat certificate validation failures as fatal rather than silently bypassing them. - Repair the host's CA trust store or configure the legitimate service CA through an appropriately scoped mechanism such as `NODE_EXTRA_CA_CERTS`. - Do not disable TLS verification globally for the process. - If a private certificate authority is required, pin or explicitly trust only the intended CA certificate after securely verifying it. - Log certificate failures without exposing request secrets, and instruct the user or operator to correct the trust configuration before retrying.

T09 · Insecure Skill Coding Practices

Error
Location
skill.md:78
Finding
User-Controlled Travel Parameters Are Unsafely Interpolated into Shell Commands## Vulnerability Details **File Location**: `skill.md`, lines 78–83, 101–103, 109–111, and 119–125 **Vulnerability Type**: Shell command injection **Risk Level**: High The skill directs the agent to substitute user-derived destination, keyword, date, price, and city values into shell command templates: ```bash NODE_TLS_REJECT_UNAUTHORIZED=0 flyai search-hotels \ --dest-name "[destination]" \ --check-in-date [check-in date] \ --check-out-date [check-out date] \ --max-price [budget limit] \ --sort rate_desc ``` Additional vulnerable templates include: ```bash NODE_TLS_REJECT_UNAUTHORIZED=0 flyai search-poi \ --city-name "[destination]" \ --keyword "[attraction keyword]" ``` ```bash NODE_TLS_REJECT_UNAUTHORIZED=0 flyai search-flight \ --origin "{origin city}" \ --destination "{destination}" \ --dep-date {departure date} \ --back-date {return date} \ --journey-type {1=direct flight/omit for connections} \ --sort-type 3 ``` ### Technical Analysis The templates do not require strict validation or shell-safe argument handling before inserting values derived from user messages. Several arguments are unquoted. Values placed inside double quotes are also not fully safe because POSIX-compatible shells still evaluate command substitutions such as `$(command)` and backtick expressions inside double-quoted strings. If an agent performs direct textual substitution and passes the resulting command to a shell, shell metacharacters can alter command boundaries or initiate command substitution. Merely wrapping free-form input in double quotes is not a sufficient defense. Dates, prices, and journey types have expected structured formats, but the skill does not instruct the runtime to parse and validate them before command construction. Destination and attraction names are free-form text and consequently present an especially relevant injection surface. ### Attack Path 1. An attack ...[truncated 1557 chars]
Remediation
## Remediation Suggestions - Do not construct a shell command by concatenating or interpolating user-controlled strings. - Invoke `flyai` through a process API that accepts an executable and an argument array, with shell processing explicitly disabled. - Validate check-in, check-out, departure, and return dates using strict `YYYY-MM-DD` parsing and reject invalid or impossible dates. - Parse price limits as bounded non-negative numeric values rather than preserving raw user text. - Restrict journey type, sort type, star ratings, and similar options to explicit allowlisted values. - Apply length limits and appropriate character validation to city and attraction names. Validation should complement, not replace, argument-array execution. - Never rely solely on single or double shell quoting as an injection defense. - If shell execution is unavoidable, use a well-tested escaping library for every argument and reject control characters, command substitutions, separators, and redirection operators. - Add tests using adversarial values containing semicolons, newlines, `$()`, backticks, pipes, redirections, quotes, and leading option characters. - Consider using `--` before positional user-controlled values where supported to prevent option injection.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (10)

Natural-Language Policy Violations

High
Confidence
98% confidence
Finding
The description says “全程中文,” which forces a specific language regardless of the user’s preference. This is a natural-language policy issue because the skill does not offer language choice or require explicit user opt-in for Chinese-only interaction.

Natural-Language Policy Violations

High
Confidence
99% confidence
Finding
The line explicitly instructs the agent to reply in Simplified Chinese for the entire interaction. There is no opt-in, fallback, or documented justification for restricting language/locale, so this violates the language-choice policy.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The description lists triggers such as “帮我规划” and “只有大概预算/假等”, which are broad phrases that can occur in ordinary conversation outside this travel skill’s intended scope. The file does not provide exclusion conditions or negative examples to narrow when these phrases should and should not activate the skill.

Vague Triggers

Medium
Confidence
93% confidence
Finding
Patterns like “帮我规划”, “推荐.*地方”, and “想去.*玩” are ambiguous and may match many non-travel requests or casual statements. Because the manifest does not define a narrow activation context or explicit non-matches, these patterns risk accidental invocation.

Context-Inappropriate Capability

Medium
Confidence
99% confidence
Finding
The skill explicitly instructs operators to disable TLS certificate validation via NODE_TLS_REJECT_UNAUTHORIZED=0 before invoking networked CLI commands. This enables man-in-the-middle attacks and makes all returned hotel, POI, or flight data untrustworthy, which is especially risky because the skill is designed to act on external travel data.

Unsafe Defaults

Medium
Category
Tool Misuse
Content
在至少具备 **目的地城市名、入住/离店日期、出发城市(查机票时)** 后再执行。用户未指定景点时,可用 `search-poi` 的热门档位作参考。

**SSL**:若遇证书校验失败,在命令前加环境变量:`NODE_TLS_REJECT_UNAUTHORIZED=0`(仅作绕过手段,知悉安全风险)。

### Step 1:搜索酒店
Confidence
99% confidence
Finding
Setting NODE_TLS_REJECT_UNAUTHORIZED=0 disables TLS certificate verification globally for the invoked Node-based client. This weakens transport security and allows attackers on the network path to intercept or tamper with API responses consumed by the skill.

Unsafe Defaults

Medium
Category
Tool Misuse
Content
### Step 1:搜索酒店

```bash
NODE_TLS_REJECT_UNAUTHORIZED=0 flyai search-hotels \
  --dest-name "[目的地]" \
  --check-in-date [入住日期] \
  --check-out-date [离店日期] \
Confidence
99% confidence
Finding
The hotel search example normalizes insecure behavior by embedding NODE_TLS_REJECT_UNAUTHORIZED=0 directly in the command users are expected to copy. This increases the likelihood that insecure transport becomes standard operational practice.

Unsafe Defaults

Medium
Category
Tool Misuse
Content
用户指定关键词时:

```bash
NODE_TLS_REJECT_UNAUTHORIZED=0 flyai search-poi \
  --city-name "[目的地]" \
  --keyword "[景点关键词]"
```
Confidence
99% confidence
Finding
The POI search example also disables TLS verification, extending the insecure pattern across external data lookups. Repetition in multiple commands increases systemic exposure and trains operators to ignore certificate failures.

Unsafe Defaults

Medium
Category
Tool Misuse
Content
用户未指定时,用热门参考:

```bash
NODE_TLS_REJECT_UNAUTHORIZED=0 flyai search-poi \
  --city-name "[目的地]" \
  --poi-level 5
```
Confidence
99% confidence
Finding
This second POI example repeats the unsafe default, making insecure transport the documented norm even for generic hot-list searches. An attacker could spoof destination content or manipulate results returned to users.

Unsafe Defaults

Medium
Category
Tool Misuse
Content
单日查询示例:

```bash
NODE_TLS_REJECT_UNAUTHORIZED=0 flyai search-flight \
  --origin "{出发城市}" \
  --destination "{目的地}" \
  --dep-date {出发日期} \
Confidence
99% confidence
Finding
The flight search command includes the same TLS-bypass setting, exposing fare and itinerary queries to interception or tampering. Because travel planning decisions may depend on pricing and routing data, manipulated responses can directly mislead users and downstream automation.

Static analysis

No suspicious patterns detected.