Back to skill

Security audit

Skill Updater

Security checks for vulnerabilities and agentic risk

Overview

This skill is meant to update other skills safely, but its code can still change or overwrite local skill files in ways that conflict with its safety claims.

Install only if you are comfortable with a skill that can rewrite other installed skills under OPENCLAW_SKILLS_DIR. Back up locally edited skills first, prefer targeting a single skill with --skill, and do not rely on its dry-run or conflict-recovery behavior as a guarantee that your local changes will be preserved.

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

Error
Location
git_update.py:154
Finding

Local modifications can be silently overwritten during an update

Content
View full analysis
dict: updater = skill_updater_dir(skill_path) orig_dir = originals_dir(skill_path) p_path = patch_path(skill_path) os.makedirs(orig_dir, exist_ok=True) current_files = {} for root, dirs, files in os.walk(skill_path): dirs[:] = [d for d in dirs if not d.startswith(".") or d == UPDATER_DIR] for fname in files: if fname.startswith("."): continue full = os.path.join(root, fname) rel = os.path.relpath(full, skill_path) if rel.startswith(UPDATER_DIR): continue try: with open(full, "r", encoding="utf-8", errors="ignore") as f: current_files[rel] = f.read() except Exception: pass for rel, content in current_files.items(): orig_full = os.path.join(orig_dir, rel) os.makedirs(os.path.dirname(orig_full), exist_ok=True) with open(orig_full, "w", encoding="utf-8") as f: f.write(content) patch_lines = [] for rel in sorted(current_files.keys()): orig_rel = os.path.join(UPDATER_DIR, ORIGINALS_DIR, rel) code, diff_out, _ = run( ["diff", "-u", orig_rel, rel], cwd=skill_path ) if diff_out.strip(): patch_lines.append(diff_out) ``` The affected update flow subsequently invokes the remote updater: ```python if not has_mod: mod_info = save_modifications(path) has_mod = mod_info["has_mods"] if not dry_run: code, out, err = do_update(slug) ``` ### Technical Analysis The `.skill-updater/originals/` directory is intended to contain an immutable baseline representing the files before local modifications. However, `s ...[truncated 2132 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
git_update.py:444
Finding

Dry-run mode performs persistent filesystem modifications

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
git_update.py:535
Finding

Undefined variable crashes conflict-report generation after an update

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (18)

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · README.md (reported line 98)May include surrounding context.

Workflow

text
Step 1: You modify skill files
Step 2: First run saves patch automatically
        (.skill-updater/originals/ + mod.patch)
Step 3: New version released on clawhub

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

This is a real security-relevant integrity issue: the skill claims to preserve local modifications during updates, but the described implementation defects mean patches may be empty, incorrect, or fail to apply, while conflict reporting can also break. In context, an updater operating on local skill files can silently lose user changes or leave skills in inconsistent states, which is dangerous because users rely on it for safe, non-destructive updates.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README documents a command to discard modifications and accept the new version, which can remove local user changes. Although the behavior is named, there is no explicit warning emphasizing that this may permanently lose unmerged local edits.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill advertises and requires capabilities that imply environment access, file reads/writes, and shell execution, but it does not declare any explicit tool scope or permission boundaries. For an updater that modifies local skill directories and invokes external binaries, this increases the chance of unintended or over-broad execution against user files or the host environment.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger phrases are broad enough that the skill may activate in situations where the user did not clearly intend to run a file-modifying updater. Because this skill can perform updates, write patches, and invoke shell tools, accidental invocation raises the risk of unintended local changes or confusing update behavior.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger phrases "auto update" and especially "git sync" are broad, commonly used terms that can collide with ordinary user requests unrelated to this specific skill. In a skill that performs update and synchronization actions, accidental invocation could cause unintended repository or local skill state changes, making the broad trigger surface operationally risky even without malicious intent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The module docstring presents the skill description, workflow, and usage exclusively in Chinese, which effectively forces a specific language for user-facing instructions. There is no opt-in, alternate locale, or justification that this skill is intended only for a Chinese-speaking or region-specific environment.

Content

No source excerpt is available for this finding.

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

python
def run(cmd: list, cwd: str = SKILLS_DIR, timeout: int = 60, input: str = "") -> tuple[int, str, str]:
    try:
        r = subprocess.run(cmd, cwd=cwd, capture_output=True, text=True,
                         timeout=timeout,
                         input=input if input else None)
        return r.returncode, r.stdout, r.stderr

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

python
def get_clawhub_latest(slug: str) -> str | None:
    """通过 clawhub inspect 获取某 skill 的最新版本"""
    try:
        r = subprocess.run(
            ["clawhub", "inspect", slug],
            cwd=SKILLS_DIR, capture_output=True, text=True, timeout=20
        )

Tainted flow: 'slug' from os.environ.get (line 93, 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 · git_update.py (reported line 110)May include surrounding context.

python
def get_clawhub_latest(slug: str) -> str | None:
    """通过 clawhub inspect 获取某 skill 的最新版本"""
    try:
        r = subprocess.run(
            ["clawhub", "inspect", slug],
            cwd=SKILLS_DIR, capture_output=True, text=True, timeout=20
        )

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

python
lines.append("(新版文件不存在,无法对比)")
            continue

        r = _subprocess.run(
            ["diff", "-u",
             "--label", f"BASE({rel} 原始版本)",
             "--label", f"REMOTE({rel} clawhub新版 — 你的修改与此冲突)",

Tainted flow: 'cur_file' from os.environ.get (line 145, 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 · git_update.py (reported line 295)May include surrounding context.

python
lines.append("(新版文件不存在,无法对比)")
            continue

        r = _subprocess.run(
            ["diff", "-u",
             "--label", f"BASE({rel} 原始版本)",
             "--label", f"REMOTE({rel} clawhub新版 — 你的修改与此冲突)",

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

python
def do_update(slug: str) -> tuple[int, str, str]:
    """执行 clawhub update"""
    r = subprocess.run(
        ["clawhub", "update", slug],
        cwd=SKILLS_DIR, capture_output=True, text=True, timeout=120
    )

Tainted flow: 'slug' from os.environ.get (line 93, 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 · git_update.py (reported line 313)May include surrounding context.

python
def do_update(slug: str) -> tuple[int, str, str]:
    """执行 clawhub update"""
    r = subprocess.run(
        ["clawhub", "update", slug],
        cwd=SKILLS_DIR, capture_output=True, text=True, timeout=120
    )

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This function creates or overwrites .skill-updater/CONFLICTS.md, which is a file write affecting user workspace state. Although the script has general CLI usage text, there is no confirmation prompt or explicit user-facing disclosure here that a report file will be written automatically when conflicts occur.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The conflict report claims a diff3-style output with LOCAL, BASE, and REMOTE, but the implementation only produces a two-way diff and references an undefined LOCAL variable. In practice this can crash conflict-report generation or mislead users about the state of their local changes, increasing the chance of incorrect manual resolution and accidental loss of modifications during updates.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The document is explicitly limited to Chinese and English sections, which can be interpreted as a fixed language choice rather than offering users a locale or language preference. Under the policy rule, forcing specific languages without opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The trigger list includes the Chinese-only phrase "skill更新" alongside English triggers, which introduces a language-specific activation path without documenting language choice, opt-in, or a region-specific reason. This can create inconsistent language behavior and may violate language/locale policy expectations.

Content

No source excerpt is available for this finding.