Back to skill

Security audit

jisuai-auto

Security checks for vulnerabilities and agentic risk

Overview

The skill is meant to configure OpenClaw for a MiniMax relay, but it handles API credentials and persistent model-routing changes with too little scoping and user control.

Review this skill before installing. Only use it with an intended HTTPS aicodee.com endpoint, avoid pasting real keys into chat or shell history when possible, back up openclaw.json first, and verify the exact provider and default model changes before continuing to use OpenClaw.

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 (3)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/configure.py:73
Finding

API Key Exposure Through Command-Line Arguments

Content
View full analysis

Vulnerability Details

File Location: scripts/configure.py:73-81; invocation documented at SKILL.md:13 and SKILL.md:72
Vulnerability Type: Sensitive credential exposure through process arguments
Risk Level: Medium

Vulnerable code:

python
if __name__ == "__main__":
    parser = argparse.ArgumentParser(description="配置 OpenClaw MiniMax 中转 API")
    parser.add_argument("--base-url", required=True, help="API Base URL(必填)")
    parser.add_argument("--api-key", required=True, help="API Key(必填)")
    parser.add_argument("--provider-name", default="jisuaivauto", help="提供商名称")
    parser.add_argument("--model-id", default="MiniMax-M2.7-highspeed", help="模型 ID")

    args = parser.parse_args()
    configure(args.base_url, args.api_key, args.provider_name, args.model_id)

Documented invocation:

bash
python scripts/configure.py --base-url "https://v2.aicodee.com" --api-key "sk-3a099f856d7664c76c60905895c6a36f" --provider-name "jisuaivauto"

Technical Analysis

The script requires the API key to be supplied as the value of the --api-key command-line option. Command-line arguments are not an appropriate channel for secrets because they may be exposed through:

  • Process inspection utilities available to other local users, depending on operating-system policy.
  • Shell history when a user invokes the command manually.
  • Agent tool-call records, execution telemetry, debugging output, or centralized logging.
  • Process-monitoring and endpoint-management products that collect command lines.

Although the script does not explicitly print the key, accepting it through argparse places the plaintext credential in the process command line before the script can protect or erase it.

Attack Path

  1. A user provides an API key to the Skill.
  2. The Skill constructs a command containing --api-key <plaintext-key>.
  3. The shell, operating system, agent runtime, or monitoring ...[truncated 670 chars]
Remediation
View remediation

Remediation Suggestions

  • Remove the --api-key command-line option as the primary secret-input mechanism.
  • Read the key from protected standard input or use getpass.getpass() for interactive execution.
  • Prefer integration with an operating-system credential manager or an established secret store.
  • If environment-based input is required for automation, document that environment inheritance and CI logs must be restricted; unset the variable immediately after use where practical.
  • Ensure agent execution logs, error messages, and telemetry redact strings matching API-key formats.
  • Replace the documentation's realistic-looking key with an unmistakably invalid placeholder.
  • Limit access to the resulting configuration file because the key is subsequently stored there in plaintext.

T09 · Insecure Skill Coding Practices

Error
Location
scripts/configure.py:24
Finding

Unvalidated Provider URL Can Direct Credentials and Requests to an Untrusted Endpoint

Content
View full analysis

Vulnerability Details

File Location: scripts/configure.py:24-34 and scripts/configure.py:74-81
Vulnerability Type: Untrusted endpoint configuration and missing URL validation
Risk Level: High

Vulnerable code:

python
def configure(base_url, api_key, provider_name="jisuaivauto", model_id="MiniMax-M2.7-highspeed"):
    data = load_openclaw(OPENCLAW_PATH)

    # 确保 models.providers 存在
    if "models" not in data:
        data["models"] = {}
    if "providers" not in data["models"]:
        data["models"]["providers"] = {}

    # 添加提供商配置
    provider_config = {
        "baseUrl": base_url,
        "apiKey": api_key,
python
if __name__ == "__main__":
    parser = argparse.ArgumentParser(description="配置 OpenClaw MiniMax 中转 API")
    parser.add_argument("--base-url", required=True, help="API Base URL(必填)")
    parser.add_argument("--api-key", required=True, help="API Key(必填)")
    parser.add_argument("--provider-name", default="jisuaivauto", help="提供商名称")
    parser.add_argument("--model-id", default="MiniMax-M2.7-highspeed", help="模型 ID")

    args = parser.parse_args()
    configure(args.base_url, args.api_key, args.provider_name, args.model_id)

Technical Analysis

The Skill is presented as a configuration mechanism for the aicodee.com service, but it accepts any nonempty string as --base-url and writes it directly into the provider configuration. The code does not parse the URL, require HTTPS, verify that the hostname belongs to the documented service, reject embedded credentials, or otherwise ask for confirmation when an unexpected host is supplied.

Because the same provider object contains both the attacker-influenced endpoint and the user's API key, subsequent use of the configured provider may direct authenticated model requests to an unintended server. The actual transmission is performed by OpenClaw when it uses this provider, rather than by `configure.p ...[truncated 1161 chars]

Remediation
View remediation

Remediation Suggestions

  • Parse the URL with a standard URL parser rather than accepting an arbitrary string.
  • Require the https scheme.
  • Allowlist the exact documented service hostname or a narrowly defined set of approved aicodee.com hostnames.
  • Compare normalized hostnames and reject lookalike suffixes such as aicodee.com.attacker.example.
  • Reject URLs containing user-information components, fragments, unexpected ports, IP literals, or malformed hostnames unless specifically required.
  • Require explicit, prominent user confirmation before permitting any endpoint outside the documented allowlist.
  • Consider resolving and validating redirect behavior in the consuming client so an approved endpoint cannot redirect authenticated requests to an untrusted host.
  • Avoid automatically selecting an unverified provider as the default model.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/configure.py:13
Finding

Non-Atomic and Destructive Modification of a Hardcoded OpenClaw Configuration

Content
View full analysis

Vulnerability Details

File Location: scripts/configure.py:13-21 and scripts/configure.py:59-64
Vulnerability Type: Unsafe configuration-file handling and destructive state replacement
Risk Level: Medium

Vulnerable code:

python
OPENCLAW_PATH = r"C:\Users\Rice\.openclaw\openclaw.json"


def load_openclaw(path):
    with open(path, "r", encoding="utf-8") as f:
        return json.load(f)


def save_openclaw(path, data):
    with open(path, "w", encoding="utf-8") as f:
        json.dump(data, f, ensure_ascii=False, indent=2)
        f.write("\n")
python
# 更新默认模型
if "agents" not in data:
    data["agents"] = {}
if "defaults" not in data["agents"]:
    data["agents"]["defaults"] = {}
data["agents"]["defaults"]["model"] = {
    "primary": f"{provider_name}/{model_id}"
}

save_openclaw(OPENCLAW_PATH, data)

Technical Analysis

The configuration path is hardcoded to a specific user's Windows profile instead of being derived from the current user's environment or supplied as an explicit validated option. This can cause the script to modify the wrong account's configuration or fail outside the developer's system.

The save operation opens the live configuration directly in write mode. Opening with "w" truncates the existing file before serialization is complete. A process interruption, storage failure, or serialization error can therefore leave a partial or empty configuration. No backup, file locking, schema validation, permission check, or atomic replacement is used.

In addition, the assignment to data["agents"]["defaults"]["model"] replaces the entire existing model object. Any unrelated settings previously stored beneath that object are silently discarded rather than preserved.

Attack Path

  1. OpenClaw has an existing configuration containing provider and model settings.
  2. The Skill runs the script against the fixed path.
  3. The script replaces the ...[truncated 1056 chars]
Remediation
View remediation

Remediation Suggestions

  • Resolve the configuration path from the current user's home directory or an official OpenClaw configuration-path API.
  • Optionally accept a configuration path through a clearly documented parameter, then canonicalize and validate it before use.
  • Preserve unrelated properties by updating only agents.defaults.model.primary instead of replacing the complete model object.
  • Validate the updated structure against the expected OpenClaw schema before committing it.
  • Create a permission-restricted backup before modification.
  • Write the complete JSON document to a temporary file in the same directory, flush and synchronize it, and atomically replace the original file only after successful serialization.
  • Preserve or deliberately restrict the destination file's permissions so the plaintext API key is not made accessible to other users.
  • Use file locking or equivalent concurrency controls to prevent simultaneous writers from losing updates.
  • Report failures without leaving a partially written live configuration.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill instructs the agent to read and modify local configuration files and run a configuration script, but it does not declare any explicit tool scope or permission boundaries. That increases the risk of unintended file access or modification because users and reviewers cannot tell in advance what local capabilities the skill will exercise.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill asks the user to paste an API key directly into chat and provides extraction rules for capturing it, but it does not warn that chat messages may be logged, retained, or exposed to other tooling. This creates unnecessary secret-handling risk because credentials may be stored in conversation history or propagated to scripts and logs.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The workflow states that the skill will update models.providers and change agents.defaults.model.primary, which alters system behavior, but it does not clearly warn the user or require confirmation before making those changes. Silent modification of defaults can redirect future model traffic and surprise the user with persistent configuration changes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script accepts an API key and persists it directly into a local JSON config file at a fixed user path, without any warning, consent flow, or protection mechanism. This can expose long-lived credentials to other local processes, backups, sync tools, or users on the same system, and the skill context makes it more sensitive because its explicit purpose is to automate third-party API integration using a secret.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The module docstring and CLI descriptions are written only in Chinese, which imposes a specific language/locale on users without any opt-in or indication that the skill is intentionally region-specific. Under the stated policy, language constraints should either offer a choice or be clearly justified.

Content

No source excerpt is available for this finding.