Back to skill

Security audit

中国旅行プランナー

Security checks for vulnerabilities and agentic risk

Overview

This travel skill matches its stated purpose, but it ships a reusable proxy token in source code and describes token handling inconsistently.

Review before installing. The skill sends travel queries to a remote proxy and may return affiliate booking links, which is disclosed and fits the product. The main issue is operational trust: the package exposes a reusable proxy token and its documentation implies safer server-side token handling than the code performs. The publisher should rotate the token and load credentials from a secure environment or platform secret before this is treated as low risk.

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 (1)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/china_travel.py:24
Finding

Hardcoded Proxy Authentication Token

Content
View full analysis

Vulnerability Details

File Location: scripts/china_travel.py, lines 24–25 and 34–39
Vulnerability Type: Hardcoded reusable authentication credential
Risk Level: High

Vulnerable Code

python
PROXY_URL = "https://1439498936-eu423jdjnd.ap-guangzhou.tencentscf.com"
PROXY_TOKEN = "tp_8k2mX9vQ4z"
python
req = urllib.request.Request(
    PROXY_URL, data=data,
    headers={
        "Content-Type": "application/json",
        "X-Proxy-Token": PROXY_TOKEN,
        "User-Agent": "ChinaTravel/2.0",
    },
    method="POST"
)

Technical Analysis

A reusable proxy authentication token is embedded directly in distributed source code and sent in the X-Proxy-Token request header. Anyone with access to the Skill package can recover both the service endpoint and credential without executing the script.

Although SKILL.md declares PROXY_URL and PROXY_TOKEN as environment variables, the implementation does not read them. It always uses the hardcoded values. HTTPS protects the token while in transit but does not mitigate its disclosure in source code.

An attacker can use the exposed credential outside the intended Skill workflow to submit authenticated requests directly to the proxy. The exact server-side authorization scope cannot be determined from the audited files, so access beyond what the proxy grants to this token is not established.

Attack Path

  1. Download or otherwise obtain the published Skill package.
  2. Inspect scripts/china_travel.py.
  3. Extract the fixed Tencent SCF endpoint and PROXY_TOKEN.
  4. Construct an HTTPS POST request to the endpoint with the stolen value in the X-Proxy-Token header.
  5. Submit attacker-controlled JSON requests using the exposed proxy authorization.
  6. Continue using the credential until it is revoked, rotated, rate-limited, or rejected by the server.

Impact Assessment

Successful exploitation may allow unauthorized use of the proxy and its downstream TripGenie API access. Potent ...[truncated 611 chars]

Remediation
View remediation

Remediation Suggestions

  1. Immediately revoke and rotate the exposed token; removing it from the source alone is insufficient because published copies may retain it.
  2. Load configuration from environment variables as declared in SKILL.md, and fail closed if either value is missing:
python
import os

PROXY_URL = os.environ.get("PROXY_URL")
PROXY_TOKEN = os.environ.get("PROXY_TOKEN")

if not PROXY_URL or not PROXY_TOKEN:
    raise RuntimeError("PROXY_URL and PROXY_TOKEN must be configured securely")
  1. Supply the token through the platform’s secret-management facility rather than source files, package metadata, command-line arguments, or logs.
  2. Restrict the replacement token to the minimum necessary proxy operations and downstream API scope.
  3. Apply server-side rate limits, request validation, quotas, expiration, and credential rotation.
  4. Monitor proxy logs for use of the disclosed token and investigate anomalous requests, quota consumption, and affiliate activity.
  5. Prevent recurrence with secret scanning in pre-commit hooks and CI/CD, including repository history and packaged release artifacts.
  6. Consider replacing static shared tokens with short-lived, per-installation or per-session credentials where supported.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (7)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill declares only tools: - bash and does not explicitly constrain or disclose its network/tool scope, yet its documented behavior depends on outbound network access via a proxy and external API. This weakens least-privilege controls and can lead to overbroad execution capability, making unintended external requests or data egress harder to govern and audit.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The markdown explicitly instructs the skill to always include --locale=ja and return results in Japanese. This imposes a specific language choice regardless of the user's preference, which is a natural-language policy violation under the language/locale rule.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

User travel queries are sent to a remote proxy without any visible user-facing notice in the skill about external transmission. Travel queries can contain sensitive itinerary, location, companion, budget, or date information, so undisclosed forwarding increases privacy and compliance risk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The docstring explicitly states that affiliate links are auto-injected by the proxy, but the skill metadata only describes travel-planning features and does not disclose monetized link injection. That creates a transparency and trust problem: users may believe results are neutral recommendations when the backend may bias output toward affiliate revenue.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The comment claims tokens are injected server-side, yet the client sends a hardcoded proxy token in the request header. Embedding secrets in distributed client code exposes the token to anyone with code access, enabling unauthorized use of the proxy, abuse of paid backend services, or impersonation of the skill.

Content

No source excerpt is available for this finding.

Ssd 2

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The tips mode returns the user's question unchanged, and that text is later sent directly to the remote service. Because there is no semantic constraint or templating around this mode, indirect or creatively phrased prompt-injection content can reach the downstream model even when it avoids obvious keywords.

Content

No source excerpt is available for this finding.

Ssd 4

Medium
Category
Not specified by scanner
Confidence
66% confidence
Finding

The cross-feature guidance repeatedly encourages users of structured modes to switch into the open-ended tips mode, where arbitrary natural-language input is accepted. Individually these prompts look harmless, but cumulatively they create an escalation path from constrained travel functions to a less constrained channel that can carry malicious semantic instructions.

Content

No source excerpt is available for this finding.