Back to skill

Security audit

ISBN图书查询 - 即刻数据

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent ISBN lookup tool, but it has an undocumented API endpoint override that could send the user's API key to an unintended server.

Review this before installing if you will use a real Jike AppKey. The skill's normal behavior is to send the ISBN and AppKey to Jike's API, but the script also honors an undocumented JIKE_API_BASE_URL variable; only run it in an environment where that variable cannot be set by untrusted code, and avoid passing the key with --key because command-line arguments may be exposed locally.

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/book_isbn_query.py:22
Finding

Environment-Controlled API Endpoint Can Disclose the AppKey

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • 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 (6)

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

Critical
Category
Data Flow
Confidence
90% confidence
Finding

The request URL is built from API_BASE_URL, which is sourced from the environment and then passed directly to urllib.request.urlopen. If an attacker can influence environment variables in the agent runtime, they can redirect requests and the included appkey to an arbitrary host, causing credential exfiltration or unintended outbound access. In this skill context, the danger is somewhat reduced because this is a simple ISBN lookup client, but it still transmits a secret in the query string to a user-controlled endpoint when JIKE_API_BASE_URL is overridden.

Content

Scanner excerpt · scripts/book_isbn_query.py (reported line 111)May include surrounding context.

python
params = {"isbn": isbn, "appkey": appkey}
    url = f"{API_BASE_URL}{API_PATH}?{urllib.parse.urlencode(params)}"
    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": ""}

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/book_isbn_query.py (reported line 48)May include surrounding context.

python
env_value = os.environ.get(env_name, "").strip()
        if env_value:
            return env_value
    env_file = Path(__file__).parent / ".env"
    if not env_file.exists():
        return ""
    for line in env_file.read_text(encoding="utf-8").splitlines():

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill declares executable behavior that uses environment variables, file access, and network access, but it does not explicitly declare any tool scope or permissions. This creates an authorization and transparency gap: a host agent may permit broader capabilities than intended, and reviewers or users cannot clearly see what resources the skill is expected to access.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 33)May include surrounding context.

md
"title": "ISBN图书查询 - 即刻数据",
  "description": "输入 ISBN-10 或 ISBN-13,查询书名、作者、译者、出版社、出版日期、页数、定价、装帧、丛书和封面等信息。",
  "env": "JIKE_BOOK_ISBN_QUERY_KEY",
  "api_url": "https://api.jikeapi.cn/v1/book/isbn/query",
  "homepage": "https://www.jikeapi.cn/"
}

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · _meta.json (reported line 8)May include surrounding context.

json
"title": "ISBN图书查询 - 即刻数据",
  "description": "输入 ISBN-10 或 ISBN-13,查询书名、作者、译者、出版社、出版日期、页数、定价、装帧、丛书和封面等信息。",
  "env": "JIKE_BOOK_ISBN_QUERY_KEY",
  "api_url": "https://api.jikeapi.cn/v1/book/isbn/query",
  "homepage": "https://www.jikeapi.cn/"
}

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code file contains natural-language documentation and CLI messages entirely in Chinese, and the script does not offer any locale or language selection. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.