Back to skill

Security audit

LeiAlexZhang/local-skill-installer

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it claims, but its ZIP checks are too weak for safely installing a package into an active skills folder.

Review the ZIP yourself before using this skill. Prefer a hardened installer that validates archive entries before extraction, rejects links and traversal paths, enforces size and file-count limits, stages the package in quarantine, and asks for explicit confirmation before activating it.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:27
Finding
Insufficient ZIP Archive Validation Before Skill Installation## Vulnerability Details **File Location**: `SKILL.md`, lines 27-42 **Vulnerability Type**: Unsafe archive extraction and insufficient package validation **Risk Level**: Medium ### Vulnerable Code Snippet ```markdown 1. Confirm the zip file exists. 2. Create a temporary extraction directory. 3. Unzip the package into the temporary directory. 4. Inspect the extracted content. 5. Validate that it looks like an OpenClaw skill: - must contain `SKILL.md` - may also contain `_meta.json`, `assets`, `agents`, `references` 6. Determine the correct active Skills directory for this OpenClaw installation. - Prefer `~/.openclaw/skills/` for shared local skills if appropriate. - If the current workspace has a dedicated `skills/` directory and the context indicates workspace-local installation, use that instead. 7. Determine the final skill folder name. 8. If the target folder already exists: - do not overwrite - report the existing path and stop 9. Move the extracted skill folder into the Skills directory. ``` ### Technical Analysis The installation procedure directs the agent to unzip an untrusted local package before defining mandatory archive-entry security checks. Its validation requirement is limited to confirming that the extracted package contains `SKILL.md`. The procedure does not require the agent to reject: - Absolute archive paths or entries containing `..` - Entries whose resolved paths escape the temporary extraction directory - Symbolic or hard links - Device nodes, sockets, or other special files - Excessive uncompressed sizes, compression ratios, file counts, or nesting depths - Packages containing multiple ambiguous root directories - Unexpected executable content - Malicious instructions embedded in the installed `SKILL.md` The instruction not to run scripts during installation reduces immediate execution risk but does not address filesystem attacks during extraction o ...[truncated 1952 chars]
Remediation
## Remediation Suggestions 1. Enumerate all ZIP entries before extraction and reject absolute paths, drive-prefixed paths, empty or ambiguous names, and any entry containing a `..` component. 2. Resolve each intended destination path and verify that it remains strictly beneath the newly created temporary directory. 3. Reject symbolic links, hard links, device nodes, sockets, FIFOs, and other special file types. 4. Enforce limits on compressed size, total uncompressed size, compression ratio, entry count, individual file size, and directory depth. 5. Require exactly one well-formed skill root and reject unexpected content outside that root. 6. Create the temporary directory securely with restrictive permissions and guaranteed unique naming. 7. Extract with a library or tool configuration that does not follow links and cannot write outside the destination. 8. Validate the entire resulting filesystem tree again after extraction. 9. Review `SKILL.md` and all associated configuration, scripts, agents, assets, and references for dangerous instructions or executable behavior before activation. 10. Keep the package in a quarantine or staging directory until validation completes, and request explicit user confirmation before moving it into the active Skills directory. 11. Move the validated package atomically and without overwrite semantics. 12. Ensure cleanup only removes the exact temporary directory created by the installer.

T09 · Insecure Skill Coding Practices

Warning
Location
local-skill-installer-1.0.0/SKILL.md:27
Finding
Insufficient ZIP Archive Validation Before Skill Installation in Packaged Copy## Vulnerability Details **File Location**: `local-skill-installer-1.0.0/SKILL.md`, lines 27-42 **Vulnerability Type**: Unsafe archive extraction and insufficient package validation **Risk Level**: Medium ### Vulnerable Code Snippet ```markdown 1. Confirm the zip file exists. 2. Create a temporary extraction directory. 3. Unzip the package into the temporary directory. 4. Inspect the extracted content. 5. Validate that it looks like an OpenClaw skill: - must contain `SKILL.md` - may also contain `_meta.json`, `assets`, `agents`, `references` 6. Determine the correct active Skills directory for this OpenClaw installation. - Prefer `~/.openclaw/skills/` for shared local skills if appropriate. - If the current workspace has a dedicated `skills/` directory and the context indicates workspace-local installation, use that instead. 7. Determine the final skill folder name. 8. If the target folder already exists: - do not overwrite - report the existing path and stop 9. Move the extracted skill folder into the Skills directory. ``` ### Technical Analysis This packaged copy contains the same vulnerable installation procedure as the root `SKILL.md`. It requires extraction before specifying archive-entry security validation and treats the presence of `SKILL.md` as sufficient evidence that the package resembles a valid OpenClaw skill. No mandatory controls are defined for traversal paths, absolute paths, links, special files, archive bombs, excessive entry counts, multiple package roots, unexpected executable content, or hostile instructions within the skill. Consequently, security depends on unspecified extraction-tool behavior and discretionary inspection by the agent. Although the procedure prohibits running scripts inside the ZIP during installation, it still places the extracted package in an active Skills directory. This can expose later sessions to unreviewed skill instructions and does not pre ...[truncated 1433 chars]
Remediation
## Remediation Suggestions Apply the same hardening to both copies so the distributed package cannot retain an outdated vulnerable procedure: 1. Inspect and validate every ZIP entry before extraction. 2. Reject absolute paths, traversal components, links, special files, and destinations that resolve outside the temporary directory. 3. Enforce strict archive size, compression-ratio, entry-count, file-size, and nesting-depth limits. 4. Require a single package root with an expected and explicitly allowed structure. 5. Use a securely created temporary directory with restrictive permissions. 6. Extract without following links, then validate the resulting tree a second time. 7. Perform a security review of `SKILL.md` and every included file rather than relying only on file presence. 8. Keep validated content quarantined until the user explicitly approves activation. 9. Install atomically and refuse all overwrite operations. 10. Update the root and packaged copies together and add a release check that verifies they remain identical.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Ae1

High
Category
analysis-evasion
Content
- must contain `SKILL.md`
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Session Persistence

Medium
Category
Rogue Agent
Content
- Only work with local zip files.
- Prefer Linux paths, not Windows `C:\...` paths.
- Use `move`, not `copy`, to avoid duplicate files.
- Do not overwrite an existing skill folder without checking first.
- If the same skill name already exists, stop and report the conflict.
- Clean up temporary files after finishing.
- Do not run scripts inside the zip.
Confidence
60% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
- Only work with local zip files.
- Prefer Linux paths, not Windows `C:\...` paths.
- Use `move`, not `copy`, to avoid duplicate files.
- Do not overwrite an existing skill folder without checking first.
- If the same skill name already exists, stop and report the conflict.
- Clean up temporary files after finishing.
- Do not run scripts inside the zip.
Confidence
75% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
- Only work with local zip files.
- Prefer Linux paths, not Windows `C:\...` paths.
- Use `move`, not `copy`, to avoid duplicate files.
- Do not overwrite an existing skill folder without checking first.
- If the same skill name already exists, stop and report the conflict.
- Clean up temporary files after finishing.
- Do not run scripts inside the zip.
Confidence
75% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Session Persistence

Medium
Category
Rogue Agent
Content
- Only work with local zip files.
- Prefer Linux paths, not Windows `C:\...` paths.
- Use `move`, not `copy`, to avoid duplicate files.
- Do not overwrite an existing skill folder without checking first.
- If the same skill name already exists, stop and report the conflict.
- Clean up temporary files after finishing.
- Do not run scripts inside the zip.
Confidence
72% confidence
Finding
This skill persists changes to the local environment by moving extracted content into an active Skills directory, which creates durable state across sessions. In context this persistence is intentional, but it is still security-relevant because a malicious or unsafe zip could be installed and remain active beyond the current interaction, especially since the validation only checks for the presence of `SKILL.md` and loosely expected directories.

Missing User Warnings

Low
Confidence
87% confidence
Finding
This markdown file describes a file-moving installation step that changes the user's local skills directory. While it reports steps and conflict handling, it does not explicitly warn that the operation will modify local files or install into a live skills location before execution.

Static analysis

No suspicious patterns detected.