Back to skill

Security audit

mt-travel-ai

Security checks for vulnerabilities and agentic risk

Overview

The skill provides a plausible travel assistant, but it asks users to send an API token in chat, stores it as plaintext, and installs an unpinned global CLI.

Install only if you are comfortable with the agent receiving a Meituan developer token in the chat transcript, saving it locally in plaintext, and running a globally installed npm CLI. Prefer a version-pinned or sandboxed CLI and a secure secret-entry/storage mechanism before using this with a real token.

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)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:60
Finding
Sensitive API Token Collection Through Chat and Insecure Plaintext Storage## Vulnerability Details **File Location**: `SKILL.md`, lines 60 and 66–74; the same insecure update pattern is repeated at lines 96–113 **Vulnerability Type**: Sensitive credential exposure and insecure local secret storage **Risk Level**: High ### Vulnerable Code ```bash mkdir -p ~/.config/meituan-travel cat > ~/.config/meituan-travel/config.json << 'EOF' { "key": "<user-provided-token>" } EOF ``` The surrounding instructions require the user to send the token to the agent through the conversation so that it can be inserted into this file. The token-replacement flow repeats the same behavior for newly issued tokens. ### Technical Analysis The skill treats an API token as conversational input. Consequently, the plaintext credential may enter chat transcripts, agent execution logs, telemetry, support records, or backups outside the user's direct control. This conflicts with the document's own statement that the token is a highly sensitive credential. The token is subsequently written as plaintext to `~/.config/meituan-travel/config.json`. Although the parent directory is created first, neither the directory nor the file is assigned an explicit restrictive permission mode. The resulting permissions depend on the process umask and existing filesystem state. On a permissively configured or shared system, another local account or process may be able to read the credential. The shell redirection also replaces the destination directly rather than using a securely created temporary file followed by an atomic rename. Existing files or symbolic links are not validated before replacement, creating additional risk when the configuration path can be manipulated by another local actor. ### Attack Path 1. A user follows the skill instructions and sends a valid API token as a plaintext chat message. 2. The token is retained in conversation history, execution telemetry, or another logging system. 3. An actor with ...[truncated 1113 chars]
Remediation
## Remediation Suggestions 1. Do not request API tokens through normal chat messages. 2. Use a dedicated secret-entry interface that masks input and excludes values from transcripts, telemetry, and logs. 3. Prefer an operating-system credential store or managed secret service instead of a plaintext JSON file. 4. If file storage is unavoidable, create the directory with mode `0700` and the credential file with mode `0600`. 5. Create the file securely and atomically, reject symbolic links, and validate file ownership before reading or replacing it. 6. Ensure the CLI and agent never print the token in command output, diagnostics, or exception messages. 7. Provide token revocation and rotation guidance, especially after accidental disclosure. 8. Minimize token permissions, scope, and lifetime so that compromise has limited impact.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:131
Finding
Unpinned Global npm Package Installation Creates a Supply-Chain Execution Risk## Vulnerability Details **File Location**: `SKILL.md`, line 131 **Vulnerability Type**: Unpinned third-party dependency installed globally **Risk Level**: Medium ### Vulnerable Code ```bash npm i -g @meituan-travel/travel-cli ``` ### Technical Analysis The installation command does not specify an audited package version, lockfile, or integrity hash. It therefore resolves whichever release is tagged as current in the npm registry at installation time. The effective code installed by the skill can change after the skill itself has been reviewed. npm packages may execute lifecycle scripts during installation. If the publisher account, registry path, package release process, or a transitive dependency is compromised, malicious code could run immediately during installation. Global installation increases the affected scope by placing the executable in a shared command search path and may require elevated permissions on some systems. The audit found no evidence that the named package is currently malicious. The vulnerability is the unsafe and mutable dependency-installation process. ### Attack Path 1. An attacker compromises the package publisher, release pipeline, registry entry, or a dependency included in a future release. 2. The attacker publishes a malicious version under the same package name or causes the default npm tag to resolve to the compromised release. 3. A user follows the documented command without a version pin or integrity check. 4. npm downloads the attacker-controlled package and may execute its lifecycle scripts during installation. 5. The installed global `mttravel` executable can subsequently run attacker-controlled logic whenever the skill invokes it. ### Impact Assessment Malicious installation or runtime code would execute with the privileges of the account running npm. It could read user-accessible files, including the plaintext travel API token, modify files, access network resources, or inst ...[truncated 320 chars]
Remediation
## Remediation Suggestions 1. Pin the CLI to a specific reviewed version rather than installing the mutable latest release. 2. Verify the package artifact using an approved integrity hash, signature, or trusted internal registry. 3. Review and lock all transitive dependencies. 4. Avoid global installation; install the package in an isolated, least-privilege environment dedicated to the skill. 5. Disable npm lifecycle scripts where compatible, or explicitly review every required lifecycle script. 6. Do not use administrative privileges for installation or execution. 7. Validate the resolved executable path and package provenance before invoking `mttravel`. 8. Establish a controlled update process that repeats security review before changing the pinned version.
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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
Findings (10)

Ssd 3

High
Confidence
99% confidence
Finding
The skill explicitly instructs the assistant to request a user's API token in chat and persist it locally for later use. This is a direct secret-handling anti-pattern: it captures a sensitive credential through an insecure channel and stores it in a predictable filesystem location, increasing the risk of theft, misuse, and long-term exposure.

Intent-Code Divergence

High
Confidence
99% confidence
Finding
The document contradicts itself by first instructing the user to send the token in chat, then later stating that the token must never be printed in conversation. This inconsistency normalizes unsafe secret handling and is likely to cause users to disclose highly sensitive credentials through the conversation channel, where they may be retained, logged, or exposed.

Credential Access

High
Category
Privilege Escalation
Content
- "无效的访问令牌"
- "Token"
- "未设置"
- "access token"
- "key"

**必须立即执行以下步骤:**
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Ssd 3

High
Confidence
99% confidence
Finding
The token refresh flow repeats the same insecure pattern by asking the user to send a replacement secret through the conversation and then overwrite the local config with it. Repeated collection of credentials in chat broadens the attack surface and encourages unsafe user behavior around secret sharing.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill asks the user to provide an API token directly in the conversation without a prior security warning or a safer alternative. Collecting high-value credentials in chat creates avoidable exposure through transcript retention, model processing, support access, and accidental re-disclosure.

Context-Inappropriate Capability

Medium
Confidence
97% confidence
Finding
The skill instructs the agent to create and overwrite a credential file in the user's home directory, which is unnecessary and risky for a travel-assistance skill. Writing secrets to persistent local storage can expose credentials to other local processes, backups, logs, or future unintended reuse, and overwriting config files may damage existing settings.

Session Persistence

Medium
Category
Rogue Agent
Content
收到 Token 后,执行以下命令将其保存至 `config.json`:

```bash
mkdir -p ~/.config/meituan-travel
cat > ~/.config/meituan-travel/config.json << 'EOF'
{
  "key": "<用户提供的token>"
Confidence
92% confidence
Finding
This duplicate finding reflects the same behavior: saving the token to a persistent config file for future sessions. In the context of a travel skill, retaining secrets locally is unnecessary for core functionality and increases the blast radius if the endpoint or account is compromised.

Session Persistence

Medium
Category
Rogue Agent
Content
收到 Token 后,执行以下命令将其保存至 `config.json`:

```bash
mkdir -p ~/.config/meituan-travel
cat > ~/.config/meituan-travel/config.json << 'EOF'
{
  "key": "<用户提供的token>"
Confidence
92% confidence
Finding
This duplicate finding reflects the same behavior: saving the token to a persistent config file for future sessions. In the context of a travel skill, retaining secrets locally is unnecessary for core functionality and increases the blast radius if the endpoint or account is compromised.

Context-Inappropriate Capability

Medium
Confidence
93% confidence
Finding
The skill directs installation and execution of a global npm CLI, which expands the assistant's capabilities beyond answering travel queries into software installation and arbitrary local command execution. This increases supply-chain and host-integrity risk because a compromised package or unsafe CLI behavior could execute on the user's machine with the user's privileges.

Natural-Language Policy Violations

Medium
Confidence
81% confidence
Finding
The instructions require the agent to 'ignore channel differences' and strictly use a prescribed markdown output mode, including a special WeChat-only handling path, without offering the user a choice. This is a natural-language policy concern because it forces one presentation/locale behavior rather than allowing user preference or opt-in.

Static analysis

No suspicious patterns detected.