Token导航 LogoToken导航

Agent Skill · 研究检索

seatbelt-sandboxer(安全带沙箱)

seatbelt-sandboxer 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

seatbelt-sandboxer 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为可写文件;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 4,419。

总安装 32,592周安装 1,441GitHub Stars 4,912下载 11,424核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:seatbelt-sandboxer(安全带沙箱)
来源仓库:https://github.com/trailofbits/skills
仓库路径:skills/seatbelt-sandboxer
安装命令:
npx skills add https://github.com/trailofbits/skills --skill seatbelt-sandboxer
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/trailofbits/skills --skill seatbelt-sandboxer

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

生成最小的、基于白名单的 macOS Seatbelt 沙盒配置文件以进行应用程序隔离。

配置文件通过拒绝所有默认设置以及跨 15 个以上资源类别的显式允许列表来限制文件、网络、进程和 IPC 访问 包括分步分析方法:确定需求、从最低限度开始、添加文件/网络访问、使用 sandbox-exec 进行迭代测试 支持参数替换(HOME、WORKING_DIR)和路径过滤器(子路径、文字、正则表达式)以实现灵活配置 通过使用帮助程序脚本调度程序为每个子命令创建单独的配置文件来处理多命令应用程序 提供网络隔离选项:全部阻止、仅本地主机或不受限制;包括常见的故障模式和修复

来源仓库内路径:skills/seatbelt-sandboxer

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/trailofbits/skills --skill seatbelt-sandboxer;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要可写文件,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

seatbelt-sandboxer 怎么安装?

在终端执行 npx skills add https://github.com/trailofbits/skills --skill seatbelt-sandboxer。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

seatbelt-sandboxer 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

seatbelt-sandboxer 需要什么权限?

权限级别是可写文件。该 Skill 可能写入或修改本地文件,使用前需要确认目标目录和修改范围。

seatbelt-sandboxer 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

seatbelt-sandboxer 用的人多吗?

公开数据是累计安装 32,592 次,近一周安装 1,441 次,下载 11,424 次,GitHub 4,912 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

seatbelt-sandboxer 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。
  • 来源仓库有 4,912 星,维护活跃度相对可查。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
seatbelt-sandboxer

安全带沙箱 · 本页

32,5924,912可写文件未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

macOS Seatbelt Sandbox Profiling

Generate minimally-permissioned allowlist-based Seatbelt sandbox configurations for applications.

When to Use

  • User asks to "sandbox", "isolate", or "restrict" an application on macOS
  • Sandboxing any macOS process that needs restricted file/network access
  • Creating defense-in-depth isolation if supply chain attacks are a concern

When NOT to Use

  • Linux containers (use seccomp-bpf, AppArmor, or namespaces instead)
  • Windows applications
  • Applications that legitimately need broad system access
  • Quick one-off scripts where sandboxing overhead isn't justified

Profiling Methodology

Step 1: Identify Application Requirements

Determine what the application needs across these resource categories:

CategoryOperationsCommon Use Cases
File Readfile-read-data, file-read-metadata, file-read-xattr, file-test-existence, file-map-executableReading source files, configs, libraries
File Writefile-write-data, file-write-create, file-write-unlink, file-write-mode, file-write-xattr, file-clone, file-linkOutput files, caches, temp files
Networknetwork-bind, network-inbound, network-outboundServers, API calls, package downloads
Processprocess-fork, process-exec, process-exec-interpreter, process-info*, process-codesigning*Spawning child processes, scripts
Mach IPCmach-lookup, mach-register, mach-bootstrap, mach-task-nameSystem services, XPC, notifications
POSIX IPCipc-posix-shm*, ipc-posix-sem*Shared memory, semaphores
Sysctlsysctl-read, sysctl-writeReading system info (CPU, memory)
IOKitiokit-open, iokit-get-properties, iokit-set-propertiesHardware access, device drivers
SignalssignalSignal handling between processes
Pseudo-TTYpseudo-ttyTerminal emulation
Systemsystem-fsctl, system-socket, system-audit, system-infoLow-level system calls
User Prefsuser-preference-read, user-preference-writeReading/writing user defaults
Notificationsdarwin-notification-post, distributed-notification-postSystem notifications
AppleEventsappleevent-sendInter-app communication (AppleScript)
Camera/Micdevice-camera, device-microphoneMedia capture
Dynamic Codedynamic-code-generationJIT compilation
NVRAMnvram-get, nvram-set, nvram-deleteFirmware variables

For each category, determine: Needed? and Specific scope (paths, services, etc.)

If the application has multiple subcommands that perform significantly different operations, such as build and serve commands for a Javascript bundler like Webpack, do the following:

  • Profile the subcommands separately
  • Create separate Sandbox configurations for each subcommand
  • Create a helper script that acts as a drop-in replacement for the original binary, executing the sandboxed application with the appropriate Seatbelt profile according to the subcommand passed.

Step 2: Start with Minimal Profile

Begin with deny-all and essential process operations, saved in a suitably-named Seatbelt profile file with the .sb extension.

(version 1)
(deny default)

;; Essential for any process
(allow process-exec*)
(allow process-fork)
(allow sysctl-read)

;; Metadata access (stat, readdir) - doesn't expose file contents
(allow file-read-metadata)

Step 3: Add File Read Access (Allowlist)

Use file-read-data (not file-read*) for allowlist-based reads:

(allow file-read-data
    ;; System paths (required for most runtimes)
    (subpath "/usr")
    (subpath "/bin")
    (subpath "/sbin")
    (subpath "/System")
    (subpath "/Library")
    (subpath "/opt")                    ;; Homebrew
    (subpath "/private/var")
    (subpath "/private/etc")
    (subpath "/private/tmp")
    (subpath "/dev")

    ;; Root symlinks for path resolution
    (literal "/")
    (literal "/var")
    (literal "/etc")
    (literal "/tmp")
    (literal "/private")

    ;; Application-specific config (customize as needed)
    (regex (string-append "^" (regex-quote (param "HOME")) "/\\.myapp(/.*)?$"))

    ;; Working directory
    (subpath (param "WORKING_DIR")))

**Why file-read-data instead of file-read*?**

  • file-read* allows ALL file read operations including from any path
  • file-read-data only allows reading file contents from listed paths
  • Combined with file-read-metadata (allowed broadly), this gives:

- ✅ Can stat/readdir anywhere (needed for path resolution) - ❌ Cannot read contents of files outside allowlist

Step 4: Add File Write Access (Restricted)

(allow file-write*
    ;; Working directory only
    (subpath (param "WORKING_DIR"))

    ;; Temp directories
    (subpath "/private/tmp")
    (subpath "/tmp")
    (subpath "/private/var/folders")

    ;; Device files for output
    (literal "/dev/null")
    (literal "/dev/tty"))

Step 5: Configure Network

Three levels of network access:

;; OPTION 1: Block all network (most restrictive - use for build tools)
(deny network*)

;; OPTION 2: Localhost only (use for dev servers, local services)
;; Bind to local ports
(allow network-bind (local tcp "*:*"))
;; Accept inbound connections
(allow network-inbound (local tcp "*:*"))
;; Outbound to localhost + DNS only
(allow network-outbound
    (literal "/private/var/run/mDNSResponder")  ;; DNS resolution
    (remote ip "localhost:*"))                   ;; localhost only

;; OPTION 3: Allow all network (least restrictive - avoid if possible)
(allow network*)

Network filter syntax:

  • (local tcp "*:*") - any local TCP port
  • (local tcp "*:8080") - specific local port
  • (remote ip "localhost:*") - outbound to localhost only
  • (remote tcp) - outbound TCP to any host
  • (literal "/private/var/run/mDNSResponder") - Unix socket for DNS

Step 6: Test Iteratively

After you generate or edit the Seatbelt profile, test the functionality of the target application in the sandbox. If anything fails to work, revise the Seatbelt profile. Repeat this process iteratively until you have generated a minimally-permissioned Seatbelt file and have confirmed empirically that the application works normally when sandboxed using the Seatbelt profile you generated.

If the program requires external input to function fully (such as a Javascript bundler that needs an application to bundle), find sample inputs from well-known, ideally official sources. For instance, these example projects for the Rspack bundler: https://github.com/rstackjs/rstack-examples/tree/main/rspack/

# Test basic execution
sandbox-exec -f profile.sb -D WORKING_DIR=/path -D HOME=$HOME /bin/echo "test"

# Test the actual application
sandbox-exec -f profile.sb -D WORKING_DIR=/path -D HOME=$HOME \
  /path/to/application --args

# Test security restrictions
sandbox-exec -f profile.sb -D WORKING_DIR=/tmp -D HOME=$HOME \
  cat ~/.ssh/id_rsa
# Expected: Operation not permitted

Common failure modes:

SymptomCauseFix
Exit code 134 (SIGABRT)Sandbox violationCheck which operation is blocked
Exit code 65 + syntax errorInvalid profile syntaxCheck Seatbelt syntax
ENOENT for existing filesMissing file-read-metadataAdd (allow file-read-metadata)
Process hangsMissing IPC permissionsAdd (allow mach-lookup) if needed

Seatbelt Syntax Reference

Path Filters

(subpath "/path")           ;; /path and all descendants
(literal "/path/file")      ;; Exact path only
(regex "^/path/.*\\.js$")   ;; Regex match

Parameter Substitution

(param "WORKING_DIR")                                    ;; Direct use
(subpath (param "WORKING_DIR"))                          ;; In subpath
(string-append (param "HOME") "/.config")                ;; Concatenation
(regex-quote (param "HOME"))                             ;; Escape for regex

Operations

File operations:

(allow file-read-data ...)          ;; Read file contents
(allow file-read-metadata)          ;; stat, lstat, readdir (no contents)
(allow file-read-xattr ...)         ;; Read extended attributes
(allow file-test-existence ...)     ;; Check if file exists
(allow file-map-executable ...)     ;; mmap executable (dylibs)
(allow file-write-data ...)         ;; Write to existing files
(allow file-write-create ...)       ;; Create new files
(allow file-write-unlink ...)       ;; Delete files
(allow file-write* ...)             ;; All write operations
(allow file-read* ...)              ;; All read operations (use sparingly)

Process operations:

(allow process-exec* ...)           ;; Execute binaries
(allow process-fork)                ;; Fork child processes
(allow process-info-pidinfo)        ;; Query process info
(allow signal)                      ;; Send/receive signals

Network operations:

(allow network-bind (local tcp "*:*"))              ;; Bind to any local TCP port
(allow network-bind (local tcp "*:8080"))           ;; Bind to specific port
(allow network-inbound (local tcp "*:*"))           ;; Accept TCP connections
(allow network-outbound (remote ip "localhost:*"))  ;; Outbound to localhost only
(allow network-outbound (remote tcp))               ;; Outbound TCP to any host
(allow network-outbound
    (literal "/private/var/run/mDNSResponder"))     ;; DNS via Unix socket
(allow network*)                                    ;; All network (use sparingly)
(deny network*)                                     ;; Block all network

IPC operations:

(allow mach-lookup ...)             ;; Mach IPC lookups
(allow mach-register ...)           ;; Register Mach services
(allow ipc-posix-shm* ...)          ;; POSIX shared memory
(allow ipc-posix-sem* ...)          ;; POSIX semaphores

System operations:

(allow sysctl-read)                 ;; Read system info
(allow sysctl-write ...)            ;; Modify sysctl (rare)
(allow iokit-open ...)              ;; IOKit device access
(allow pseudo-tty)                  ;; Terminal emulation
(allow dynamic-code-generation)     ;; JIT compilation
(allow user-preference-read ...)    ;; Read user defaults

Known Limitations

  1. Deprecated but functional: Apple deprecated sandbox-exec but it works through macOS 14+
  2. Temp directory access often required: Many applications need /tmp and /var/folders

Example: Generic CLI Application

(version 1)
(deny default)

;; Process
(allow process-exec*)
(allow process-fork)
(allow sysctl-read)

;; File metadata (path resolution)
(allow file-read-metadata)

;; File reads (allowlist)
(allow file-read-data
    (literal "/") (literal "/var") (literal "/etc") (literal "/tmp") (literal "/private")
    (subpath "/usr") (subpath "/bin") (subpath "/sbin") (subpath "/opt")
    (subpath "/System") (subpath "/Library") (subpath "/dev")
    (subpath "/private/var") (subpath "/private/etc") (subpath "/private/tmp")
    (subpath (param "WORKING_DIR")))

;; File writes (restricted)
(allow file-write*
    (subpath (param "WORKING_DIR"))
    (subpath "/private/tmp") (subpath "/tmp") (subpath "/private/var/folders")
    (literal "/dev/null") (literal "/dev/tty"))

;; Network disabled
(deny network*)

Usage:

sandbox-exec -f profile.sb \
  -D WORKING_DIR=/path/to/project \
  -D HOME=$HOME \
  /path/to/application

References

平台分布

Codex

36.86%
按下载量换算4,211

Claude

33.26%
按下载量换算3,800

Cursor

17.22%
按下载量换算1,967

Gemini CLI

10.19%
按下载量换算1,164

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

可写文件

该 Skill 可能写入或修改本地文件,使用前需要确认目标目录和修改范围。

安装前确认

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

继续浏览同类 Skills