Back to skill

Security audit

중국 관광지 티켓

Security checks for vulnerabilities and agentic risk

Overview

This travel skill is not clearly malicious, but it should be reviewed because it sends user travel queries to a hardcoded proxy using an embedded authentication token.

Review before installing. The skill appears designed for China travel search and does not show local persistence or destructive behavior, but it sends your travel queries to a fixed external proxy and ships with an embedded proxy token. Avoid entering sensitive personal details, and the publisher should rotate the token and move proxy credentials into a protected 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

Error
Location
scripts/china_travel.py:24
Finding

Hard-Coded Proxy Authentication Token

Content
View full analysis

Vulnerability Details

File Location: scripts/china_travel.py, lines 24–25 and 32–39
Vulnerability Type: Hard-coded authentication credential
Risk Level: High

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 the associated service URL directly in the distributed Python script. Anyone with access to the skill package can recover the credential without executing the program.

This contradicts the environment-variable declaration in SKILL.md, which lists PROXY_URL and PROXY_TOKEN as configuration values. Because the implementation never reads those variables, normal secret-management controls cannot protect or rotate the credential independently of the published package.

The token is transmitted over HTTPS, which protects it in transit under normal TLS assumptions, but does not mitigate disclosure from source code. The audit did not test the external service or attempt to validate the token, so its current validity and exact server-side authorization scope are unknown.

Attack Path

  1. An attacker downloads or otherwise obtains the published skill package.
  2. The attacker inspects scripts/china_travel.py and extracts PROXY_URL and PROXY_TOKEN.
  3. The attacker constructs POST requests to the disclosed proxy URL.
  4. The attacker p ...[truncated 1203 chars]
Remediation
View remediation

Remediation Suggestions

  1. Revoke and rotate the exposed token immediately. Treat it as compromised because it has been distributed in source code.
  2. Remove both the token and environment-specific endpoint from the script:
    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")
    
  3. Supply secrets through an approved runtime secret manager or protected environment injection mechanism. Do not commit real fallback credentials.
  4. Use short-lived, narrowly scoped credentials rather than a static shared token.
  5. Enforce server-side authorization by operation and validate command_type, request size, query content, and supported locales.
  6. Add per-token and per-source rate limits, quotas, anomaly detection, and abuse alerting.
  7. Ensure logs redact the X-Proxy-Token header and other authentication data.
  8. Establish a credential-rotation process and invalidate credentials used by obsolete skill versions.
  9. Add automated secret scanning to source-control and release pipelines to prevent future embedded credentials.
  10. Update documentation so the declared environment-variable configuration matches the implementation.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill exposes code execution capability via a bash tool and explicitly describes sending user queries through a proxy to an external API, but it does not declare a restrictive tool scope such as permissions or allowed-tools. This creates a governance gap: an agent may be allowed broader networked execution than the skill contract makes explicit, increasing the chance of unintended outbound requests or abuse if the script or future edits expand behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The instruction to always include --locale=ko forces Korean output regardless of the user's stated language preference. While not a direct code-execution issue, it can override user intent, reduce transparency, and create opportunities for confusion or misrepresentation in multilingual interactions, especially if the user cannot validate the returned travel or booking information.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest description centers on finding top tourist attractions in China with ticket prices, opening hours, and Trip.com booking links, while this file exposes five separate modes including hotel search, flight search, itinerary planning, and arbitrary travel questions. Those additional capabilities materially broaden the skill beyond the attraction-focused scope stated in the manifest.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script transmits user-supplied travel queries, which may include itinerary details, dates, cities, and preferences, to an external proxy service without any explicit user-facing disclosure or consent flow. This creates a privacy and data-handling risk because users may reasonably believe they are interacting locally or only with the advertised provider, while their data is actually sent to a third-party proxy with a hardcoded authentication token.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
74% confidence
Finding

The manifest presents a focused tourism-discovery skill, but the implementation sends free-form queries and command types to an external proxy service that can answer hotels, flights, itineraries, and tips. This indicates the actual behavior depends on a more general backend than the narrow attraction-ticket-hours-booking description suggests.

Content

No source excerpt is available for this finding.