Back to skill

Security audit

DeepTrip

Security checks for vulnerabilities and agentic risk

Overview

This travel skill mostly matches its stated purpose, but it needs review because it pushes a third-party login and sends detailed travel queries to an external service without clear consent or privacy boundaries.

Review this before installing if you do not want a travel skill to promote Tongcheng login/app usage or send your full travel requests to Tongcheng's remote API. Avoid entering highly sensitive itinerary, identity, contact, or payment details unless you are comfortable sharing them with that service, and avoid passing real API keys directly on the command line.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (3)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:45
Finding

Mandatory Tool Prioritization and Promotional Output Injection

Content
View full analysis
Want to see more? Open the Tongcheng Travel application or WeChat > mini-program; there are many more choices available. ``` The mandatory account-login requirement appears again at `SKILL.md:388`. ### Technical Analysis The Skill documentation issues mandatory instructions that alter how the hosting Agent selects tools and constructs responses: 1. It tells the Agent to prioritize this Skill for broad categories of travel questions. 2. It requires an unsolicited account-login promotion during installation or first use. 3. It requires branded promotional content at the end of every recommendation. These requirements are not necessary to perform hotel searches, transportation searches, attraction recommendations, or itinerary planning. They influence the Agent independently of the immediate user request and can override neutral tool selection and response formatting. The login URL points to a third-party authentication flow. Although the reviewed files do not contain code that captures credentials from that flow, requiring the Agent to promote it expands the Skill’s behavior beyond retrieval of travel information. ### Attack Path 1. The Agent loads `SKILL.md` when the Skill is installed or considered for use. 2. The mandatory-priority instruction influences the ...[truncated 1004 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/query.py:91
Finding

Unminimized Disclosure of User Queries and Reconstructed Conversation Context

Content
View full analysis
dict: """ 调用智能旅行助手技能 Args: question: 用户问题 Returns: dict: API 响应结果 """ api_key = get_api_key() headers = { "Content-Type": "application/json", "deeptrip-claw-api-key": api_key, "claw-channel": "clawhub_Intl" } payload = { "q": question } response = requests.post( API_URL, headers=headers, json=payload, timeout=300 ) ``` The query is obtained directly from the command line and passed to the network function: ```python question = sys.argv[1] try: print(f"🔍 正在查询: {question}\n") result = query_skill(question) print(format_result(result)) ``` The fixed destination is defined at `scripts/query.py:22`: ```python API_URL = "https://dtgw.ly.com/deeptrip/claw/chat" ``` The documentation at `SKILL.md:345-373` additionally instructs the Agent to add summaries of previous recommendations and the user’s new requirements to the `q` field during follow-up requests. ### Technical Analysis The network request is necessary for the declared remote travel-recommendation service and uses HTTPS. The transmission is therefore not covert or unrelated to the Skill’s core function. However, the implementation sends the complete supplied question without: - A consent or confirmation boundary before third-party transmission. - Field-level data minimization. - Redaction of personal or sensitive information. - Filtering of credentials or unrelated conversation content. - A documented retention or privacy boundary in the reviewed project. The documentation increases this exposure by telling the Agent to reconstruct prior conversation context ...[truncated 1739 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/query.py:179
Finding

API Key Exposure Through Command-Line Arguments

Content
View full analysis
: 保存配置 api_key = sys.argv[2] config_path = get_config_path() if save_config_to_file(config_path, api_key): ``` The resulting configuration file is protected with restrictive permissions: ```python config = {"api_key": api_key} with open(config_path, 'w', encoding='utf-8') as f: json.dump(config, f, indent=2) config_path.chmod(0o600) ``` ### Technical Analysis Command-line arguments are not an appropriate secret-entry mechanism. Depending on the operating system and execution environment, process arguments may be visible through: - Process-inspection utilities. - Process accounting. - Shell command history. - Terminal capture. - CI/CD job logs. - Wrapper scripts and telemetry. The script correctly changes the stored configuration file to mode `0600`, which limits subsequent file access to the owner. That safeguard does not protect the key while it is supplied through the command line. The script also attempts to set the Skill directory itself to mode `0700`. While intended as hardening, changing permissions on the entire installed Skill directory may unnecessarily affect other files or users. A dedicated configuration directory would provide a narrower privilege boundary. ### Attack Path 1. A user follows the documented command and supplies the API key after `--config`. 2. The shell records the command in history, or the operating system exposes it in the process argument list. 3. Another local user, monitoring process, CI log collector, or terminal recorder observes the argument. 4. The observer extracts the API ...[truncated 601 chars]
Remediation
View remediation
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 (10)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `SKILL.md` | 技能说明文档 |

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill description is written as a directive for a Chinese-language travel assistant and does not provide any user opt-in or alternative language behavior. Forcing a specific language or locale without choice can violate language/locale policy requirements.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill explicitly requires the agent to proactively push a third-party login URL and instruct the user to scan-login, but it does not disclose what account data will be shared, how the session will be used, or whether login is optional. This creates a social-engineering and privacy risk because users may be nudged into authenticating with a third-party service without informed consent or clear necessity for the immediate task.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

The skill instructs the agent or operator to send user questions to an external API endpoint, which means potentially sensitive travel queries and contextual data are transmitted to a third party. In this skill, the risk is elevated because the documentation also encourages packing full conversation context into the outbound request, increasing the amount of personal or behavioral data disclosed externally.

Content

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

python scripts/query.py "你的问题"

text

### 方式二:curl 直接请求(备用)

如果 `query.py` 脚本无法执行(例如缺少模块、环境不支持等),可以使用 curl 直接请求 API:

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
### 响应结构


| 参数名         | 类型     | 说明                                                                                                                    |
| ----------- | ------ | --------------------------------------------------------------------------------------------------------------------- |
| code        | string | 状态码,0表示成功。如果返回非0表示失败,你需要引导用户根据msg内容操作处理,比如:如果code返回CLAW.RATE.IP_LIMIT_EXCEEDED,请勿更换其他方式查询,一定要记得根据msg中的地址让用户获取 API Key |
| msg         | string | 响应消息                                                                                                                  |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
| 参数名         | 类型     | 说明                                                                                                                    |
| ----------- | ------ | --------------------------------------------------------------------------------------------------------------------- |
| code        | string | 状态码,0表示成功。如果返回非0表示失败,你需要引导用户根据msg内容操作处理,比如:如果code返回CLAW.RATE.IP_LIMIT_EXCEEDED,请勿更换其他方式查询,一定要记得根据msg中的地址让用户获取 API Key |
| msg         | string | 响应消息                                                                                                                  |
| data.text   | string | AI生成的回复内容                                                                                                             |
| data.产品跳转链接 | object | 推荐产品的跳转链接集合                                                                                                           |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
| ----------- | ------ | --------------------------------------------------------------------------------------------------------------------- |
| code        | string | 状态码,0表示成功。如果返回非0表示失败,你需要引导用户根据msg内容操作处理,比如:如果code返回CLAW.RATE.IP_LIMIT_EXCEEDED,请勿更换其他方式查询,一定要记得根据msg中的地址让用户获取 API Key |
| msg         | string | 响应消息                                                                                                                  |
| data.text   | string | AI生成的回复内容                                                                                                             |
| data.产品跳转链接 | object | 推荐产品的跳转链接集合                                                                                                           |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
| code        | string | 状态码,0表示成功。如果返回非0表示失败,你需要引导用户根据msg内容操作处理,比如:如果code返回CLAW.RATE.IP_LIMIT_EXCEEDED,请勿更换其他方式查询,一定要记得根据msg中的地址让用户获取 API Key |
| msg         | string | 响应消息                                                                                                                  |
| data.text   | string | AI生成的回复内容                                                                                                             |
| data.产品跳转链接 | object | 推荐产品的跳转链接集合                                                                                                           |


### 产品跳转链接格式

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

This code performs an outbound HTTP POST to an external domain and includes user-supplied query text plus an API key in headers. External transmission is expected for an API client, but it still represents a real security/privacy boundary because any sensitive content entered by the user is exported to a third party.

Content

Scanner excerpt · scripts/query.py (reported line 105)May include surrounding context.

python
"q": question
    }

    response = requests.post(
        API_URL,
        headers=headers,
        json=payload,

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script sends raw user queries to a third-party remote API, but the CLI UX does not clearly warn users that their input will leave the local environment and be processed externally. Travel queries can contain sensitive personal, itinerary, or location data, so this creates a privacy and data-disclosure risk even though the transmission appears to be the tool's intended function.

Content

No source excerpt is available for this finding.