Back to skill

Security audit

RedCheck

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marked this skill suspicious because scanners report that its verifier runs submissions with the host user’s privileges and that checks intended to limit access and enforce a clean run can be bypassed.

Consider avoiding installation unless you trust the code being evaluated and can run it in an isolated environment that blocks host-file and network access and limits resources. The scanner coverage was complete for the 12 listed components, though dependency inspection was not requested; the verdict is suspicious and does not establish malicious intent.

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
verifier.py
Finding

Untrusted submissions execute with the verifier user's host privileges

Content
View full analysis

Impact

A malicious submission can read or modify host files accessible to the verifier account and transmit readable secrets over the network. Environment scrubbing does not prevent filesystem access; changing the working directory does not prevent absolute paths or parent-directory traversal.

Vulnerability Patterns
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (12)

The clean-environment recursion guard does not authenticate the actual parent or its one-shot token.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

The guard accepts a caller-selected PID whenever that process's command line contains "pre_publish_gate"; it never verifies that the PID is the actual parent or validates the token prefix. A caller can point to an unrelated or deliberately named process and use --skip-clean-env to obtain an accepted skip without performing the minimal-environment rerun.

Content

No source excerpt is available for this finding.

The verifier-separation check can pass despite the absolute-path exposure it claims to test and block.

High
Category
Excessive Agency
Confidence
100% confidence
Finding

The purported absolute-path canary only looks for manifest.json in the throwaway working directory and never attempts the known absolute manifest path. Its result is also excluded from the final ok calculation, so the gate can approve separation while submissions retain host-filesystem access to reference material.

Content

No source excerpt is available for this finding.

The anchor leakage assertion does not enforce the documented absence of reference answers from the rendered spec and input.

Medium
Category
Excessive Agency
Confidence
97% confidence
Finding

The assertion checks only whitespace-delimited tokens in inst["input"], not the complete rendered specification and input. Answers disclosed in the specification, embedded in punctuation, or spanning multiple tokens can therefore escape detection, undermining the claimed held-out evaluation guarantee; the supplied source does not establish an actual leaked instance.

Content

No source excerpt is available for this finding.

Dynamic import via __import__()

Medium
Category
Dangerous Code Execution
Confidence
75% confidence
Finding

Dynamic import() can load arbitrary modules at runtime, bypassing static analysis and potentially importing malicious code.

Content

Scanner excerpt · scripts/pre_publish_gate.py (reported line 86)May include surrounding context.

python
"""Load the mutation registry without importing pytest or running tests."""
    path = os.path.join(ROOT, "tests", "test_external_gate_mutation.py")
    spec = importlib.util.spec_from_file_location("_zh_mutants", path)
    mod = importlib.util.module_from_spec(spec)
    spec.loader.exec_module(mod)
    return mod

Dynamic import via __import__()

Medium
Category
Dangerous Code Execution
Confidence
75% confidence
Finding

Dynamic import() can load arbitrary modules at runtime, bypassing static analysis and potentially importing malicious code.

Content

Scanner excerpt · scripts/pre_publish_gate.py (reported line 87)May include surrounding context.

python
path = os.path.join(ROOT, "tests", "test_external_gate_mutation.py")
    spec = importlib.util.spec_from_file_location("_zh_mutants", path)
    mod = importlib.util.module_from_spec(spec)
    spec.loader.exec_module(mod)
    return mod

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/pre_publish_gate.py (reported line 584)May include surrounding context.

python
"'ProcessId=%d' | Select-Object -ExpandProperty CommandLine"
                % pid
            )
            p = subprocess.run(
                ["powershell", "-NoProfile", "-Command", q],
                capture_output=True, text=True, timeout=30,
            )

Tainted flow: 'q' from os.environ.get (line 579, credential/environment) → subprocess.run (code execution)

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 · scripts/pre_publish_gate.py (reported line 584)May include surrounding context.

python
"'ProcessId=%d' | Select-Object -ExpandProperty CommandLine"
                % pid
            )
            p = subprocess.run(
                ["powershell", "-NoProfile", "-Command", q],
                capture_output=True, text=True, timeout=30,
            )

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/pre_publish_gate.py (reported line 613)May include surrounding context.

python
fd, out_path = tempfile.mkstemp(prefix="zhevh_clean_", suffix=".json")
    os.close(fd)
    try:
        p = subprocess.run(
            [
                sys.executable,
                os.path.abspath(__file__),

Tainted flow: 'env' from os.environ (line 608, credential/environment) → subprocess.run (code execution)

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 · scripts/pre_publish_gate.py (reported line 613)May include surrounding context.

python
fd, out_path = tempfile.mkstemp(prefix="zhevh_clean_", suffix=".json")
    os.close(fd)
    try:
        p = subprocess.run(
            [
                sys.executable,
                os.path.abspath(__file__),

Dynamic import via __import__()

Medium
Category
Dangerous Code Execution
Confidence
75% confidence
Finding

Dynamic import() can load arbitrary modules at runtime, bypassing static analysis and potentially importing malicious code.

Content

Scanner excerpt · scripts/pre_publish_gate.py (reported line 684)May include surrounding context.

python
"manifest": live_hash,
            "pinned": m.get("manifest_sha256"),
        }
    if m.get("pool_version") != __import__("tasks").POOL_VERSION:
        return {"ok": False, "error": "pool_version drift: manifest pinned to a different pool version"}
    import tasks

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
99% confidence
Finding

The subprocess imports and executes submission-controlled Python with the host user's privileges and no OS sandbox. A scrubbed environment and temporary working directory do not prevent reading host credentials or references, modifying files, using the network, spawning persistent descendants, or exhausting memory through unbounded captured output.

Content

Scanner excerpt · verifier.py (reported line 73)May include surrounding context.

python
)
            workdir = tempfile.mkdtemp(prefix="zhevh_run_")
            try:
                p = subprocess.run(
                    [sys.executable, "-c", probe, path, task["input"]],
                    capture_output=True, text=True, timeout=20,
                    env=_runner_env(), cwd=workdir,

Tainted flow: '_runner_env()' from os.environ (line 33, credential/environment) → subprocess.run (code execution)

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

python
)
            workdir = tempfile.mkdtemp(prefix="zhevh_run_")
            try:
                p = subprocess.run(
                    [sys.executable, "-c", probe, path, task["input"]],
                    capture_output=True, text=True, timeout=20,
                    env=_runner_env(), cwd=workdir,