Exec Security for Openclaw

A pre-flight security validation skill that scans shell commands for dangerous patterns, destructive operations, and data leaks before they execute.

yozu
v1.0.0
Apr 1, 2026
0
827
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install exec-security

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install exec-security using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Exec Security?

Exec Security serves as a critical defensive layer for AI agents and developers interacting with terminal environments. It provides a comprehensive pre-execution audit for shell commands, identifying high-risk patterns such as recursive deletions, unauthorized system file modifications, and credential exfiltration. By integrating this into your Openclaw Skills workflow, you ensure that programmatic command generation remains within safe boundaries.

The skill categorizes risks into four severity levels, ranging from critical blocks for destructive actions like filesystem wipes to warnings for suspicious Unicode obfuscation or resource exhaustion. It doesn't just block; it educates by suggesting safe alternatives like using length checks for secrets instead of echoing them, or utilizing recovery-focused tools like trash instead of permanent removal.

Exec Security Use Cases

  • Validating commands constructed programmatically from external data or LLM outputs.
  • Protecting sensitive directories such as .ssh or /etc/ from accidental or malicious modification.
  • Preventing accidental credential exposure in logs or terminal output during automated scripts.
  • Auditing complex piped commands and remote scripts (download-and-execute) before they touch the local system.
  • Detecting hidden Unicode attacks or homoglyphs in commands sourced from untrusted web content.

How Exec Security Works

  1. The skill intercepts the proposed shell command string before it is passed to the system executive.
  2. It performs a multi-stage scan looking for destructive patterns, sensitive path references, and shell-specific obfuscation techniques.
  3. The command is mapped against a risk matrix to determine the security level: Critical, High, Medium, or Low.
  4. If a risk is detected, the skill provides a detailed explanation of the threat and, where possible, a safer command alternative.
  5. Depending on the risk level, the skill either blocks execution entirely, requests explicit user confirmation, or issues a warning before proceeding.

Exec Security Setup

To integrate this security check into your environment, add the logic to your Openclaw Skills configuration. While it is advisory, it works best when paired with native execution approval systems.

# Example of checking a command before execution
# 1. Pass the command to the exec-security scanner
# 2. Review the risk level and suggested alternatives
# 3. Proceed only if risk is Low or user-confirmed

Exec Security Data Schema & Taxonomy

Exec Security utilizes a structured risk taxonomy to organize its audit results. The following table describes the primary risk categories used within the Openclaw Skills framework:

Category Description Examples
Destructive Permanent data loss operations rm -rf, dd, mkfs
Exfiltration Outbound data or secret leaks curl -d @file, echo $API_KEY
System Integrity Unauthorized system file changes /etc/passwd, .ssh/authorized_keys
Injection Shell manipulation or RCE eval, LD_PRELOAD, curl
Resources Denial of service patterns fork bombs, disk fill, infinite loops

Exec Security Advanced Features

  • Multi-shell support covering specific vulnerabilities in both Bash (hex-encoding, namerefs) and Zsh (zmodload, equals expansion).
  • Automated path resolution using readlink to prevent Symlink and Time-of-Check to Time-of-Use (TOCTOU) attacks.
  • Context-aware variable scanning that distinguishes between generic environment variables and sensitive credentials.
  • Heuristic detection of Unicode obfuscation, including zero-width spaces and right-to-left override characters.
  • Integration ready for defense-in-depth strategies within any Openclaw Skills automated agent.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*