Back to skill

Security audit

Bazi Chart - 八字排盘

Security checks for vulnerabilities and agentic risk

Overview

This is a straightforward Bazi chart skill that sends user-provided birth details to JisuAPI as disclosed, with privacy and credential-handling cautions but no hidden or destructive behavior found.

Install only if you are comfortable sending the entered name or alias, city, sex, and birth date/time to JisuAPI along with your JISU_API_KEY. Prefer an alias instead of a real name, restrict and rotate the API key if the provider supports it, and avoid enabling this skill for conversations where a Bazi mention should not automatically trigger an external API call.

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
bazi.py:61
Finding

API Credential Exposed in URL Query Parameters

Content
View full analysis

Vulnerability Details

File Location: bazi.py, lines 61–76
Vulnerability Type: API credential exposure through URL query parameters
Risk Level: Medium

Vulnerable Code

python
data = {
    "appkey": appkey,
    "name": name,
    "city": city,
    "year": year,
    "month": month,
    "day": day,
    "hour": hour,
    "minute": minute,
    "sex": sex,
    "islunar": req.get("islunar", 0),
    "istaiyang": req.get("istaiyang", 0),
    "islunarmonth": req.get("islunarmonth", 2),
}

try:
    resp = requests.get(PAIPAN_URL, params=data, timeout=15)

Technical Analysis

The application includes appkey in the dictionary passed to requests.get() through the params argument. The Requests library serializes these parameters into the URL query string, producing a request resembling:

text
https://api.jisuapi.com/bazi/paipan?appkey=SECRET&name=...

TLS protects the URL while it is transmitted over HTTPS, but it does not prevent the complete URL from being recorded at endpoints or intermediary infrastructure. Query strings may be retained in API gateway logs, reverse-proxy access logs, observability platforms, debugging output, monitoring systems, or server-side request records.

Consequently, personnel or attackers who gain access to those records may recover the API credential. This risk is greater than using a dedicated authorization header because URL query strings are routinely logged by default.

The same request also includes personal data such as name, city, date and time of birth, and sex. Transmission of this information to JisuAPI is disclosed in SKILL.md, so it is not an undisclosed exfiltration finding. Nevertheless, operators should ensure that request URLs containing this information are not retained unnecessarily.

Attack Path

  1. A legitimate user invokes the Skill, causing it to make an HTTPS GET request to JisuAPI.
  2. The API key is serialized into the request URL as the appkey query parameter.
  3. A ...[truncated 1252 chars]
Remediation
View remediation

Remediation Suggestions

  1. If supported by JisuAPI, transmit the credential in a dedicated authorization header rather than the URL:
python
headers = {"Authorization": f"Bearer {appkey}"}
params = {
    "name": name,
    "city": city,
    "year": year,
    "month": month,
    "day": day,
    "hour": hour,
    "minute": minute,
    "sex": sex,
    "islunar": req.get("islunar", 0),
    "istaiyang": req.get("istaiyang", 0),
    "islunarmonth": req.get("islunarmonth", 2),
}
resp = requests.get(PAIPAN_URL, headers=headers, params=params, timeout=15)
  1. If the provider supports POST requests, place sensitive parameters in the request body while retaining HTTPS. Confirm the exact authentication mechanism against the provider's official documentation.

  2. If JisuAPI requires appkey in the query string:

    • Configure clients, proxies, gateways, monitoring tools, and server logs to redact the appkey parameter.
    • Avoid emitting complete request URLs in application or debugging logs.
    • Restrict access to logs and apply short retention periods.
    • Ensure telemetry and exception-reporting services scrub both the API key and personal birth information.
  3. Restrict the API key to only the required endpoint, source IP addresses, and minimum necessary quota where provider controls permit.

  4. Rotate the current key if it may already have appeared in logs, and establish periodic credential rotation and revocation procedures.

  5. Continue loading the key from the environment rather than embedding it in source code, and ensure environment values are not included in diagnostics or process dumps.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (9)

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill transmits highly sensitive personal birth data, including date, time, city, name, and sex, to a third-party API without a prominent privacy warning or consent step before transmission. This is especially risky because birth data is personal profile information and may be used to infer identity or other sensitive attributes.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill declares access to environment variables and implicitly performs network access, but it does not declare an explicit tool scope such as permissions or allowed-tools. This weakens least-privilege controls and makes it harder for reviewers and runtime policy engines to understand or restrict what the skill can do.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The invocation guidance uses broad natural-language triggers such as asking for a Bazi reading or future luck, which could match ordinary conversation and cause the skill to activate unexpectedly. Because the skill sends sensitive birth details to a third-party API, over-broad triggering increases the chance of unintentional data disclosure.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
95% confidence
Finding

The skill explicitly sends user-supplied personal data to an external endpoint at api.jisuapi.com. External transmission is expected for this skill's function, but it remains a real security and privacy risk because the transferred data includes sensitive birth details and there is no evidence here of consent gating, minimization, or endpoint restrictions beyond documentation.

Content

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

md
| istaiyang    | int      | 是   | 是否使用太阳时:0 不使用(默认),1 使用   |
| islunarmonth | int      | 是   | 是否闰月:1 是,2 否(仅在农历时有效)      |

脚本会将上述字段原样传给 `https://api.jisuapi.com/bazi/paipan`,并直接输出 `result` 字段内容。

## 返回结果概览

External Transmission

Medium
Category
Data Exfiltration
Confidence
93% confidence
Finding

The skill has a built-in dependency on transmitting user-provided data to an external service. In the context of a birth-chart skill, that data is especially sensitive and personally identifying, so the mere external transmission is security-relevant even if the code is not overtly malicious.

Content

Scanner excerpt · bazi.py (reported line 14)May include surrounding context.

python
import requests


PAIPAN_URL = "https://api.jisuapi.com/bazi/paipan"


def paipan(appkey: str, req: dict):

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill sends highly sensitive personal data to a third-party API, including name, city, birth date/time, and sex, without any visible consent, disclosure, or minimization. Even though transport uses HTTPS, this is still a privacy and data-governance risk because users may not realize their personal profile is being shared externally and retained by another service.

Content

No source excerpt is available for this finding.

Tainted flow: 'data' from requests.get (line 95, network input) → requests.get (network output)

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 · bazi.py (reported line 83)May include surrounding context.

python
}

    try:
        resp = requests.get(PAIPAN_URL, params=data, timeout=15)
    except Exception as e:
        return {"error": "request_failed", "message": str(e)}

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The docstrings, examples, and usage data are presented only in Chinese, with no indication that users can choose another language or locale. This can violate language-choice policy when the skill is not clearly documented as region-specific or opt-in for Chinese-language operation.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.