Back to skill

Security audit

jisuai-balance

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it says, but it sends a locally stored API key to a remote balance API over plaintext HTTP in the URL, which can expose the credential.

Install only if you accept that invoking the skill will read your OpenClaw API key and send it to the JisuAI balance service. Because the current implementation uses plaintext HTTP with the key in the URL, rotate any key previously used with it and prefer a version that uses HTTPS and avoids URL query-string credentials.

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/check_balance.py:58
Finding

API Credential Transmitted in a URL Over Plaintext HTTP

Content
View full analysis

Vulnerability Details

File Location: scripts/check_balance.py:6 and scripts/check_balance.py:58-62
Vulnerability Type: Plaintext transmission and URL exposure of sensitive credentials
Risk Level: High

Vulnerable Code

python
BALANCE_API_URL = "http://v2api.aicodee.com/chaxun/balance"
python
url = f"{BALANCE_API_URL}?key={api_key}"

try:
    req = urllib.request.Request(url)
    with urllib.request.urlopen(req, timeout=10) as response:

The insecure endpoint is also explicitly documented at SKILL.md:25:

markdown
- Balance query endpoint: `http://v2api.aicodee.com/chaxun/balance?key={api_key}`

Technical Analysis

The skill reads an API key from the user's OpenClaw configuration and includes it in the query string of an unencrypted HTTP request. HTTP provides no transport encryption or server authentication, allowing an attacker with visibility or control over the network path to inspect and modify the request.

Placing the credential in the URL creates additional exposure because complete URLs may be retained by HTTP proxies, gateways, monitoring systems, server access logs, or debugging infrastructure. The explicit http:// scheme also permits an active man-in-the-middle attacker to alter the returned balance information without detection.

Attack Path

  1. A user invokes the balance-checking skill on an untrusted or compromised network.
  2. The script reads the JisuAI API key from ~/.openclaw/openclaw.json.
  3. It constructs an HTTP URL containing the key as ?key={api_key}.
  4. A network observer, malicious access point, compromised proxy, or other on-path attacker captures the plaintext request.
  5. The attacker extracts the API key from the URL.
  6. The attacker reuses the credential against provider endpoints accessible with that key.
  7. An active attacker may additionally modify the balance API response, causing the skill to display attacker-con ...[truncated 539 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace the plaintext endpoint with a verified HTTPS endpoint and validate its certificate using the platform's normal certificate-validation behavior.

  2. Do not silently fall back or redirect from HTTPS to HTTP. Explicitly reject any final response URL using an insecure scheme.

  3. If supported by the provider, transmit the API key in an authorization header rather than in the query string, for example:

    python
    BALANCE_API_URL = "https://v2api.aicodee.com/chaxun/balance"
    req = urllib.request.Request(
        BALANCE_API_URL,
        headers={"Authorization": f"Bearer {api_key}"},
    )
    
  4. If the provider only supports query-string authentication, require HTTPS and ensure application, proxy, and server logging policies redact the key parameter. Avoid invoking the service until a securely authenticated HTTPS interface is available.

  5. Update SKILL.md so its documented endpoint and authentication method match the hardened implementation.

  6. Rotate all API keys previously used by this implementation because they may already have been exposed through network interception or URL logging.

  7. Consider restricting the replacement key to the minimum required API operations, quota, and account permissions.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (5)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The documented balance query endpoint uses plain HTTP (http://v2api.aicodee.com/...) while placing the API key directly in the URL query string. This exposes the credential to network interception, proxy and server logs, and other intermediaries, making theft of the API key and subsequent account abuse highly likely if used on an untrusted or monitored network.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The balance API endpoint is hardcoded as HTTP while the request carries the user's API key. This enables man-in-the-middle interception and tampering on untrusted networks, allowing credential theft and potentially unauthorized use of the associated account.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly states it will automatically read an API key from the user's local OpenClaw configuration and use it in a request to an external service, but it does not present this as a clear security-sensitive action or obtain informed user consent. This is dangerous because it causes credential exfiltration behavior to occur implicitly, and in this skill the risk is amplified by the separate use of an insecure transport channel for the outbound request.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script reads an API key from a local OpenClaw config and sends it as a URL query parameter to a remote service. This is dangerous because query parameters are commonly exposed in logs, proxies, browser/history equivalents, and upstream monitoring systems; in this file the risk is amplified because the request is also sent over plain HTTP, allowing interception of the key in transit.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The script's docstrings and printed user-facing messages are written only in Chinese, with no mechanism for user language selection or opt-in. This can violate language or locale policy where tools must not force a specific language without giving the user a choice.

Content

No source excerpt is available for this finding.