Back to skill

Security audit

laomeng-zhc-agent

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this skill suspicious because it reports several security and reliability concerns, and its inspection was incomplete.

Consider the suspicious verdict and incomplete inspection before installing. The findings describe meaningful execution, input handling, and availability risks, but do not establish malicious intent. Avoid relying on the reported passive inspection mode for untrusted WebAssembly.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (13)

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
reset` / `zhc_out_cap`);该目标下文件 I/O 内置改报 **E314** 并提示改用 x86-64 或 wasm32-wasi;新增 `scripts/run_noos.js` 作为该目标的宿主运行器(`node run_noos.js 目标.wasm`),随包分发。契约侧登记错误码 E314,

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
> **本包为完整可运行包**,含语言内核 `scripts/zhc.py`(190000 B)、语言服务 `scripts/zhc_lsp.py`、桥 `scripts/桥/zhc_bridge.py`、无操作系统垫片 `scripts/run_noos.js` 与可运行示例 `scripts/示例/*.zc`。

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_read, file_write, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

The documented non-executing --info mode can execute WebAssembly code.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The documented non-executing --info mode instantiates the module before inspecting exports, which executes any WebAssembly start function; it also invokes zhc_out_cap when that export is a function. An untrusted module can therefore execute and exhaust CPU or memory during supposedly passive inspection, although the empty import object limits direct host access.

Content

No source excerpt is available for this finding.

The JSON parser accepts malformed input despite explicitly promising strict rejection.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The number parser accepts arbitrary sequences of signs, digits, decimal points, and exponent markers, then uses atof or strtoll without checking complete conversion or range errors. Consequently, malformed tokens such as 1-2 or 1e can be accepted as different numeric values, creating parser differentials and silent data corruption when JSON carries export data or other security-relevant parameters; no direct code execution is established.

Content

No source excerpt is available for this finding.

The bridge reader does not enforce its documented deadline while output remains continuously available.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The bridge reader checks elapsed time only when no pipe data is available, so a continuously writing backend can prevent the deadline check indefinitely. Once the response buffer fills, additional bytes are silently discarded rather than rejected, allowing a newline-free stream to hold the caller and consume CPU; this undermines availability in agent or editor integrations.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
88% confidence
Finding

Invoking the compiler batch file is legitimate, but the executed script and its inputs reside in a predictable, reused temporary directory derived from the output path. An attacker able to modify that directory can replace the batch file or source between preparation and execution, while concurrent builds can also overwrite each other's inputs or artifacts; an agent build workflow makes this a potentially consequential execution boundary.

Content

Scanner excerpt · scripts/zhc.py (reported line 4045)May include surrounding context.

python
f.write(")\r\n")

    try:
        r = subprocess.run([bat], capture_output=True, text=True, encoding="mbcs",
                           errors="replace", timeout=ZHC_构建限时)
    except subprocess.TimeoutExpired:
        return False, ("[构建失败] cl 超过 %d 秒未结束,已中止(宿主工具链或超大中间码),"

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/zhc.py (reported line 4144)May include surrounding context.

python
"-Wno-unknown-pragmas", "-fno-strict-aliasing",
           "-o", 产出, os.path.abspath(c_path)]
    try:
        r = subprocess.run(cmd, capture_output=True, text=True, encoding="utf-8",
                           errors="replace", timeout=ZHC_构建限时)
    except subprocess.TimeoutExpired:
        return False, ("[构建失败] wasi-sdk clang 超过 %d 秒未结束,已中止(宿主工具链问题,"

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/zhc.py (reported line 4230)May include surrounding context.

python
"-Wl,--export=zhc_out_cap",
               "-o", "prog.wasm", "prog.c", "zhc_noos_impl.c"]
        try:
            r = subprocess.run(cmd, cwd=work, capture_output=True, text=True,
                               encoding="utf-8", errors="replace", timeout=ZHC_构建限时)
        except subprocess.TimeoutExpired:
            return False, ("[构建失败] noos 构建超过 %d 秒未结束,已中止(宿主工具链问题,"

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/zhc.py (reported line 4276)May include surrounding context.

python
"""按进程树强制结束。超时程序可能是 cmd/cl 的子孙进程,只 kill 直接子进程会留孤儿。"""
    if os.name == "nt":
        try:
            subprocess.run(["taskkill", "/F", "/T", "/PID", str(pid)],
                           capture_output=True, timeout=15)
        except (subprocess.TimeoutExpired, OSError):
            # 强杀失败也不阻断上层:上层随后 p.wait(5) 会再确认一次

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/zhc.py (reported line 4296)May include surrounding context.

python
并在超时后 taskkill /T 连同子孙一并结束。
    """
    旗 = getattr(subprocess, "CREATE_NEW_PROCESS_GROUP", 0)
    p = subprocess.Popen(cmd, stdin=subprocess.DEVNULL, creationflags=旗)
    try:
        p.wait(timeout=限时)
    except subprocess.TimeoutExpired:

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

A runtime comment claims the bridge is permanently unavailable, but the implementation launches and communicates with a backend subprocess.

Low
Category
Excessive Agency
Confidence
100% confidence
Finding

L2516 states that this version has no backend, is always unavailable, and always returns failure. In contrast, L2556-L2647 implement backend startup through CreateProcessW, and L2701-L2735 expose availability checks and live request/response communication; the comment therefore misstates an actual process-execution path, although that capability is justified by the manifest.

Content

No source excerpt is available for this finding.