Back to skill

Security audit

DinzeeAgent

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed e-commerce gateway skill, but it needs review because it can install remote skill packages into the live agent runtime and saves call data with very broad local permissions.

Install only if you trust Dinzee's gateway and package delivery path, and prefer using it in a single-user or isolated agent environment. Avoid sync-skills or bulk updates unless you intend to let Dinzee-delivered packages modify the local skills directory, and use --no-save or a private DINZEE_DATA_DIR when request or response data may be sensitive.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/dinzee.py:260
Finding

Gateway call records are stored with world-readable and world-writable permissions

Content
View full analysis
Path: root = data_dir() provider_dir = root / _safe_path_component(provider) target = provider_dir / _safe_path_component(tool) for directory in (root, provider_dir, target): directory.mkdir(parents=True, exist_ok=True) directory.chmod(DATA_DIR_MODE) probe = target / f".dinzee-write-test-{uuid.uuid4().hex}.tmp" try: with probe.open("x", encoding="utf-8") as f: f.write("") probe.chmod(stat.S_IRUSR | stat.S_IWUSR) finally: if probe.exists(): probe.unlink() return target ``` ```python def _save_call_record(target_dir: Path, payload: dict, body: dict) -> Path: now = _utc_now() target_dir.mkdir(parents=True, exist_ok=True) target_dir.chmod(DATA_DIR_MODE) target = target_dir / _call_record_filename(payload, body) record = { "schema_version": 1, "saved_at": now.isoformat().replace("+00:00", "Z"), "gateway": { "base_url": base_url(), "call_id": body.get("call_id"), "idempotency_key": payload.get("idempotencyKey"), "authority_correlation_id": body.get("authority_correlation_id"), }, "request": { "provider": payload.get("provider"), "tool": payload.get("tool"), "arguments": payload.get("arguments") or {}, }, "response": body, } tmp = target.with_name(f".{target.name}.{uuid.uuid4().hex}.tmp") try: with tmp.open("x", encoding="utf-8") as f: json.dump(record, f, ensure_ascii=False, indent=2) f.write("\n") tmp.chmod(DATA_FILE_MODE) tmp.replace(target) ...[truncated 2419 chars]
Remediation
View remediation

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/dinzee.py:565
Finding

Unverified remote Skill packages are installed into the live Agent runtime

Content
View full analysis
int: """把网关返回的 zip(base64)解压到 target(先清后写)。zip 内文件在根层。""" data = base64.b64decode(package_b64) zf = zipfile.ZipFile(io.BytesIO(data)) if target.exists(): shutil.rmtree(target) target.mkdir(parents=True, exist_ok=True) count = 0 for name in zf.namelist(): if name.endswith("/"): continue segments = name.split("/") if name.startswith("/") or any(s in ("", "..") for s in segments): continue # path-traversal guard dest = target / name dest.parent.mkdir(parents=True, exist_ok=True) dest.write_bytes(zf.read(name)) count += 1 return count ``` ```python def cmd_skill_install(args) -> None: slug = args.slug.strip().lower() if slug == "dinzeeagent": print("Error: dinzeeagent 是客户端本体,请用 clawhub 安装/更新,不经此命令。", file=sys.stderr) sys.exit(2) payload: dict = {"slug": slug} if getattr(args, "version", None): payload["version"] = args.version code, body = _request("POST", INSTALL_PATH, body=payload) if code != 200: _fail(code, body) pkg = (body or {}).get("package_b64") if not pkg: print(f"Error: 网关未返回 package(body={json.dumps(body, ensure_ascii=False)[:200]})", file=sys.stderr) sys.exit(1) target = _skills_dir(args) / slug n = _write_package(target, pkg) ver = (body or {}).get("version") charged = int((body or {}).get("points_charged") or 0) if (body or {}).get("already_owned"): print(f"✅ {slug}@{ver}:你已拥有此版本,未重复扣点。已写入 {target}({n} 个文件)。") else: print(f"✅ 已交付 {slug}@{ver},扣 {charged} 点。已写入 {target}({n} 个文件)。") print("(openclaw 热加载会自动识别该 skill;若未启用 watch,重启 agent 即可)") ``` ### ...[truncated 2904 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (27)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
对当前内置业务任务,先确认本地已同步这些 skill;如果本地还没有,先执行 `sync-skills`。随后打开对应本地 skill 的 `SKILL.md`,按其中脚本/流程运行;这些脚本会使用 `DINZEE_USER_TOKEN` 调 Dinzee gateway,工具调用或最终 `skill_meter` 会

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
对当前内置业务任务,先确认本地已同步这些 skill;如果本地还没有,先执行 `sync-skills`。随后打开对应本地 skill 的 `SKILL.md`,按其中脚本/流程运行;这些脚本会使用 `DINZEE_USER_TOKEN` 调 Dinzee gateway,工具调用或最终 `skill_meter` 会

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

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

md
Token resolution (in order):
    1. Environment variable DINZEE_USER_TOKEN (or legacy DINZEEAGENT_API_KEY)
    2. DINZEE_CREDENTIALS_PATH or /opt/data/.dinzee/credentials.json
    3. Legacy read-only fallback: ~/.dinzee/credentials.json
    4. Clear error message

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

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

md
Token resolution (in order):
    1. Environment variable DINZEE_USER_TOKEN (or legacy DINZEEAGENT_API_KEY)
    2. DINZEE_CREDENTIALS_PATH or /opt/data/.dinzee/credentials.json
    3. Legacy read-only fallback: ~/.dinzee/credentials.json
    4. Clear error message

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

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

md
Token resolution (in order):
    1. Environment variable DINZEE_USER_TOKEN (or legacy DINZEEAGENT_API_KEY)
    2. DINZEE_CREDENTIALS_PATH or /opt/data/.dinzee/credentials.json
    3. Legacy read-only fallback: ~/.dinzee/credentials.json
    4. Clear error message

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · scripts/dinzee.py (reported line 15)May include surrounding context.

python
Token resolution (in order):
    1. Environment variable DINZEE_USER_TOKEN (or legacy DINZEEAGENT_API_KEY)
    2. DINZEE_CREDENTIALS_PATH or /opt/data/.dinzee/credentials.json
    3. Legacy read-only fallback: ~/.dinzee/credentials.json
    4. Clear error message

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · scripts/dinzee.py (reported line 16)May include surrounding context.

python
Token resolution (in order):
    1. Environment variable DINZEE_USER_TOKEN (or legacy DINZEEAGENT_API_KEY)
    2. DINZEE_CREDENTIALS_PATH or /opt/data/.dinzee/credentials.json
    3. Legacy read-only fallback: ~/.dinzee/credentials.json
    4. Clear error message

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · scripts/dinzee.py (reported line 31)May include surrounding context.

python
Token resolution (in order):
    1. Environment variable DINZEE_USER_TOKEN (or legacy DINZEEAGENT_API_KEY)
    2. DINZEE_CREDENTIALS_PATH or /opt/data/.dinzee/credentials.json
    3. Legacy read-only fallback: ~/.dinzee/credentials.json
    4. Clear error message

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · scripts/dinzee.py (reported line 65)May include surrounding context.

python
Token resolution (in order):
    1. Environment variable DINZEE_USER_TOKEN (or legacy DINZEEAGENT_API_KEY)
    2. DINZEE_CREDENTIALS_PATH or /opt/data/.dinzee/credentials.json
    3. Legacy read-only fallback: ~/.dinzee/credentials.json
    4. Clear error message

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · scripts/dinzee.py (reported line 66)May include surrounding context.

python
Token resolution (in order):
    1. Environment variable DINZEE_USER_TOKEN (or legacy DINZEEAGENT_API_KEY)
    2. DINZEE_CREDENTIALS_PATH or /opt/data/.dinzee/credentials.json
    3. Legacy read-only fallback: ~/.dinzee/credentials.json
    4. Clear error message

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · scripts/dinzee.py (reported line 708)May include surrounding context.

python
Token resolution (in order):
    1. Environment variable DINZEE_USER_TOKEN (or legacy DINZEEAGENT_API_KEY)
    2. DINZEE_CREDENTIALS_PATH or /opt/data/.dinzee/credentials.json
    3. Legacy read-only fallback: ~/.dinzee/credentials.json
    4. Clear error message

MCP Config Access

High
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill accesses MCP server configuration files (mcp.json). MCP configs contain server URLs, authentication tokens, and tool definitions — reading them allows the skill to discover and potentially abuse other tool integrations.

Content

Scanner excerpt · scripts/dinzee.py (reported line 24)May include surrounding context.

python
dinzee.py logout                        delete saved token
    dinzee.py status                        print where the token comes from
    dinzee.py providers                     list registered MCP providers
    dinzee.py list-tools [--provider sif]   list available MCP tools for a provider
    dinzee.py describe <tool>               show a tool's availability / charge flag
    dinzee.py call <tool> --args '<json>'   invoke a tool (json may also come from stdin via --stdin)
    dinzee.py trace <saved-record.json>     query the persisted gateway call record

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

Remote package installation directly writes gateway-supplied ZIP contents into the runtime skills directory, enabling the gateway to modify local agent behavior and introduce new executable logic. Although there is a basic path-traversal check, there is no signature verification, trust pinning, content validation, or sandboxing, so compromise of the delivery path can become arbitrary code execution in the agent environment.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

Bulk sync/update of a predefined skill catalog amplifies the remote installation risk by allowing many packages to be fetched and deployed in one operation. This increases blast radius, makes silent capability expansion easier, and is especially dangerous in an agent runtime where newly installed skills can change what the system can do without strong operator review.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill declares broad operational behavior—shell execution, filesystem writes, network access, environment-variable use, and runtime installation of additional skills—without any explicit permission boundary such as allowed-tools or scoped capabilities. In practice, this creates an over-privileged entrypoint that can modify the local runtime, fetch remote content, and persist artifacts, increasing the blast radius if the skill is misused or compromised.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The primary user-facing instructions and operational guidance are presented in Chinese, and the skill does not state that users may interact in another language or choose their preferred locale. This creates a language/locale policy concern because it effectively forces a specific language without documented opt-in or justification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill instructs the agent to install and update remote-delivered skill packages into the local skills directory, with hot-loading, but does not require strong integrity verification, trust pinning, or prominent user confirmation before modifying the local runtime. This is effectively a supply-chain and local code execution risk: a compromised gateway, repository, or package could introduce malicious code or unsafe instructions into the agent environment.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown skill file presents all instructions, tool descriptions, and prompt templates exclusively in Chinese. That can violate a language/locale policy when users are not given an explicit language choice or informed that the skill is intended only for Chinese-speaking users.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The file states that users must invoke tools using the @工具中文名 syntax, which imposes a specific language requirement in the skill interface. Under the policy, forcing a language or locale without user opt-in or a documented justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Line L003 instructs users to invoke tools using the @工具中文名 syntax, which imposes a Chinese-language naming convention as the required interaction method. The file does not indicate that other languages are supported or that the user can opt into this locale, making it a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The tool is explicitly described as accessing a 'personal private keyword database,' which strongly implies retrieval of user-associated private data without any visible mention of authorization checks, consent, scope restriction, or redaction. In this skill context, where tools are dynamically discovered and routed through a gateway, vague access to private stores is more dangerous because users may invoke it through natural language without understanding what private data is being fetched.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This Python file contains natural-language documentation and CLI messages in Chinese, including the architecture description and many user-facing errors/help texts, with no indication that the language is configurable or chosen by user opt-in. Under the stated policy, forcing a specific language or locale without user choice is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
99% confidence
Finding

Creating data directories with mode 0777 makes saved call records accessible and modifiable by any local user in many environments. In a shared runtime, this can lead to confidentiality loss, tampering with audit/trace records, symlink abuse opportunities, and cross-tenant data leakage.

Content

Scanner excerpt · scripts/dinzee.py (reported line 68)May include surrounding context.

python
DEFAULT_CREDENTIALS_PATH = Path("/opt/data/.dinzee/credentials.json")
LEGACY_CREDENTIALS_PATH = Path.home() / ".dinzee" / "credentials.json"
DEFAULT_DATA_DIR = Path("/opt/data/.dinzee/data")
DATA_DIR_MODE = 0o777
DATA_FILE_MODE = 0o666

PROVIDERS_PATH = "v1/mcp/providers"

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
99% confidence
Finding

Saving JSON data files with mode 0666 makes their contents world-readable and world-writable subject to umask, which is unsafe for files containing request arguments, responses, and correlation identifiers. This undermines confidentiality and integrity of persisted records and can enable tampering or information harvesting by other local users/processes.

Content

Scanner excerpt · scripts/dinzee.py (reported line 69)May include surrounding context.

python
LEGACY_CREDENTIALS_PATH = Path.home() / ".dinzee" / "credentials.json"
DEFAULT_DATA_DIR = Path("/opt/data/.dinzee/data")
DATA_DIR_MODE = 0o777
DATA_FILE_MODE = 0o666

PROVIDERS_PATH = "v1/mcp/providers"
TOOLS_PATH = "v1/mcp/tools"

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill is presented as a gateway-routed data agent, but it also contains functionality to install gateway-delivered ZIP packages into the live skills directory. That materially expands its authority from data routing into remote code/content deployment, creating a supply-chain and privilege-boundary risk if the gateway, package source, or account is compromised.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.