Token导航 LogoToken导航TokenDH.com
开发执行命令clawhub未标认证来源可访问clear审计通过

free-bash-safety-primer免费 bash 安全入门

Agent Skill

free-bash-safety-primer 用于补充开发相关能力,适合在 OpenClaw 中需要让 Agent 承接开发相关任务时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

4,504

周安装

184

GitHub Stars

公开资料未说明

下载量

1,443
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:free-bash-safety-primer(免费 bash 安全入门)
来源仓库:https://github.com/thebrierfox/free-bash-safety-primer
安装命令:
openclaw skills install free-bash-safety-primer
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install free-bash-safety-primer

简介

用于了解 OpenClaw 代理执行 shell 命令时的安全风险。

  • 涵盖混淆、注入与编码攻击等常见威胁类型。
  • 帮助规避自主操作可能引发的安全漏洞。free-bash-safety-primer 属于开发类 Skill,可作为该场景下的辅助能力补充。
  • 安装命令:openclaw skills install free-bash-safety-primer。
  • 建议结合实际命令上下文评估潜在攻击面。

SKILL.md

name
OpenClaw Bash Safety — Why Your Agent Is a Security Risk
slug
openclaw-bash-safety-agent-security-risk
version
1.0.1
author
IntuiTek
tags
[security, production, engineering, hardening, bash, clawhavoc]
description
Understand the attack surface created when an OpenClaw agent executes shell commands autonomously. Covers obfuscation, injection, encoding attacks, and why ClawHavoc compromised 341 skills. Free primer for the Bash Security Validator skill.

OpenClaw Bash Safety — Why Your Agent Is a Security Risk

What Autonomous Bash Execution Actually Means

When you give an OpenClaw agent access to the exec tool, you are giving an AI model the ability to run arbitrary shell commands on your machine — your files, your network, your credentials, your hardware.

Most operators understand this abstractly. Fewer understand what it means when the agent is running autonomously, 24/7, executing commands generated from tool outputs, web content, files it reads, and messages it receives.

Every one of those inputs is a potential injection vector.

Default OpenClaw has no validation layer between the model's decision to run a command and the shell that executes it. The model is the only check. And models can be manipulated.

The Categories of Attack That Exist

When an agent executes bash autonomously, the attack surface spans several distinct categories. Understanding the categories is more important than knowing specific exploits — exploits evolve, categories don't.

Command Obfuscation

Shell commands can be written in ways that hide their intent from a model evaluating them as text. Variable substitution, brace expansion, heredocs, and character encoding tricks can make a destructive command unrecognizable as dangerous without AST-level parsing.

A model reading ${dangerous_var} as a string sees a variable reference. The shell sees whatever is in that variable.

Substitution Injection

Backtick substitution, $() process substitution, and <() process redirection allow commands to be constructed from the output of other commands. An agent building a shell command from external data — a filename, a URL response, a file it read — can have malicious commands injected into the construction.

This is the bash equivalent of SQL injection, and it's trivially achievable against agents that don't strip or validate command construction inputs.

Encoding and Unicode Attacks

Unicode homoglyphs, zero-width characters, right-to-left overrides, and multi-byte sequences can make a command look like one thing to a model's text processing while the shell interprets it differently.

A filename containing a right-to-left override can display as readme.txt while actually ending in .exe. A command containing Unicode homoglyphs for /etc/passwd looks like a benign path until it executes.

Shell-Specific Escape Vectors

Bash and Zsh have different dangerous builtins, different history mechanisms, and different expansion behaviors. A validation layer written for Bash doesn't necessarily catch Zsh-specific attacks. Production security covers both shells, separately, because the dangerous commands are not the same list.

Persistence and Escalation Vectors

These are the attacks that matter most for autonomous agents: commands that modify cron, init, or systemd entries; commands that install backdoors into shell profiles; commands that create persistent network listeners; commands that modify sudo configuration. An agent that runs one of these once, even accidentally, has a problem that survives reboots.

Why ClawHavoc Happened

In early 2026, 341 skills on ClawHub were found to contain malicious bash payloads — roughly 20% of the active skill library at the time.

The mechanism was straightforward: skills execute code in the agent's context. Skills that included setup scripts, configuration helpers, or initialization routines had those routines execute with full agent permissions when the skill was installed. No validation layer checked those scripts before execution.

ClawHavoc wasn't a sophisticated supply chain attack. It was an absence of validation. Any operator who installed affected skills and had exec access enabled was exposed.

The affected skills looked legitimate. They had reasonable descriptions, normal-looking metadata, and plausible functionality. The malicious payload was in the setup script — the part most operators never read.

Why Regex Validation Isn't Enough

The obvious fix is regex pattern matching: block commands that contain rm -rf, curl | bash, known exfiltration patterns. Most simple bash validators work this way.

The problem is that regex operates on text. Shell execution operates on parsed syntax trees. You can write a command that passes every reasonable regex check and still executes destructively once the shell expands variables, resolves aliases, and processes substitutions.

Production bash security requires validation at multiple levels:

  • Text level (catches obvious patterns)
  • Structural level (catches substitution and expansion tricks)
  • Semantic level (catches context-dependent risks like relative paths in

privileged operations)

  • Shell-specific level (catches builtins and behaviors that differ between

Bash and Zsh)

Each level catches a different class of attack. Skipping any one of them leaves a category of attack unblocked.

The Bottom Line

If your OpenClaw agent has exec access — and most useful configurations do — and it operates on any external input (messages, files, web content, tool outputs), you have an unvalidated shell execution surface.

This was acceptable when agents were supervised demos. It is not acceptable when they run autonomously.

ClawHavoc demonstrated that the threat is real and active. The question is whether you address it before or after something goes wrong on your machine.


*The full 23-validator production security chain — validated through production Claude Code deployments — is available as the Bash Security Validator skill on Claw Mart:*

*https://www.shopclawmart.com/listings/bash-security-validator-production-openclaw-shell-safety-ded33491*

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

87.43%
按下载量换算1,262

安全审计

VirusTotal

未展示

ClawScan

通过

Static analysis

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 openclaw skills install free-bash-safety-primer 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills