Back to skill

Security audit

汉语词语查询 - 即刻数据

Security checks for vulnerabilities and agentic risk

Overview

This is a straightforward Chinese word lookup skill that uses a Jike API key, with one configuration risk users should keep in mind.

Install this only if you intend to use Jike's API and are comfortable providing a Jike AppKey. Keep JIKE_API_BASE_URL unset unless you deliberately trust the replacement endpoint, prefer environment variables over passing the key on the command line, and avoid storing the AppKey in shared script directories.

Vulnerability Patterns
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • 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
Findings (1)

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

Critical
Category
Data Flow
Content
"""
    url = f"{API_BASE_URL}{API_PATH_MAP[command]}?{urllib.parse.urlencode({**params, 'appkey': appkey})}"
    try:
        with urllib.request.urlopen(url, timeout=15) as response:
            return json.loads(response.read().decode("utf-8"))
    except urllib.error.HTTPError as exc:
        return {"code": exc.code, "message": f"接口请求失败: HTTP {exc.code}", "data": ""}
Confidence
91% confidence
Finding
The request URL is built from JIKE_API_BASE_URL, which is taken directly from an environment variable and then passed to urlopen without validation. In an agent or hosted execution environment, an attacker who can influence environment configuration could redirect requests to an arbitrary host, causing SSRF-like behavior and exfiltration of the AppKey in the query string to an attacker-controlled endpoint.

Static analysis

No suspicious patterns detected.