Back to skill

Security audit

Smart Updater

Security checks for vulnerabilities and agentic risk

Overview

This updater is mostly coherent with its stated purpose, but its install and upgrade scripts have high-impact safety gaps that could let tampered local metadata or an unsigned remote package overwrite OpenClaw assets.

Install only if you are comfortable reviewing and hardening the scripts first. Before use, remove the unsigned SkillHub ZIP install path or add signature/digest verification, replace shell=True and python3 -c interpolation with argv/stdin parsing, canonicalize install paths under approved OpenClaw roots before any deletion or copy, and keep upgrade execution behind explicit user confirmation.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (4)

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/upgrade.sh:178
Finding

Unsigned Remote Skill Archives Are Installed as Trusted Code

Content
View full analysis
>"$LOG_FILE") if [ "$HTTP_CODE" = "200" ] && [ -s "${SKILLHUB_TMP}/${ASSET_NAME}.zip" ]; then log " ✅ SkillHub download success (HTTP $HTTP_CODE), extracting..." EXTRACT_TMP=$(mktemp -d) if unzip -q "${SKILLHUB_TMP}/${ASSET_NAME}.zip" -d "$EXTRACT_TMP" 2>>"$LOG_FILE"; then SKILL_SUBDIR=$(find "$EXTRACT_TMP" -maxdepth 1 -mindepth 1 -type d | head -1) if [ -n "$SKILL_SUBDIR" ] && [ -f "$SKILL_SUBDIR/SKILL.md" ]; then rm -rf "${INSTALLED_AT:?}"/* cp -r "$SKILL_SUBDIR"/. "$INSTALLED_AT/" SKILLHUB_OK=true log " ✅ SkillHub install complete" UPGRADE_RC=0 ``` The resulting installation is validated only through file presence, file count, and version text: ```bash OLD_COUNT=$(find "$BACKUP_DIR" -type f | wc -l | tr -d ' ') NEW_COUNT=$(find "$INSTALLED_AT" -type f | wc -l | tr -d ' ') if [ "$NEW_COUNT" -lt "$OLD_COUNT" ]; then log " ❌ File count decreased: $OLD_COUNT → $NEW_COUNT (possible incomplete upgrade)" GATE3_PASS=false else log " ✅ File count OK ($NEW_COUNT files, was $OLD_COUNT)" fi NEW_SKILL_VER=$(grep -E "^version:" "$INSTALLED_AT/SKILL.md" 2>/dev/null | head -1 | sed 's/version:[[:space:]]*//') ``` ### Technical Analysis The updater downloads a mutable ZIP archive from a third-party cloud-storage endpoint and replaces the installed Skill with its contents. It does not verify: - A cryptographic sig ...[truncated 1944 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/scan.sh:34
Finding

Inventory-Controlled Values Are Executed Through a Shell

Content
View full analysis
/dev/null | head -1 | cut -f1") ``` ```python inspect_output = run(f"clawhub inspect {aname} 2>/dev/null", timeout=15) ``` ```python versions_output = run(f"clawhub inspect {aname} --versions --limit 5 2>/dev/null", timeout=15) ``` ### Technical Analysis `subprocess.run(..., shell=True)` interprets metacharacters in the generated command. Package names and Skill names are not shell-quoted. The installation directory is surrounded by single quotes, but an embedded single quote can terminate that context and inject additional shell syntax. These values originate in `~/.openclaw/inventory.json`, which is generated from locally installed package metadata, Skill names, paths, and configuration records. A malicious local asset or a party able to alter the inventory can therefore transform the nominally read-only scan into arbitrary command execution. Suppressing standard error and returning an empty result on failure does not prevent exploitation; it can instead conceal evidence of the injected command. ### Attack Path 1. An attacker introduces ...[truncated 934 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/upgrade.sh:59
Finding

Untrusted Values Are Embedded Directly into Python Source Code

Content
View full analysis
/dev/null) || die "Asset '$ASSET_NAME' not found in inventory.json" ``` The same construction is used by the conflict check: ```bash CONFLICT_COUNT=$(python3 -c " import json inv = json.load(open('$INVENTORY_FILE')) matches = [a for a in inv['assets'] if a['name'] == '$ASSET_NAME'] sources = set(a.get('source','') for a in matches if a.get('type') != 'builtin') print(len(sources)) " 2>/dev/null || echo "1") ``` Inventory processing also embeds serialized configuration data into Python source: ```bash EXT_SOURCE=$(python3 -c " import json installs = json.loads('$INSTALLS_JSON') if '$INSTALLS_JSON' else {} rec = installs.get('$dirname', {}) print(rec.get('source', '')) " 2>/dev/null || echo "") if [ "$EXT_SOURCE" = "npm" ]; then NPM_PKG=$(python3 -c " import json installs = json.loads('$INSTALLS_JSON') print(installs.get('$dirname', {}).get('npmPackage', '$pkg_name')) " 2>/dev/null || echo "$pkg_name") ``` ### Technical Analysis Shell expansion occurs before `python3 -c` receives the source code. Values such as `$ASSET_NAME`, `$INSTALLS_JSON`, `$dirname`, and `$pkg_name` are inserted inside single-quoted Python string literals without escaping. An apostrophe in one of these values can terminate the Python string. Carefully crafted trailing content can then introduce Python expressions or statements. Python has direct access to the filesystem, process execution APIs, environme ...[truncated 1295 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/upgrade.sh:108
Finding

Mutable Inventory Paths Control Destructive Filesystem Operations

Content
View full analysis
> "$LOG_FILE" 2>&1 || true log " ✅ Rolled back extension + restarted gateway" fi ;; ``` ### Technical Analysis `INSTALLED_AT` is not canonicalized and is not required to reside under the configured OpenClaw skills or extensions directory. The `${INSTALLED_AT:?}` expansion prevents only an unset or empty variable; it does not reject: - `/` or another sensitive existing directory. - Parent-directory traversal. - A symbolic link leading outside the workspace. - The user's home directory. - An unrelated directory writable by the OpenClaw user. Consequently, possession of write access to `inventory.json ...[truncated 1455 chars]
Remediation
View remediation
Vulnerability Patterns
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (75)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The code is clearly related to upgrade management, so the general domain matches. However, the declared description emphasizes an 'intelligent' HITL workflow: scan assets, read changelogs, analyze risk, recommend upgrades, then execute only approved actions, and also answer what is installed. This script does not implement those behaviors. It accepts a specific asset name, looks it up in inventory, performs safety gates, backs it up, runs the upgrade command, verifies results, and rolls back on failure. That is a direct upgrade executor with safeguards, not an analyzer/recommender or inventory scanner. The mismatch is material because the primary user-facing promise includes pre-upgrade discovery/analysis and approval semantics that are absent from the supplied code.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

This finding correctly captures that the PRD embeds a dangerous deletion command, even though the target is /tmp/jiti/ rather than /. In a skill that orchestrates shell commands for upgrades, any destructive command needs strict validation because bad quoting, path handling, or symlink manipulation can lead to loss of unrelated data.

Content

Scanner excerpt · docs/PRD.md (reported line 259)May include surrounding context.

md
|------|------------------------|------------------|--------------------|
| **Gate 1** | 名字冲突检查 | Gateway 健康检查 | 记录当前版本 |
| **Gate 2 备份** | → `skill-backups/` | → `extensions-backup/` | → `plist-backup/` + `openclaw backup create` |
| **Gate 2 缓存** | 无 | `rm -rf /tmp/jiti/` | 无 |
| **Gate 2 执行** | `clawhub update` / `git pull` | `npm install <pkg>@latest` | `npm update -g openclaw` + `gateway install` |
| **Gate 2 配置保护** | 无 | 清理 extensions/ 下残留 .bak* | diff 新旧 plist,恢复自定义环境变量 |
| **Gate 3 验证** | SKILL.md 存在 + 文件完整 | gateway restart → 日志 plugin registered → status 全绿 | 版本确认 + status 全绿 + extensions 正常 |

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

This finding correctly captures that the PRD embeds a dangerous deletion command, even though the target is /tmp/jiti/ rather than /. In a skill that orchestrates shell commands for upgrades, any destructive command needs strict validation because bad quoting, path handling, or symlink manipulation can lead to loss of unrelated data.

Content

Scanner excerpt · docs/PRD.md (reported line 259)May include surrounding context.

md
|------|------------------------|------------------|--------------------|
| **Gate 1** | 名字冲突检查 | Gateway 健康检查 | 记录当前版本 |
| **Gate 2 备份** | → `skill-backups/` | → `extensions-backup/` | → `plist-backup/` + `openclaw backup create` |
| **Gate 2 缓存** | 无 | `rm -rf /tmp/jiti/` | 无 |
| **Gate 2 执行** | `clawhub update` / `git pull` | `npm install <pkg>@latest` | `npm update -g openclaw` + `gateway install` |
| **Gate 2 配置保护** | 无 | 清理 extensions/ 下残留 .bak* | diff 新旧 plist,恢复自定义环境变量 |
| **Gate 3 验证** | SKILL.md 存在 + 文件完整 | gateway restart → 日志 plugin registered → status 全绿 | 版本确认 + status 全绿 + extensions 正常 |

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

This finding correctly captures that the PRD embeds a dangerous deletion command, even though the target is /tmp/jiti/ rather than /. In a skill that orchestrates shell commands for upgrades, any destructive command needs strict validation because bad quoting, path handling, or symlink manipulation can lead to loss of unrelated data.

Content

Scanner excerpt · docs/PRD.md (reported line 259)May include surrounding context.

md
|------|------------------------|------------------|--------------------|
| **Gate 1** | 名字冲突检查 | Gateway 健康检查 | 记录当前版本 |
| **Gate 2 备份** | → `skill-backups/` | → `extensions-backup/` | → `plist-backup/` + `openclaw backup create` |
| **Gate 2 缓存** | 无 | `rm -rf /tmp/jiti/` | 无 |
| **Gate 2 执行** | `clawhub update` / `git pull` | `npm install <pkg>@latest` | `npm update -g openclaw` + `gateway install` |
| **Gate 2 配置保护** | 无 | 清理 extensions/ 下残留 .bak* | diff 新旧 plist,恢复自定义环境变量 |
| **Gate 3 验证** | SKILL.md 存在 + 文件完整 | gateway restart → 日志 plugin registered → status 全绿 | 版本确认 + status 全绿 + extensions 正常 |

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

The same force-delete guidance appears again in the isolation rules. Since this skill's mission is to inspect and modify installed assets, the context increases risk: a trusted updater issuing unsafe delete commands can damage the environment more readily than a passive documentation skill.

Content

Scanner excerpt · docs/PRD.md (reported line 336)May include surrounding context.

md
| 规则 | 说明 |
|------|------|
| **备份路径隔离** | 备份必须在 scanner/loader 扫描路径之外。Extension → `~/.openclaw/extensions-backup/`;Skill → `~/.openclaw/skill-backups/`。违反此规则会导致 duplicate id 等扫描冲突 |
| **缓存失效** | Extension(编译型)升级后必须清 jiti 缓存(`rm -rf /tmp/jiti/`)。Skill(markdown)不需要 |
| **配置保护** | Core 升级可能重新生成 plist/config,升级前快照关键配置文件,升级后 diff + 恢复用户自定义项 |

### Gate 3: Post-flight(升级后验证)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

The same force-delete guidance appears again in the isolation rules. Since this skill's mission is to inspect and modify installed assets, the context increases risk: a trusted updater issuing unsafe delete commands can damage the environment more readily than a passive documentation skill.

Content

Scanner excerpt · docs/PRD.md (reported line 336)May include surrounding context.

md
| 规则 | 说明 |
|------|------|
| **备份路径隔离** | 备份必须在 scanner/loader 扫描路径之外。Extension → `~/.openclaw/extensions-backup/`;Skill → `~/.openclaw/skill-backups/`。违反此规则会导致 duplicate id 等扫描冲突 |
| **缓存失效** | Extension(编译型)升级后必须清 jiti 缓存(`rm -rf /tmp/jiti/`)。Skill(markdown)不需要 |
| **配置保护** | Core 升级可能重新生成 plist/config,升级前快照关键配置文件,升级后 diff + 恢复用户自定义项 |

### Gate 3: Post-flight(升级后验证)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

The same force-delete guidance appears again in the isolation rules. Since this skill's mission is to inspect and modify installed assets, the context increases risk: a trusted updater issuing unsafe delete commands can damage the environment more readily than a passive documentation skill.

Content

Scanner excerpt · docs/PRD.md (reported line 336)May include surrounding context.

md
| 规则 | 说明 |
|------|------|
| **备份路径隔离** | 备份必须在 scanner/loader 扫描路径之外。Extension → `~/.openclaw/extensions-backup/`;Skill → `~/.openclaw/skill-backups/`。违反此规则会导致 duplicate id 等扫描冲突 |
| **缓存失效** | Extension(编译型)升级后必须清 jiti 缓存(`rm -rf /tmp/jiti/`)。Skill(markdown)不需要 |
| **配置保护** | Core 升级可能重新生成 plist/config,升级前快照关键配置文件,升级后 diff + 恢复用户自定义项 |

### Gate 3: Post-flight(升级后验证)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

The same force-delete guidance appears again in the isolation rules. Since this skill's mission is to inspect and modify installed assets, the context increases risk: a trusted updater issuing unsafe delete commands can damage the environment more readily than a passive documentation skill.

Content

Scanner excerpt · docs/PRD.md (reported line 336)May include surrounding context.

md
| 规则 | 说明 |
|------|------|
| **备份路径隔离** | 备份必须在 scanner/loader 扫描路径之外。Extension → `~/.openclaw/extensions-backup/`;Skill → `~/.openclaw/skill-backups/`。违反此规则会导致 duplicate id 等扫描冲突 |
| **缓存失效** | Extension(编译型)升级后必须清 jiti 缓存(`rm -rf /tmp/jiti/`)。Skill(markdown)不需要 |
| **配置保护** | Core 升级可能重新生成 plist/config,升级前快照关键配置文件,升级后 diff + 恢复用户自定义项 |

### Gate 3: Post-flight(升级后验证)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

The broader extension procedure also includes find ... -exec rm -rf {} +, which compounds the risk profile around destructive command usage. Although intended for cleanup of backup directories, these patterns are hazardous in automation-heavy upgrade tooling because directory contents and names may not be as trusted as assumed.

Content

Scanner excerpt · references/three-gates.md (reported line 25)May include surrounding context.

md
**Extension** (high risk):
1. Backup → extensions-backup/
2. `rm -rf /tmp/jiti/` (mandatory — jiti caches compiled TS)
3. `npm install <pkg>@latest`
4. `find extensions/ -maxdepth 1 -name "*.bak*" -type d -exec rm -rf {} +`

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
88% confidence
Finding

The broader extension procedure also includes find ... -exec rm -rf {} +, which compounds the risk profile around destructive command usage. Although intended for cleanup of backup directories, these patterns are hazardous in automation-heavy upgrade tooling because directory contents and names may not be as trusted as assumed.

Content

Scanner excerpt · references/three-gates.md (reported line 25)May include surrounding context.

md
**Extension** (high risk):
1. Backup → extensions-backup/
2. `rm -rf /tmp/jiti/` (mandatory — jiti caches compiled TS)
3. `npm install <pkg>@latest`
4. `find extensions/ -maxdepth 1 -name "*.bak*" -type d -exec rm -rf {} +`

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

The broader extension procedure also includes find ... -exec rm -rf {} +, which compounds the risk profile around destructive command usage. Although intended for cleanup of backup directories, these patterns are hazardous in automation-heavy upgrade tooling because directory contents and names may not be as trusted as assumed.

Content

Scanner excerpt · references/three-gates.md (reported line 25)May include surrounding context.

md
**Extension** (high risk):
1. Backup → extensions-backup/
2. `rm -rf /tmp/jiti/` (mandatory — jiti caches compiled TS)
3. `npm install <pkg>@latest`
4. `find extensions/ -maxdepth 1 -name "*.bak*" -type d -exec rm -rf {} +`

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
94% confidence
Finding

The rollback section repeats the same unsafe deletion primitive, reinforcing a pattern of forceful cleanup by shell command. In the context of a smart updater that may eventually automate remediation, this increases the likelihood of unsafe execution and broadens the blast radius of implementation mistakes.

Content

Scanner excerpt · references/three-gates.md (reported line 55)May include surrounding context.

md
# Extension
cp -r ~/.openclaw/extensions-backup/<name>-<ver>/ ~/.openclaw/extensions/<name>/
rm -rf /tmp/jiti/
openclaw gateway restart

# Core

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
94% confidence
Finding

The rollback section repeats the same unsafe deletion primitive, reinforcing a pattern of forceful cleanup by shell command. In the context of a smart updater that may eventually automate remediation, this increases the likelihood of unsafe execution and broadens the blast radius of implementation mistakes.

Content

Scanner excerpt · references/three-gates.md (reported line 55)May include surrounding context.

md
# Extension
cp -r ~/.openclaw/extensions-backup/<name>-<ver>/ ~/.openclaw/extensions/<name>/
rm -rf /tmp/jiti/
openclaw gateway restart

# Core

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/inventory.sh (reported line 324)May include surrounding context.

sh
" > /tmp/smart-updater-count.txt

TOTAL=$(cat /tmp/smart-updater-count.txt)
rm -f /tmp/smart-updater-count.txt

log ""
log "✅ Inventory saved to $INVENTORY_FILE ($TOTAL assets)"

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

The helper uses subprocess.run(..., shell=True) and later interpolates untrusted inventory-derived fields such as npmPackage, installedAt, repo/name, and currentVersion into shell command strings. An attacker who can influence inventory.json or asset metadata can inject shell metacharacters and achieve arbitrary command execution during a scan, which is especially risky because this skill is designed to inspect third-party packages and repositories.

Content

Scanner excerpt · scripts/scan.sh (reported line 39)May include surrounding context.

sh
def run(cmd, timeout=15):
    """Run a command and return stdout, or empty string on failure."""
    try:
        r = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=timeout)
        return r.stdout.strip()
    except Exception:
        return ""

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
100% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/upgrade.sh (reported line 155)May include surrounding context.

sh
# Clear jiti cache (mandatory for extensions)
    log "  Clearing jiti cache..."
    if ! $DRY_RUN; then
      rm -rf /tmp/jiti/
    fi
    log "  ✅ jiti cache cleared"
    ;;

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
100% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/upgrade.sh (reported line 311)May include surrounding context.

sh
# Clear jiti cache (mandatory for extensions)
    log "  Clearing jiti cache..."
    if ! $DRY_RUN; then
      rm -rf /tmp/jiti/
    fi
    log "  ✅ jiti cache cleared"
    ;;

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
100% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/upgrade.sh (reported line 460)May include surrounding context.

sh
# Clear jiti cache (mandatory for extensions)
    log "  Clearing jiti cache..."
    if ! $DRY_RUN; then
      rm -rf /tmp/jiti/
    fi
    log "  ✅ jiti cache cleared"
    ;;

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
100% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/upgrade.sh (reported line 155)May include surrounding context.

sh
# Clear jiti cache (mandatory for extensions)
    log "  Clearing jiti cache..."
    if ! $DRY_RUN; then
      rm -rf /tmp/jiti/
    fi
    log "  ✅ jiti cache cleared"
    ;;

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
100% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/upgrade.sh (reported line 311)May include surrounding context.

sh
# Clear jiti cache (mandatory for extensions)
    log "  Clearing jiti cache..."
    if ! $DRY_RUN; then
      rm -rf /tmp/jiti/
    fi
    log "  ✅ jiti cache cleared"
    ;;

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
100% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/upgrade.sh (reported line 460)May include surrounding context.

sh
# Clear jiti cache (mandatory for extensions)
    log "  Clearing jiti cache..."
    if ! $DRY_RUN; then
      rm -rf /tmp/jiti/
    fi
    log "  ✅ jiti cache cleared"
    ;;

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

The script recursively deletes all files under the installation directory before the new package is fully committed, using a path derived from inventory metadata. Even with ${INSTALLED_AT:?} protecting against empty values, tampered inventory data or an unexpected install path could cause deletion of unintended files, and any subsequent copy failure leaves the asset broken.

Content

Scanner excerpt · scripts/upgrade.sh (reported line 194)May include surrounding context.

sh
SKILL_SUBDIR=$(find "$EXTRACT_TMP" -maxdepth 1 -mindepth 1 -type d | head -1)
          if [ -n "$SKILL_SUBDIR" ] && [ -f "$SKILL_SUBDIR/SKILL.md" ]; then
            # Replace contents of INSTALLED_AT
            rm -rf "${INSTALLED_AT:?}"/*
            cp -r "$SKILL_SUBDIR"/. "$INSTALLED_AT/"
            SKILLHUB_OK=true
            log "  ✅ SkillHub install complete"

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill instructs use of shell commands, network access, and file-producing workflows, but it declares no explicit tool scope or permission boundaries. For an updater skill, these capabilities are highly sensitive because they can fetch remote content, modify installed components, and write files without a machine-readable least-privilege contract, increasing the chance of unsafe invocation or overbroad agent execution.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger conditions are broad enough to activate on common conversational phrases about updates, versions, or what is installed. In a skill with shell, network, and file-modifying behavior, overbroad routing can cause unintended execution of inventory, scan, or even upgrade-related flows in contexts where the user did not clearly intend to invoke this powerful updater.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The PRD title and the user-facing interaction examples are written in Chinese, and the trigger example later specifies a Chinese command (升级检查) as the entry point. There is no indication that users may choose another language or that the skill is intended only for a Chinese-specific environment, which can violate language/locale policy requirements.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.