Back to skill

Security audit

高德×飞猪·一句话订酒店

Security checks for vulnerabilities and agentic risk

Overview

The hotel-search workflow fits its purpose, but it sends your API key and destination searches over an unencrypted connection.

Before using this version, verify who operates the POI service and require an authenticated HTTPS integration. Supply only a key issued for that service, and rotate any key already used over this HTTP connection. The artifacts support a transport-security concern, without establishing deliberate credential theft.

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
travel_agent.py
Finding

API key transmitted in plaintext over HTTP

Content
View full analysis

Impact

An observer can capture the API key and replay it against the POI service within that key's privileges. Search locations are also exposed, and an active intermediary can alter returned POI data.

Vulnerability Patterns
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (5)

Tainted flow: 'req' from os.environ.get (line 26, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
99% confidence
Finding

The skill sends GAODE_POI_KEY in an X-API-Key header to a hardcoded IP address over unencrypted HTTP, exposing the credential and destination queries to network observers. An on-path attacker can also alter POI responses and influence subsequent hotel searches; sending an API credential to its intended service is normal, but this transport provides neither confidentiality nor server authentication, and the endpoint's ownership is not established by the code.

Content

Scanner excerpt · travel_agent.py (reported line 27)May include surrounding context.

python
def gaode_get(path, params, key):
    url = GAODE_BASE + path + "?" + urllib.parse.urlencode(params)
    req = urllib.request.Request(url, headers={"X-API-Key": key})
    with urllib.request.urlopen(req, timeout=15) as r:
        return json.loads(r.read())

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, network, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Missing warning that POI lookups send location queries and an API key to an unencrypted external endpoint.

Medium
Category
Output Handling
Confidence
99% confidence
Finding

The documented POI endpoint uses plain HTTP and receives location queries and an X-API-Key header, exposing both to network observers and allowing an active intermediary to modify responses. Sending destination queries is expected for this skill, but unencrypted transport is not necessary; keeping the key out of files does not protect it in transit, and the documentation does not warn users of this exposure.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · travel_agent.py (reported line 55)May include surrounding context.

python
cmd += ["--hotel-stars", stars]
    if max_price:
        cmd += ["--max-price", str(max_price)]
    res = subprocess.run(cmd, capture_output=True, text=True, timeout=45)
    if res.returncode != 0:
        sys.stderr.write(res.stderr)
        sys.exit(res.returncode)

Tainted flow: 'cmd' from os.environ.get (line 47, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · travel_agent.py (reported line 55)May include surrounding context.

python
cmd += ["--hotel-stars", stars]
    if max_price:
        cmd += ["--max-price", str(max_price)]
    res = subprocess.run(cmd, capture_output=True, text=True, timeout=45)
    if res.returncode != 0:
        sys.stderr.write(res.stderr)
        sys.exit(res.returncode)

Static analysis

No suspicious patterns detected.