← 返回 Skills 市场
chengyusheng188

Safe Shell

作者 ChengYusheng · GitHub ↗ · v2.0.0 · MIT-0
cross-platform ⚠ suspicious
437
总下载
0
收藏
4
当前安装
3
版本数
在 OpenClaw 中安装
/install safe-shell
功能描述
安全命令行执行器 - 仅允许读取类和查询类命令,阻断所有危险操作。安装命令:npx clawhub@latest install safe-shell
安全使用建议
This skill appears internally consistent: it lists allowed read-only commands, includes a validator JS, and asks for no secrets. Two practical cautions before installing: (1) the provided script only validates a command string and explicitly does not perform execution — confirm how your agent/platform will run validated commands and that execution cannot bypass the validator; (2) review the validator’s blocklist/whitelist to ensure it covers your threat model (some edge-case command forms or redirections might bypass or be overly restrictive). If you need the skill to actually execute commands, require that the platform enforces calling this validator first and never runs unvalidated shell input.
功能分析
Type: OpenClaw Skill Name: safe-shell Version: 2.0.0 The skill claims to be a 'safe' shell executor but lacks actual command execution logic in `safe-shell.js`, acting only as a validator that prints a success message without returning command output. While branded as safe and non-destructive, it explicitly allows high-risk read operations such as `env` (accessing environment variables/secrets) and `cat` (reading arbitrary files), which are primary vectors for data exfiltration in AI agent environments. The discrepancy between its stated purpose and its non-functional implementation, combined with the promotion of 'safe' access to sensitive system information, warrants a suspicious classification.
能力评估
Purpose & Capability
The skill claims to be a 'safe' read-only shell executor and its SKILL.md and code implement a whitelist/blocklist validator. It requests no credentials or unusual binaries. Minor mismatch: the included safe-shell.js only validates commands and explicitly does not execute them ('实际执行需通过 exec 工具'), while the description may lead users to expect an out-of-the-box executor.
Instruction Scope
SKILL.md restricts allowed commands to read/query types and enumerates many forbidden operations; the runtime JS enforces blocking patterns and a whitelist. The instructions do not ask the agent to read unrelated files or transmit secrets. The validator covers common dangerous patterns (execution, downloads, redirection).
Install Mechanism
No install spec (instruction-only) and included JS is small and non-networking. Nothing is downloaded from untrusted URLs and no archives are extracted.
Credentials
The skill requires no environment variables, credentials, or config paths — proportionate for a read-only shell helper.
Persistence & Privilege
always is false and the skill does not request elevated persistence. It does not modify other skills or system configs.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install safe-shell
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /safe-shell 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.0.0
safe-shell 2.0.0 introduces major enhancements for cross-platform safety: - 新增对 Windows(CMD 和 PowerShell)的全面支持,所有命令分平台列出 - 增强命令白名单与黑名单,详细补充了 Windows/macOS/Linux 的危险命令 - 专门添加 PowerShell 只读白名单与危险操作黑名单,强化安全防护 - 新增“平台检测与适配”机制,自动适配对应系统安全策略 - 文档全面升级,细化每条命令的适用平台和说明
v1.0.2
- 升级为更严格的“只读”安全模式,仅允许查询和读取类命令 - 移除所有可能进行修改、删除、执行或网络下载的命令支持 - 白名单命令范围收缩:仅保留 `ls`, `cat`, `ps`, `df`, `free`, `ifconfig`, `ping`, `which`, 等纯查询命令 - 新增命令禁止清单,明确禁止如 `rm`、`touch`、`ssh`、`curl`、`python`、`brew` 等任何可能修改或执行内容的命令 - 强调应用于 AI 交互、监控与排查等“零破坏风险”场景
v1.0.0
Safe Shell 1.0.0 – Initial Release - Introduces a secure command executor allowing only predefined safe (whitelisted) commands. - Blocks dangerous operations such as rm -rf, shutdown, kill, sudo, and piped command executions. - Supports low-risk actions: listing/viewing files, monitoring system status, basic file operations, and selected developer tools. - Includes security checks on command type and allowed paths before execution. - Explicitly provides user feedback on rejected or risky commands, ensuring safer CLI usage.
元数据
Slug safe-shell
版本 2.0.0
许可证 MIT-0
累计安装 4
当前安装数 4
历史版本数 3
常见问题

Safe Shell 是什么?

安全命令行执行器 - 仅允许读取类和查询类命令,阻断所有危险操作。安装命令:npx clawhub@latest install safe-shell. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 437 次。

如何安装 Safe Shell?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install safe-shell」即可一键安装,无需额外配置。

Safe Shell 是免费的吗?

是的,Safe Shell 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Safe Shell 支持哪些平台?

Safe Shell 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Safe Shell?

由 ChengYusheng(@chengyusheng188)开发并维护,当前版本 v2.0.0。

💬 留言讨论