360 Secure SkillHub
360 安全技能中心

Agent SecuritySandbox

该 Skill 提供基于 Docker 的隔离沙箱,通过 scripts/mass 包装执行不可信命令或第三方脚本:丢弃全部 Linux 能力、禁用网络、以非 root 用户运行,并用 seccomp 配置过滤敏感系统调用,返回沙箱内标准输出与错误,容器执行后即删除。

assix
assix
热度 28.31
最近更新 2026-05-11 17:48:12
分类:安全依赖:代码执行 / 读写文件应用场景:DevOps / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add agent-securitysandbox
Metadata
name
mass-sandbox
description
Execute untrusted code or commands in a secure, isolated Docker environment. Use when asked to run unknown scripts, third-party skills, or any code that might pose a security risk to the host system.
metadata
{"openclaw":{"requires":{"bins":["docker"]}}}

Multi-Agent Security Sandbox (MASS)

Overview

This skill provides a secure "clean room" for executing and monitoring untrusted commands and code. It uses Docker with restricted capabilities, no network access, and a custom seccomp profile to isolate the execution from your host system.

When to Use

  • When asked to run a script or command from an untrusted source.
  • When testing a new agent skill that requires system access.
  • When you need to verify the behavior of code that might be malicious.

Workflow

1. Identify Untrusted Input

Determine if the command or script you are asked to run should be sandboxed.

2. Run in Sandbox

Use the mass script located in the skill's scripts/ directory to wrap the command.

Usage:

./scripts/mass "<command>"

Example: To run a suspicious Python script:

./scripts/mass "python3 untrusted_script.py"

3. Review Output

The mass tool will return the stdout and stderr from the sandbox. If the command was blocked by security policies (e.g., trying to access sensitive files or making network calls), the output will reflect the failure.

Security Features

  • Capabilities Dropped: All Linux capabilities are dropped (--cap-drop=ALL).
  • No Network: Network access is disabled by default (--network=none).
  • Non-Root User: Code runs as sandboxuser.
  • Syscall Filtering: Sensitive system calls are blocked via seccomp.json.

Limitations

  • No GUI: The sandbox is CLI-only.
  • Persistence: Any changes made inside the container are lost after execution (--rm).
  • Dependencies: Only tools installed in the Dockerfile are available.