Back to skill

Security audit

중국 항공권 예약

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to be a real China travel assistant, but it needs Review because it sends user travel queries through a hardcoded third-party proxy credential instead of the declared configurable environment settings.

Review before installing. This skill does not show local system takeover or persistence, but using it means your travel searches and related preferences are sent to a specific external proxy, and the packaged source exposes a shared proxy token that should be rotated and moved to runtime configuration.

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

Warning
Location
scripts/china_travel.py:23
Finding

Hard-Coded Proxy Authentication Token

Content
View full analysis

Vulnerability Details

File Location: scripts/china_travel.py, lines 23–24 and 28–40
Vulnerability Type: Hard-coded secret in distributed source code
Risk Level: Medium

Vulnerable Code

python
PROXY_URL = "https://1439498936-eu423jdjnd.ap-guangzhou.tencentscf.com"
PROXY_TOKEN = "tp_8k2mX9vQ4z"


def query_tripgenie(query, locale="en", command_type="hotel"):
    """Query via SCF proxy (token injected server-side, affiliate links auto-injected)."""
    payload = {"query": query, "locale": locale, "command_type": command_type}
    data = json.dumps(payload).encode("utf-8")
    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

The source code embeds a reusable proxy authentication token and sends it in the X-Proxy-Token header with every request. Any person able to download or inspect the skill can recover this credential without executing the program.

The skill manifest declares PROXY_URL and PROXY_TOKEN as environment-based configuration, but the implementation uses constants instead. This prevents secure per-deployment configuration and credential rotation. HTTPS protects the token while in transit but does not mitigate its disclosure in the distributed source code.

The exact authorization granted by the token cannot be established from the reviewed files. Exploitation is therefore limited to whatever operations the remote proxy permits for this credential.

Attack Path

  1. An attacker downloads or otherwise obtains the published skill package.
  2. The attacker opens scripts/china_travel.py and extracts PROXY_URL and PROXY_TOKEN.
  3. The attacker constructs an HTTPS POST request to the exposed proxy endpoint.
  4. The attacker supplies the recovered value in the X-Proxy-Token header and submits ...[truncated 864 chars]
Remediation
View remediation

Remediation Suggestions

  1. Immediately revoke and rotate the exposed proxy token.
  2. Remove the token and endpoint constants from source control and published artifacts.
  3. Load configuration from the environment variables already declared by the skill:
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")
  1. Store the replacement credential in an approved secret manager and inject it only at runtime.
  2. Use short-lived, narrowly scoped credentials rather than one static shared token.
  3. Enforce server-side authorization, per-client quotas, rate limiting, request validation, monitoring, and credential-revocation controls. Do not treat possession of a publicly distributed client token as strong authentication.
  4. Review proxy logs for prior misuse of the exposed token while avoiding storage of sensitive user query content.
  5. Add automated secret scanning to source-control and release pipelines to prevent future credential publication.
  6. Ensure the rotated token is removed from repository history and cached release artifacts where feasible; history cleanup does not replace revocation.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

The skill description presents a narrowly scoped China flight booking assistant, but the behavior described by analysis indicates a more general travel-query proxy client. Scope mismatch is security-relevant because users and reviewers may disclose data or approve execution under a false assumption of limited functionality, while the skill can send broader queries to an external service than advertised.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill declares only the bash tool and no explicit tool scope or network permission, yet the documented behavior clearly involves sending user queries to a proxy server and onward to an external API. This creates a transparency and governance gap: reviewers and runtime policy may not accurately understand that user-provided travel data is leaving the local environment, which can undermine consent, auditing, and sandbox restrictions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

Forcing --locale=ko without user opt-in reduces user control and can cause misleading or inaccessible output for users expecting another language. In security terms this is lower severity, but it can still contribute to consent and usability issues, especially if users cannot accurately review booking details, prices, or conditions returned by an external service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script sends user-provided travel queries, including destinations, dates, budgets, and preferences, to a third-party remote proxy service without any visible notice, consent flow, or minimization. In a travel context this can expose sensitive behavioral and personal data to an external operator, and the hardcoded proxy architecture makes the data transfer easy to miss for users and deployers.

Content

No source excerpt is available for this finding.