[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-trail-of-bits-seatbelt-sandboxer":3,"mdc-3dju60-key":35,"related-org-trail-of-bits-seatbelt-sandboxer":2784,"related-repo-trail-of-bits-seatbelt-sandboxer":2942},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":30,"sourceUrl":33,"mdContent":34},"seatbelt-sandboxer","generate macOS Seatbelt sandbox configurations","Generates minimal macOS Seatbelt sandbox configurations. Use when sandboxing, isolating, or restricting macOS applications with allowlist-based profiles.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"trail-of-bits","Trail of Bits","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Ftrail-of-bits.png","trailofbits",[13,17,20],{"name":14,"slug":15,"type":16},"Security","security","tag",{"name":18,"slug":19,"type":16},"macOS","macos",{"name":21,"slug":22,"type":16},"Infrastructure","infrastructure",6139,"https:\u002F\u002Fgithub.com\u002Ftrailofbits\u002Fskills","2026-07-17T06:05:25.649718",null,541,[29],"agent-skills",{"repoUrl":24,"stars":23,"forks":27,"topics":31,"description":32},[29],"Trail of Bits Claude Code skills for security research, vulnerability detection, and audit workflows","https:\u002F\u002Fgithub.com\u002Ftrailofbits\u002Fskills\u002Ftree\u002FHEAD\u002Fplugins\u002Fseatbelt-sandboxer\u002Fskills\u002Fseatbelt-sandboxer","---\nname: seatbelt-sandboxer\ndescription: \"Generates minimal macOS Seatbelt sandbox configurations. Use when sandboxing, isolating, or restricting macOS applications with allowlist-based profiles.\"\nallowed-tools: Read Write Bash Glob Grep\n---\n\n# macOS Seatbelt Sandbox Profiling\n\nGenerate minimally-permissioned allowlist-based Seatbelt sandbox configurations for applications.\n\n## When to Use\n\n- User asks to \"sandbox\", \"isolate\", or \"restrict\" an application on macOS\n- Sandboxing any macOS process that needs restricted file\u002Fnetwork access\n- Creating defense-in-depth isolation if supply chain attacks are a concern\n\n## When NOT to Use\n\n- Linux containers (use seccomp-bpf, AppArmor, or namespaces instead)\n- Windows applications\n- Applications that legitimately need broad system access\n- Quick one-off scripts where sandboxing overhead isn't justified\n\n## Profiling Methodology\n\n### Step 1: Identify Application Requirements\n\nDetermine what the application needs across these resource categories:\n\n| Category | Operations | Common Use Cases |\n|----------|------------|------------------|\n| **File Read** | `file-read-data`, `file-read-metadata`, `file-read-xattr`, `file-test-existence`, `file-map-executable` | Reading source files, configs, libraries |\n| **File Write** | `file-write-data`, `file-write-create`, `file-write-unlink`, `file-write-mode`, `file-write-xattr`, `file-clone`, `file-link` | Output files, caches, temp files |\n| **Network** | `network-bind`, `network-inbound`, `network-outbound` | Servers, API calls, package downloads |\n| **Process** | `process-fork`, `process-exec`, `process-exec-interpreter`, `process-info*`, `process-codesigning*` | Spawning child processes, scripts |\n| **Mach IPC** | `mach-lookup`, `mach-register`, `mach-bootstrap`, `mach-task-name` | System services, XPC, notifications |\n| **POSIX IPC** | `ipc-posix-shm*`, `ipc-posix-sem*` | Shared memory, semaphores |\n| **Sysctl** | `sysctl-read`, `sysctl-write` | Reading system info (CPU, memory) |\n| **IOKit** | `iokit-open`, `iokit-get-properties`, `iokit-set-properties` | Hardware access, device drivers |\n| **Signals** | `signal` | Signal handling between processes |\n| **Pseudo-TTY** | `pseudo-tty` | Terminal emulation |\n| **System** | `system-fsctl`, `system-socket`, `system-audit`, `system-info` | Low-level system calls |\n| **User Prefs** | `user-preference-read`, `user-preference-write` | Reading\u002Fwriting user defaults |\n| **Notifications** | `darwin-notification-post`, `distributed-notification-post` | System notifications |\n| **AppleEvents** | `appleevent-send` | Inter-app communication (AppleScript) |\n| **Camera\u002FMic** | `device-camera`, `device-microphone` | Media capture |\n| **Dynamic Code** | `dynamic-code-generation` | JIT compilation |\n| **NVRAM** | `nvram-get`, `nvram-set`, `nvram-delete` | Firmware variables |\n\nFor each category, determine: **Needed?** and **Specific scope** (paths, services, etc.)\n\nIf 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:\n* Profile the subcommands separately\n* Create separate Sandbox configurations for each subcommand\n* 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.\n\n### Step 2: Start with Minimal Profile\n\nBegin with deny-all and essential process operations, saved in a suitably-named Seatbelt profile file with the `.sb` extension.\n\n```scheme\n(version 1)\n(deny default)\n\n;; Essential for any process\n(allow process-exec*)\n(allow process-fork)\n(allow sysctl-read)\n\n;; Metadata access (stat, readdir) - doesn't expose file contents\n(allow file-read-metadata)\n```\n\n### Step 3: Add File Read Access (Allowlist)\n\nUse `file-read-data` (not `file-read*`) for allowlist-based reads:\n\n```scheme\n(allow file-read-data\n    ;; System paths (required for most runtimes)\n    (subpath \"\u002Fusr\")\n    (subpath \"\u002Fbin\")\n    (subpath \"\u002Fsbin\")\n    (subpath \"\u002FSystem\")\n    (subpath \"\u002FLibrary\")\n    (subpath \"\u002Fopt\")                    ;; Homebrew\n    (subpath \"\u002Fprivate\u002Fvar\")\n    (subpath \"\u002Fprivate\u002Fetc\")\n    (subpath \"\u002Fprivate\u002Ftmp\")\n    (subpath \"\u002Fdev\")\n\n    ;; Root symlinks for path resolution\n    (literal \"\u002F\")\n    (literal \"\u002Fvar\")\n    (literal \"\u002Fetc\")\n    (literal \"\u002Ftmp\")\n    (literal \"\u002Fprivate\")\n\n    ;; Application-specific config (customize as needed)\n    (regex (string-append \"^\" (regex-quote (param \"HOME\")) \"\u002F\\\\.myapp(\u002F.*)?$\"))\n\n    ;; Working directory\n    (subpath (param \"WORKING_DIR\")))\n```\n\n**Why `file-read-data` instead of `file-read*`?**\n- `file-read*` allows ALL file read operations including from any path\n- `file-read-data` only allows reading file contents from listed paths\n- Combined with `file-read-metadata` (allowed broadly), this gives:\n  - ✅ Can stat\u002Freaddir anywhere (needed for path resolution)\n  - ❌ Cannot read contents of files outside allowlist\n\n### Step 4: Add File Write Access (Restricted)\n\n```scheme\n(allow file-write*\n    ;; Working directory only\n    (subpath (param \"WORKING_DIR\"))\n\n    ;; Temp directories\n    (subpath \"\u002Fprivate\u002Ftmp\")\n    (subpath \"\u002Ftmp\")\n    (subpath \"\u002Fprivate\u002Fvar\u002Ffolders\")\n\n    ;; Device files for output\n    (literal \"\u002Fdev\u002Fnull\")\n    (literal \"\u002Fdev\u002Ftty\"))\n```\n\n### Step 5: Configure Network\n\nThree levels of network access:\n\n```scheme\n;; OPTION 1: Block all network (most restrictive - use for build tools)\n(deny network*)\n\n;; OPTION 2: Localhost only (use for dev servers, local services)\n;; Bind to local ports\n(allow network-bind (local tcp \"*:*\"))\n;; Accept inbound connections\n(allow network-inbound (local tcp \"*:*\"))\n;; Outbound to localhost + DNS only\n(allow network-outbound\n    (literal \"\u002Fprivate\u002Fvar\u002Frun\u002FmDNSResponder\")  ;; DNS resolution\n    (remote ip \"localhost:*\"))                   ;; localhost only\n\n;; OPTION 3: Allow all network (least restrictive - avoid if possible)\n(allow network*)\n```\n\n**Network filter syntax:**\n- `(local tcp \"*:*\")` - any local TCP port\n- `(local tcp \"*:8080\")` - specific local port\n- `(remote ip \"localhost:*\")` - outbound to localhost only\n- `(remote tcp)` - outbound TCP to any host\n- `(literal \"\u002Fprivate\u002Fvar\u002Frun\u002FmDNSResponder\")` - Unix socket for DNS\n\n### Step 6: Test Iteratively\n\nAfter 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.\n\nIf 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:\u002F\u002Fgithub.com\u002Frstackjs\u002Frstack-examples\u002Ftree\u002Fmain\u002Frspack\u002F\n\n```bash\n# Test basic execution\nsandbox-exec -f profile.sb -D WORKING_DIR=\u002Fpath -D HOME=$HOME \u002Fbin\u002Fecho \"test\"\n\n# Test the actual application\nsandbox-exec -f profile.sb -D WORKING_DIR=\u002Fpath -D HOME=$HOME \\\n  \u002Fpath\u002Fto\u002Fapplication --args\n\n# Test security restrictions\nsandbox-exec -f profile.sb -D WORKING_DIR=\u002Ftmp -D HOME=$HOME \\\n  cat ~\u002F.ssh\u002Fid_rsa\n# Expected: Operation not permitted\n```\n\n**Common failure modes:**\n\n| Symptom | Cause | Fix |\n|---------|-------|-----|\n| Exit code 134 (SIGABRT) | Sandbox violation | Check which operation is blocked |\n| Exit code 65 + syntax error | Invalid profile syntax | Check Seatbelt syntax |\n| `ENOENT` for existing files | Missing `file-read-metadata` | Add `(allow file-read-metadata)` |\n| Process hangs | Missing IPC permissions | Add `(allow mach-lookup)` if needed |\n\n## Seatbelt Syntax Reference\n\n### Path Filters\n```scheme\n(subpath \"\u002Fpath\")           ;; \u002Fpath and all descendants\n(literal \"\u002Fpath\u002Ffile\")      ;; Exact path only\n(regex \"^\u002Fpath\u002F.*\\\\.js$\")   ;; Regex match\n```\n\n### Parameter Substitution\n```scheme\n(param \"WORKING_DIR\")                                    ;; Direct use\n(subpath (param \"WORKING_DIR\"))                          ;; In subpath\n(string-append (param \"HOME\") \"\u002F.config\")                ;; Concatenation\n(regex-quote (param \"HOME\"))                             ;; Escape for regex\n```\n\n### Operations\n\n**File operations:**\n```scheme\n(allow file-read-data ...)          ;; Read file contents\n(allow file-read-metadata)          ;; stat, lstat, readdir (no contents)\n(allow file-read-xattr ...)         ;; Read extended attributes\n(allow file-test-existence ...)     ;; Check if file exists\n(allow file-map-executable ...)     ;; mmap executable (dylibs)\n(allow file-write-data ...)         ;; Write to existing files\n(allow file-write-create ...)       ;; Create new files\n(allow file-write-unlink ...)       ;; Delete files\n(allow file-write* ...)             ;; All write operations\n(allow file-read* ...)              ;; All read operations (use sparingly)\n```\n\n**Process operations:**\n```scheme\n(allow process-exec* ...)           ;; Execute binaries\n(allow process-fork)                ;; Fork child processes\n(allow process-info-pidinfo)        ;; Query process info\n(allow signal)                      ;; Send\u002Freceive signals\n```\n\n**Network operations:**\n```scheme\n(allow network-bind (local tcp \"*:*\"))              ;; Bind to any local TCP port\n(allow network-bind (local tcp \"*:8080\"))           ;; Bind to specific port\n(allow network-inbound (local tcp \"*:*\"))           ;; Accept TCP connections\n(allow network-outbound (remote ip \"localhost:*\"))  ;; Outbound to localhost only\n(allow network-outbound (remote tcp))               ;; Outbound TCP to any host\n(allow network-outbound\n    (literal \"\u002Fprivate\u002Fvar\u002Frun\u002FmDNSResponder\"))     ;; DNS via Unix socket\n(allow network*)                                    ;; All network (use sparingly)\n(deny network*)                                     ;; Block all network\n```\n\n**IPC operations:**\n```scheme\n(allow mach-lookup ...)             ;; Mach IPC lookups\n(allow mach-register ...)           ;; Register Mach services\n(allow ipc-posix-shm* ...)          ;; POSIX shared memory\n(allow ipc-posix-sem* ...)          ;; POSIX semaphores\n```\n\n**System operations:**\n```scheme\n(allow sysctl-read)                 ;; Read system info\n(allow sysctl-write ...)            ;; Modify sysctl (rare)\n(allow iokit-open ...)              ;; IOKit device access\n(allow pseudo-tty)                  ;; Terminal emulation\n(allow dynamic-code-generation)     ;; JIT compilation\n(allow user-preference-read ...)    ;; Read user defaults\n```\n\n## Known Limitations\n\n1. **Deprecated but functional**: Apple deprecated sandbox-exec but it works through macOS 14+\n2. **Temp directory access often required**: Many applications need `\u002Ftmp` and `\u002Fvar\u002Ffolders`\n\n## Example: Generic CLI Application\n\n```scheme\n(version 1)\n(deny default)\n\n;; Process\n(allow process-exec*)\n(allow process-fork)\n(allow sysctl-read)\n\n;; File metadata (path resolution)\n(allow file-read-metadata)\n\n;; File reads (allowlist)\n(allow file-read-data\n    (literal \"\u002F\") (literal \"\u002Fvar\") (literal \"\u002Fetc\") (literal \"\u002Ftmp\") (literal \"\u002Fprivate\")\n    (subpath \"\u002Fusr\") (subpath \"\u002Fbin\") (subpath \"\u002Fsbin\") (subpath \"\u002Fopt\")\n    (subpath \"\u002FSystem\") (subpath \"\u002FLibrary\") (subpath \"\u002Fdev\")\n    (subpath \"\u002Fprivate\u002Fvar\") (subpath \"\u002Fprivate\u002Fetc\") (subpath \"\u002Fprivate\u002Ftmp\")\n    (subpath (param \"WORKING_DIR\")))\n\n;; File writes (restricted)\n(allow file-write*\n    (subpath (param \"WORKING_DIR\"))\n    (subpath \"\u002Fprivate\u002Ftmp\") (subpath \"\u002Ftmp\") (subpath \"\u002Fprivate\u002Fvar\u002Ffolders\")\n    (literal \"\u002Fdev\u002Fnull\") (literal \"\u002Fdev\u002Ftty\"))\n\n;; Network disabled\n(deny network*)\n```\n\n**Usage:**\n```bash\nsandbox-exec -f profile.sb \\\n  -D WORKING_DIR=\u002Fpath\u002Fto\u002Fproject \\\n  -D HOME=$HOME \\\n  \u002Fpath\u002Fto\u002Fapplication\n```\n\n## References\n\n- [Apple Sandbox Guide (reverse-engineered)](https:\u002F\u002Freverse.put.as\u002Fwp-content\u002Fuploads\u002F2011\u002F09\u002FApple-Sandbox-Guide-v1.0.pdf)\n- [sandbox-exec man page](https:\u002F\u002Fkeith.github.io\u002Fxcode-man-pages\u002Fsandbox-exec.1.html)\n",{"data":36,"body":38},{"name":4,"description":6,"allowed-tools":37},"Read Write Bash Glob Grep",{"type":39,"children":40},"root",[41,50,56,63,83,89,112,118,125,130,808,827,847,865,871,884,987,993,1013,1232,1254,1302,1308,1408,1414,1419,1544,1552,1610,1616,1621,1634,1854,1862,1985,1991,1997,2028,2034,2073,2078,2086,2173,2181,2220,2228,2306,2314,2353,2361,2416,2422,2459,2465,2674,2682,2749,2755,2778],{"type":42,"tag":43,"props":44,"children":46},"element","h1",{"id":45},"macos-seatbelt-sandbox-profiling",[47],{"type":48,"value":49},"text","macOS Seatbelt Sandbox Profiling",{"type":42,"tag":51,"props":52,"children":53},"p",{},[54],{"type":48,"value":55},"Generate minimally-permissioned allowlist-based Seatbelt sandbox configurations for applications.",{"type":42,"tag":57,"props":58,"children":60},"h2",{"id":59},"when-to-use",[61],{"type":48,"value":62},"When to Use",{"type":42,"tag":64,"props":65,"children":66},"ul",{},[67,73,78],{"type":42,"tag":68,"props":69,"children":70},"li",{},[71],{"type":48,"value":72},"User asks to \"sandbox\", \"isolate\", or \"restrict\" an application on macOS",{"type":42,"tag":68,"props":74,"children":75},{},[76],{"type":48,"value":77},"Sandboxing any macOS process that needs restricted file\u002Fnetwork access",{"type":42,"tag":68,"props":79,"children":80},{},[81],{"type":48,"value":82},"Creating defense-in-depth isolation if supply chain attacks are a concern",{"type":42,"tag":57,"props":84,"children":86},{"id":85},"when-not-to-use",[87],{"type":48,"value":88},"When NOT to Use",{"type":42,"tag":64,"props":90,"children":91},{},[92,97,102,107],{"type":42,"tag":68,"props":93,"children":94},{},[95],{"type":48,"value":96},"Linux containers (use seccomp-bpf, AppArmor, or namespaces instead)",{"type":42,"tag":68,"props":98,"children":99},{},[100],{"type":48,"value":101},"Windows applications",{"type":42,"tag":68,"props":103,"children":104},{},[105],{"type":48,"value":106},"Applications that legitimately need broad system access",{"type":42,"tag":68,"props":108,"children":109},{},[110],{"type":48,"value":111},"Quick one-off scripts where sandboxing overhead isn't justified",{"type":42,"tag":57,"props":113,"children":115},{"id":114},"profiling-methodology",[116],{"type":48,"value":117},"Profiling Methodology",{"type":42,"tag":119,"props":120,"children":122},"h3",{"id":121},"step-1-identify-application-requirements",[123],{"type":48,"value":124},"Step 1: Identify Application Requirements",{"type":42,"tag":51,"props":126,"children":127},{},[128],{"type":48,"value":129},"Determine what the application needs across these resource categories:",{"type":42,"tag":131,"props":132,"children":133},"table",{},[134,158],{"type":42,"tag":135,"props":136,"children":137},"thead",{},[138],{"type":42,"tag":139,"props":140,"children":141},"tr",{},[142,148,153],{"type":42,"tag":143,"props":144,"children":145},"th",{},[146],{"type":48,"value":147},"Category",{"type":42,"tag":143,"props":149,"children":150},{},[151],{"type":48,"value":152},"Operations",{"type":42,"tag":143,"props":154,"children":155},{},[156],{"type":48,"value":157},"Common Use Cases",{"type":42,"tag":159,"props":160,"children":161},"tbody",{},[162,219,286,325,378,424,456,488,527,552,577,623,655,687,712,744,769],{"type":42,"tag":139,"props":163,"children":164},{},[165,175,214],{"type":42,"tag":166,"props":167,"children":168},"td",{},[169],{"type":42,"tag":170,"props":171,"children":172},"strong",{},[173],{"type":48,"value":174},"File Read",{"type":42,"tag":166,"props":176,"children":177},{},[178,185,187,193,194,200,201,207,208],{"type":42,"tag":179,"props":180,"children":182},"code",{"className":181},[],[183],{"type":48,"value":184},"file-read-data",{"type":48,"value":186},", ",{"type":42,"tag":179,"props":188,"children":190},{"className":189},[],[191],{"type":48,"value":192},"file-read-metadata",{"type":48,"value":186},{"type":42,"tag":179,"props":195,"children":197},{"className":196},[],[198],{"type":48,"value":199},"file-read-xattr",{"type":48,"value":186},{"type":42,"tag":179,"props":202,"children":204},{"className":203},[],[205],{"type":48,"value":206},"file-test-existence",{"type":48,"value":186},{"type":42,"tag":179,"props":209,"children":211},{"className":210},[],[212],{"type":48,"value":213},"file-map-executable",{"type":42,"tag":166,"props":215,"children":216},{},[217],{"type":48,"value":218},"Reading source files, configs, libraries",{"type":42,"tag":139,"props":220,"children":221},{},[222,230,281],{"type":42,"tag":166,"props":223,"children":224},{},[225],{"type":42,"tag":170,"props":226,"children":227},{},[228],{"type":48,"value":229},"File Write",{"type":42,"tag":166,"props":231,"children":232},{},[233,239,240,246,247,253,254,260,261,267,268,274,275],{"type":42,"tag":179,"props":234,"children":236},{"className":235},[],[237],{"type":48,"value":238},"file-write-data",{"type":48,"value":186},{"type":42,"tag":179,"props":241,"children":243},{"className":242},[],[244],{"type":48,"value":245},"file-write-create",{"type":48,"value":186},{"type":42,"tag":179,"props":248,"children":250},{"className":249},[],[251],{"type":48,"value":252},"file-write-unlink",{"type":48,"value":186},{"type":42,"tag":179,"props":255,"children":257},{"className":256},[],[258],{"type":48,"value":259},"file-write-mode",{"type":48,"value":186},{"type":42,"tag":179,"props":262,"children":264},{"className":263},[],[265],{"type":48,"value":266},"file-write-xattr",{"type":48,"value":186},{"type":42,"tag":179,"props":269,"children":271},{"className":270},[],[272],{"type":48,"value":273},"file-clone",{"type":48,"value":186},{"type":42,"tag":179,"props":276,"children":278},{"className":277},[],[279],{"type":48,"value":280},"file-link",{"type":42,"tag":166,"props":282,"children":283},{},[284],{"type":48,"value":285},"Output files, caches, temp files",{"type":42,"tag":139,"props":287,"children":288},{},[289,297,320],{"type":42,"tag":166,"props":290,"children":291},{},[292],{"type":42,"tag":170,"props":293,"children":294},{},[295],{"type":48,"value":296},"Network",{"type":42,"tag":166,"props":298,"children":299},{},[300,306,307,313,314],{"type":42,"tag":179,"props":301,"children":303},{"className":302},[],[304],{"type":48,"value":305},"network-bind",{"type":48,"value":186},{"type":42,"tag":179,"props":308,"children":310},{"className":309},[],[311],{"type":48,"value":312},"network-inbound",{"type":48,"value":186},{"type":42,"tag":179,"props":315,"children":317},{"className":316},[],[318],{"type":48,"value":319},"network-outbound",{"type":42,"tag":166,"props":321,"children":322},{},[323],{"type":48,"value":324},"Servers, API calls, package downloads",{"type":42,"tag":139,"props":326,"children":327},{},[328,336,373],{"type":42,"tag":166,"props":329,"children":330},{},[331],{"type":42,"tag":170,"props":332,"children":333},{},[334],{"type":48,"value":335},"Process",{"type":42,"tag":166,"props":337,"children":338},{},[339,345,346,352,353,359,360,366,367],{"type":42,"tag":179,"props":340,"children":342},{"className":341},[],[343],{"type":48,"value":344},"process-fork",{"type":48,"value":186},{"type":42,"tag":179,"props":347,"children":349},{"className":348},[],[350],{"type":48,"value":351},"process-exec",{"type":48,"value":186},{"type":42,"tag":179,"props":354,"children":356},{"className":355},[],[357],{"type":48,"value":358},"process-exec-interpreter",{"type":48,"value":186},{"type":42,"tag":179,"props":361,"children":363},{"className":362},[],[364],{"type":48,"value":365},"process-info*",{"type":48,"value":186},{"type":42,"tag":179,"props":368,"children":370},{"className":369},[],[371],{"type":48,"value":372},"process-codesigning*",{"type":42,"tag":166,"props":374,"children":375},{},[376],{"type":48,"value":377},"Spawning child processes, scripts",{"type":42,"tag":139,"props":379,"children":380},{},[381,389,419],{"type":42,"tag":166,"props":382,"children":383},{},[384],{"type":42,"tag":170,"props":385,"children":386},{},[387],{"type":48,"value":388},"Mach IPC",{"type":42,"tag":166,"props":390,"children":391},{},[392,398,399,405,406,412,413],{"type":42,"tag":179,"props":393,"children":395},{"className":394},[],[396],{"type":48,"value":397},"mach-lookup",{"type":48,"value":186},{"type":42,"tag":179,"props":400,"children":402},{"className":401},[],[403],{"type":48,"value":404},"mach-register",{"type":48,"value":186},{"type":42,"tag":179,"props":407,"children":409},{"className":408},[],[410],{"type":48,"value":411},"mach-bootstrap",{"type":48,"value":186},{"type":42,"tag":179,"props":414,"children":416},{"className":415},[],[417],{"type":48,"value":418},"mach-task-name",{"type":42,"tag":166,"props":420,"children":421},{},[422],{"type":48,"value":423},"System services, XPC, notifications",{"type":42,"tag":139,"props":425,"children":426},{},[427,435,451],{"type":42,"tag":166,"props":428,"children":429},{},[430],{"type":42,"tag":170,"props":431,"children":432},{},[433],{"type":48,"value":434},"POSIX IPC",{"type":42,"tag":166,"props":436,"children":437},{},[438,444,445],{"type":42,"tag":179,"props":439,"children":441},{"className":440},[],[442],{"type":48,"value":443},"ipc-posix-shm*",{"type":48,"value":186},{"type":42,"tag":179,"props":446,"children":448},{"className":447},[],[449],{"type":48,"value":450},"ipc-posix-sem*",{"type":42,"tag":166,"props":452,"children":453},{},[454],{"type":48,"value":455},"Shared memory, semaphores",{"type":42,"tag":139,"props":457,"children":458},{},[459,467,483],{"type":42,"tag":166,"props":460,"children":461},{},[462],{"type":42,"tag":170,"props":463,"children":464},{},[465],{"type":48,"value":466},"Sysctl",{"type":42,"tag":166,"props":468,"children":469},{},[470,476,477],{"type":42,"tag":179,"props":471,"children":473},{"className":472},[],[474],{"type":48,"value":475},"sysctl-read",{"type":48,"value":186},{"type":42,"tag":179,"props":478,"children":480},{"className":479},[],[481],{"type":48,"value":482},"sysctl-write",{"type":42,"tag":166,"props":484,"children":485},{},[486],{"type":48,"value":487},"Reading system info (CPU, memory)",{"type":42,"tag":139,"props":489,"children":490},{},[491,499,522],{"type":42,"tag":166,"props":492,"children":493},{},[494],{"type":42,"tag":170,"props":495,"children":496},{},[497],{"type":48,"value":498},"IOKit",{"type":42,"tag":166,"props":500,"children":501},{},[502,508,509,515,516],{"type":42,"tag":179,"props":503,"children":505},{"className":504},[],[506],{"type":48,"value":507},"iokit-open",{"type":48,"value":186},{"type":42,"tag":179,"props":510,"children":512},{"className":511},[],[513],{"type":48,"value":514},"iokit-get-properties",{"type":48,"value":186},{"type":42,"tag":179,"props":517,"children":519},{"className":518},[],[520],{"type":48,"value":521},"iokit-set-properties",{"type":42,"tag":166,"props":523,"children":524},{},[525],{"type":48,"value":526},"Hardware access, device drivers",{"type":42,"tag":139,"props":528,"children":529},{},[530,538,547],{"type":42,"tag":166,"props":531,"children":532},{},[533],{"type":42,"tag":170,"props":534,"children":535},{},[536],{"type":48,"value":537},"Signals",{"type":42,"tag":166,"props":539,"children":540},{},[541],{"type":42,"tag":179,"props":542,"children":544},{"className":543},[],[545],{"type":48,"value":546},"signal",{"type":42,"tag":166,"props":548,"children":549},{},[550],{"type":48,"value":551},"Signal handling between processes",{"type":42,"tag":139,"props":553,"children":554},{},[555,563,572],{"type":42,"tag":166,"props":556,"children":557},{},[558],{"type":42,"tag":170,"props":559,"children":560},{},[561],{"type":48,"value":562},"Pseudo-TTY",{"type":42,"tag":166,"props":564,"children":565},{},[566],{"type":42,"tag":179,"props":567,"children":569},{"className":568},[],[570],{"type":48,"value":571},"pseudo-tty",{"type":42,"tag":166,"props":573,"children":574},{},[575],{"type":48,"value":576},"Terminal emulation",{"type":42,"tag":139,"props":578,"children":579},{},[580,588,618],{"type":42,"tag":166,"props":581,"children":582},{},[583],{"type":42,"tag":170,"props":584,"children":585},{},[586],{"type":48,"value":587},"System",{"type":42,"tag":166,"props":589,"children":590},{},[591,597,598,604,605,611,612],{"type":42,"tag":179,"props":592,"children":594},{"className":593},[],[595],{"type":48,"value":596},"system-fsctl",{"type":48,"value":186},{"type":42,"tag":179,"props":599,"children":601},{"className":600},[],[602],{"type":48,"value":603},"system-socket",{"type":48,"value":186},{"type":42,"tag":179,"props":606,"children":608},{"className":607},[],[609],{"type":48,"value":610},"system-audit",{"type":48,"value":186},{"type":42,"tag":179,"props":613,"children":615},{"className":614},[],[616],{"type":48,"value":617},"system-info",{"type":42,"tag":166,"props":619,"children":620},{},[621],{"type":48,"value":622},"Low-level system calls",{"type":42,"tag":139,"props":624,"children":625},{},[626,634,650],{"type":42,"tag":166,"props":627,"children":628},{},[629],{"type":42,"tag":170,"props":630,"children":631},{},[632],{"type":48,"value":633},"User Prefs",{"type":42,"tag":166,"props":635,"children":636},{},[637,643,644],{"type":42,"tag":179,"props":638,"children":640},{"className":639},[],[641],{"type":48,"value":642},"user-preference-read",{"type":48,"value":186},{"type":42,"tag":179,"props":645,"children":647},{"className":646},[],[648],{"type":48,"value":649},"user-preference-write",{"type":42,"tag":166,"props":651,"children":652},{},[653],{"type":48,"value":654},"Reading\u002Fwriting user defaults",{"type":42,"tag":139,"props":656,"children":657},{},[658,666,682],{"type":42,"tag":166,"props":659,"children":660},{},[661],{"type":42,"tag":170,"props":662,"children":663},{},[664],{"type":48,"value":665},"Notifications",{"type":42,"tag":166,"props":667,"children":668},{},[669,675,676],{"type":42,"tag":179,"props":670,"children":672},{"className":671},[],[673],{"type":48,"value":674},"darwin-notification-post",{"type":48,"value":186},{"type":42,"tag":179,"props":677,"children":679},{"className":678},[],[680],{"type":48,"value":681},"distributed-notification-post",{"type":42,"tag":166,"props":683,"children":684},{},[685],{"type":48,"value":686},"System notifications",{"type":42,"tag":139,"props":688,"children":689},{},[690,698,707],{"type":42,"tag":166,"props":691,"children":692},{},[693],{"type":42,"tag":170,"props":694,"children":695},{},[696],{"type":48,"value":697},"AppleEvents",{"type":42,"tag":166,"props":699,"children":700},{},[701],{"type":42,"tag":179,"props":702,"children":704},{"className":703},[],[705],{"type":48,"value":706},"appleevent-send",{"type":42,"tag":166,"props":708,"children":709},{},[710],{"type":48,"value":711},"Inter-app communication (AppleScript)",{"type":42,"tag":139,"props":713,"children":714},{},[715,723,739],{"type":42,"tag":166,"props":716,"children":717},{},[718],{"type":42,"tag":170,"props":719,"children":720},{},[721],{"type":48,"value":722},"Camera\u002FMic",{"type":42,"tag":166,"props":724,"children":725},{},[726,732,733],{"type":42,"tag":179,"props":727,"children":729},{"className":728},[],[730],{"type":48,"value":731},"device-camera",{"type":48,"value":186},{"type":42,"tag":179,"props":734,"children":736},{"className":735},[],[737],{"type":48,"value":738},"device-microphone",{"type":42,"tag":166,"props":740,"children":741},{},[742],{"type":48,"value":743},"Media capture",{"type":42,"tag":139,"props":745,"children":746},{},[747,755,764],{"type":42,"tag":166,"props":748,"children":749},{},[750],{"type":42,"tag":170,"props":751,"children":752},{},[753],{"type":48,"value":754},"Dynamic Code",{"type":42,"tag":166,"props":756,"children":757},{},[758],{"type":42,"tag":179,"props":759,"children":761},{"className":760},[],[762],{"type":48,"value":763},"dynamic-code-generation",{"type":42,"tag":166,"props":765,"children":766},{},[767],{"type":48,"value":768},"JIT compilation",{"type":42,"tag":139,"props":770,"children":771},{},[772,780,803],{"type":42,"tag":166,"props":773,"children":774},{},[775],{"type":42,"tag":170,"props":776,"children":777},{},[778],{"type":48,"value":779},"NVRAM",{"type":42,"tag":166,"props":781,"children":782},{},[783,789,790,796,797],{"type":42,"tag":179,"props":784,"children":786},{"className":785},[],[787],{"type":48,"value":788},"nvram-get",{"type":48,"value":186},{"type":42,"tag":179,"props":791,"children":793},{"className":792},[],[794],{"type":48,"value":795},"nvram-set",{"type":48,"value":186},{"type":42,"tag":179,"props":798,"children":800},{"className":799},[],[801],{"type":48,"value":802},"nvram-delete",{"type":42,"tag":166,"props":804,"children":805},{},[806],{"type":48,"value":807},"Firmware variables",{"type":42,"tag":51,"props":809,"children":810},{},[811,813,818,820,825],{"type":48,"value":812},"For each category, determine: ",{"type":42,"tag":170,"props":814,"children":815},{},[816],{"type":48,"value":817},"Needed?",{"type":48,"value":819}," and ",{"type":42,"tag":170,"props":821,"children":822},{},[823],{"type":48,"value":824},"Specific scope",{"type":48,"value":826}," (paths, services, etc.)",{"type":42,"tag":51,"props":828,"children":829},{},[830,832,838,839,845],{"type":48,"value":831},"If the application has multiple subcommands that perform significantly different operations, such as ",{"type":42,"tag":179,"props":833,"children":835},{"className":834},[],[836],{"type":48,"value":837},"build",{"type":48,"value":819},{"type":42,"tag":179,"props":840,"children":842},{"className":841},[],[843],{"type":48,"value":844},"serve",{"type":48,"value":846}," commands for a Javascript bundler like Webpack, do the following:",{"type":42,"tag":64,"props":848,"children":849},{},[850,855,860],{"type":42,"tag":68,"props":851,"children":852},{},[853],{"type":48,"value":854},"Profile the subcommands separately",{"type":42,"tag":68,"props":856,"children":857},{},[858],{"type":48,"value":859},"Create separate Sandbox configurations for each subcommand",{"type":42,"tag":68,"props":861,"children":862},{},[863],{"type":48,"value":864},"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.",{"type":42,"tag":119,"props":866,"children":868},{"id":867},"step-2-start-with-minimal-profile",[869],{"type":48,"value":870},"Step 2: Start with Minimal Profile",{"type":42,"tag":51,"props":872,"children":873},{},[874,876,882],{"type":48,"value":875},"Begin with deny-all and essential process operations, saved in a suitably-named Seatbelt profile file with the ",{"type":42,"tag":179,"props":877,"children":879},{"className":878},[],[880],{"type":48,"value":881},".sb",{"type":48,"value":883}," extension.",{"type":42,"tag":885,"props":886,"children":891},"pre",{"className":887,"code":888,"language":889,"meta":890,"style":890},"language-scheme shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","(version 1)\n(deny default)\n\n;; Essential for any process\n(allow process-exec*)\n(allow process-fork)\n(allow sysctl-read)\n\n;; Metadata access (stat, readdir) - doesn't expose file contents\n(allow file-read-metadata)\n","scheme","",[892],{"type":42,"tag":179,"props":893,"children":894},{"__ignoreMap":890},[895,906,915,925,934,943,952,961,969,978],{"type":42,"tag":896,"props":897,"children":900},"span",{"class":898,"line":899},"line",1,[901],{"type":42,"tag":896,"props":902,"children":903},{},[904],{"type":48,"value":905},"(version 1)\n",{"type":42,"tag":896,"props":907,"children":909},{"class":898,"line":908},2,[910],{"type":42,"tag":896,"props":911,"children":912},{},[913],{"type":48,"value":914},"(deny default)\n",{"type":42,"tag":896,"props":916,"children":918},{"class":898,"line":917},3,[919],{"type":42,"tag":896,"props":920,"children":922},{"emptyLinePlaceholder":921},true,[923],{"type":48,"value":924},"\n",{"type":42,"tag":896,"props":926,"children":928},{"class":898,"line":927},4,[929],{"type":42,"tag":896,"props":930,"children":931},{},[932],{"type":48,"value":933},";; Essential for any process\n",{"type":42,"tag":896,"props":935,"children":937},{"class":898,"line":936},5,[938],{"type":42,"tag":896,"props":939,"children":940},{},[941],{"type":48,"value":942},"(allow process-exec*)\n",{"type":42,"tag":896,"props":944,"children":946},{"class":898,"line":945},6,[947],{"type":42,"tag":896,"props":948,"children":949},{},[950],{"type":48,"value":951},"(allow process-fork)\n",{"type":42,"tag":896,"props":953,"children":955},{"class":898,"line":954},7,[956],{"type":42,"tag":896,"props":957,"children":958},{},[959],{"type":48,"value":960},"(allow sysctl-read)\n",{"type":42,"tag":896,"props":962,"children":964},{"class":898,"line":963},8,[965],{"type":42,"tag":896,"props":966,"children":967},{"emptyLinePlaceholder":921},[968],{"type":48,"value":924},{"type":42,"tag":896,"props":970,"children":972},{"class":898,"line":971},9,[973],{"type":42,"tag":896,"props":974,"children":975},{},[976],{"type":48,"value":977},";; Metadata access (stat, readdir) - doesn't expose file contents\n",{"type":42,"tag":896,"props":979,"children":981},{"class":898,"line":980},10,[982],{"type":42,"tag":896,"props":983,"children":984},{},[985],{"type":48,"value":986},"(allow file-read-metadata)\n",{"type":42,"tag":119,"props":988,"children":990},{"id":989},"step-3-add-file-read-access-allowlist",[991],{"type":48,"value":992},"Step 3: Add File Read Access (Allowlist)",{"type":42,"tag":51,"props":994,"children":995},{},[996,998,1003,1005,1011],{"type":48,"value":997},"Use ",{"type":42,"tag":179,"props":999,"children":1001},{"className":1000},[],[1002],{"type":48,"value":184},{"type":48,"value":1004}," (not ",{"type":42,"tag":179,"props":1006,"children":1008},{"className":1007},[],[1009],{"type":48,"value":1010},"file-read*",{"type":48,"value":1012},") for allowlist-based reads:",{"type":42,"tag":885,"props":1014,"children":1016},{"className":887,"code":1015,"language":889,"meta":890,"style":890},"(allow file-read-data\n    ;; System paths (required for most runtimes)\n    (subpath \"\u002Fusr\")\n    (subpath \"\u002Fbin\")\n    (subpath \"\u002Fsbin\")\n    (subpath \"\u002FSystem\")\n    (subpath \"\u002FLibrary\")\n    (subpath \"\u002Fopt\")                    ;; Homebrew\n    (subpath \"\u002Fprivate\u002Fvar\")\n    (subpath \"\u002Fprivate\u002Fetc\")\n    (subpath \"\u002Fprivate\u002Ftmp\")\n    (subpath \"\u002Fdev\")\n\n    ;; Root symlinks for path resolution\n    (literal \"\u002F\")\n    (literal \"\u002Fvar\")\n    (literal \"\u002Fetc\")\n    (literal \"\u002Ftmp\")\n    (literal \"\u002Fprivate\")\n\n    ;; Application-specific config (customize as needed)\n    (regex (string-append \"^\" (regex-quote (param \"HOME\")) \"\u002F\\\\.myapp(\u002F.*)?$\"))\n\n    ;; Working directory\n    (subpath (param \"WORKING_DIR\")))\n",[1017],{"type":42,"tag":179,"props":1018,"children":1019},{"__ignoreMap":890},[1020,1028,1036,1044,1052,1060,1068,1076,1084,1092,1100,1109,1118,1126,1135,1144,1153,1162,1171,1180,1188,1197,1206,1214,1223],{"type":42,"tag":896,"props":1021,"children":1022},{"class":898,"line":899},[1023],{"type":42,"tag":896,"props":1024,"children":1025},{},[1026],{"type":48,"value":1027},"(allow file-read-data\n",{"type":42,"tag":896,"props":1029,"children":1030},{"class":898,"line":908},[1031],{"type":42,"tag":896,"props":1032,"children":1033},{},[1034],{"type":48,"value":1035},"    ;; System paths (required for most runtimes)\n",{"type":42,"tag":896,"props":1037,"children":1038},{"class":898,"line":917},[1039],{"type":42,"tag":896,"props":1040,"children":1041},{},[1042],{"type":48,"value":1043},"    (subpath \"\u002Fusr\")\n",{"type":42,"tag":896,"props":1045,"children":1046},{"class":898,"line":927},[1047],{"type":42,"tag":896,"props":1048,"children":1049},{},[1050],{"type":48,"value":1051},"    (subpath \"\u002Fbin\")\n",{"type":42,"tag":896,"props":1053,"children":1054},{"class":898,"line":936},[1055],{"type":42,"tag":896,"props":1056,"children":1057},{},[1058],{"type":48,"value":1059},"    (subpath \"\u002Fsbin\")\n",{"type":42,"tag":896,"props":1061,"children":1062},{"class":898,"line":945},[1063],{"type":42,"tag":896,"props":1064,"children":1065},{},[1066],{"type":48,"value":1067},"    (subpath \"\u002FSystem\")\n",{"type":42,"tag":896,"props":1069,"children":1070},{"class":898,"line":954},[1071],{"type":42,"tag":896,"props":1072,"children":1073},{},[1074],{"type":48,"value":1075},"    (subpath \"\u002FLibrary\")\n",{"type":42,"tag":896,"props":1077,"children":1078},{"class":898,"line":963},[1079],{"type":42,"tag":896,"props":1080,"children":1081},{},[1082],{"type":48,"value":1083},"    (subpath \"\u002Fopt\")                    ;; Homebrew\n",{"type":42,"tag":896,"props":1085,"children":1086},{"class":898,"line":971},[1087],{"type":42,"tag":896,"props":1088,"children":1089},{},[1090],{"type":48,"value":1091},"    (subpath \"\u002Fprivate\u002Fvar\")\n",{"type":42,"tag":896,"props":1093,"children":1094},{"class":898,"line":980},[1095],{"type":42,"tag":896,"props":1096,"children":1097},{},[1098],{"type":48,"value":1099},"    (subpath \"\u002Fprivate\u002Fetc\")\n",{"type":42,"tag":896,"props":1101,"children":1103},{"class":898,"line":1102},11,[1104],{"type":42,"tag":896,"props":1105,"children":1106},{},[1107],{"type":48,"value":1108},"    (subpath \"\u002Fprivate\u002Ftmp\")\n",{"type":42,"tag":896,"props":1110,"children":1112},{"class":898,"line":1111},12,[1113],{"type":42,"tag":896,"props":1114,"children":1115},{},[1116],{"type":48,"value":1117},"    (subpath \"\u002Fdev\")\n",{"type":42,"tag":896,"props":1119,"children":1121},{"class":898,"line":1120},13,[1122],{"type":42,"tag":896,"props":1123,"children":1124},{"emptyLinePlaceholder":921},[1125],{"type":48,"value":924},{"type":42,"tag":896,"props":1127,"children":1129},{"class":898,"line":1128},14,[1130],{"type":42,"tag":896,"props":1131,"children":1132},{},[1133],{"type":48,"value":1134},"    ;; Root symlinks for path resolution\n",{"type":42,"tag":896,"props":1136,"children":1138},{"class":898,"line":1137},15,[1139],{"type":42,"tag":896,"props":1140,"children":1141},{},[1142],{"type":48,"value":1143},"    (literal \"\u002F\")\n",{"type":42,"tag":896,"props":1145,"children":1147},{"class":898,"line":1146},16,[1148],{"type":42,"tag":896,"props":1149,"children":1150},{},[1151],{"type":48,"value":1152},"    (literal \"\u002Fvar\")\n",{"type":42,"tag":896,"props":1154,"children":1156},{"class":898,"line":1155},17,[1157],{"type":42,"tag":896,"props":1158,"children":1159},{},[1160],{"type":48,"value":1161},"    (literal \"\u002Fetc\")\n",{"type":42,"tag":896,"props":1163,"children":1165},{"class":898,"line":1164},18,[1166],{"type":42,"tag":896,"props":1167,"children":1168},{},[1169],{"type":48,"value":1170},"    (literal \"\u002Ftmp\")\n",{"type":42,"tag":896,"props":1172,"children":1174},{"class":898,"line":1173},19,[1175],{"type":42,"tag":896,"props":1176,"children":1177},{},[1178],{"type":48,"value":1179},"    (literal \"\u002Fprivate\")\n",{"type":42,"tag":896,"props":1181,"children":1183},{"class":898,"line":1182},20,[1184],{"type":42,"tag":896,"props":1185,"children":1186},{"emptyLinePlaceholder":921},[1187],{"type":48,"value":924},{"type":42,"tag":896,"props":1189,"children":1191},{"class":898,"line":1190},21,[1192],{"type":42,"tag":896,"props":1193,"children":1194},{},[1195],{"type":48,"value":1196},"    ;; Application-specific config (customize as needed)\n",{"type":42,"tag":896,"props":1198,"children":1200},{"class":898,"line":1199},22,[1201],{"type":42,"tag":896,"props":1202,"children":1203},{},[1204],{"type":48,"value":1205},"    (regex (string-append \"^\" (regex-quote (param \"HOME\")) \"\u002F\\\\.myapp(\u002F.*)?$\"))\n",{"type":42,"tag":896,"props":1207,"children":1209},{"class":898,"line":1208},23,[1210],{"type":42,"tag":896,"props":1211,"children":1212},{"emptyLinePlaceholder":921},[1213],{"type":48,"value":924},{"type":42,"tag":896,"props":1215,"children":1217},{"class":898,"line":1216},24,[1218],{"type":42,"tag":896,"props":1219,"children":1220},{},[1221],{"type":48,"value":1222},"    ;; Working directory\n",{"type":42,"tag":896,"props":1224,"children":1226},{"class":898,"line":1225},25,[1227],{"type":42,"tag":896,"props":1228,"children":1229},{},[1230],{"type":48,"value":1231},"    (subpath (param \"WORKING_DIR\")))\n",{"type":42,"tag":51,"props":1233,"children":1234},{},[1235],{"type":42,"tag":170,"props":1236,"children":1237},{},[1238,1240,1245,1247,1252],{"type":48,"value":1239},"Why ",{"type":42,"tag":179,"props":1241,"children":1243},{"className":1242},[],[1244],{"type":48,"value":184},{"type":48,"value":1246}," instead of ",{"type":42,"tag":179,"props":1248,"children":1250},{"className":1249},[],[1251],{"type":48,"value":1010},{"type":48,"value":1253},"?",{"type":42,"tag":64,"props":1255,"children":1256},{},[1257,1267,1277],{"type":42,"tag":68,"props":1258,"children":1259},{},[1260,1265],{"type":42,"tag":179,"props":1261,"children":1263},{"className":1262},[],[1264],{"type":48,"value":1010},{"type":48,"value":1266}," allows ALL file read operations including from any path",{"type":42,"tag":68,"props":1268,"children":1269},{},[1270,1275],{"type":42,"tag":179,"props":1271,"children":1273},{"className":1272},[],[1274],{"type":48,"value":184},{"type":48,"value":1276}," only allows reading file contents from listed paths",{"type":42,"tag":68,"props":1278,"children":1279},{},[1280,1282,1287,1289],{"type":48,"value":1281},"Combined with ",{"type":42,"tag":179,"props":1283,"children":1285},{"className":1284},[],[1286],{"type":48,"value":192},{"type":48,"value":1288}," (allowed broadly), this gives:\n",{"type":42,"tag":64,"props":1290,"children":1291},{},[1292,1297],{"type":42,"tag":68,"props":1293,"children":1294},{},[1295],{"type":48,"value":1296},"✅ Can stat\u002Freaddir anywhere (needed for path resolution)",{"type":42,"tag":68,"props":1298,"children":1299},{},[1300],{"type":48,"value":1301},"❌ Cannot read contents of files outside allowlist",{"type":42,"tag":119,"props":1303,"children":1305},{"id":1304},"step-4-add-file-write-access-restricted",[1306],{"type":48,"value":1307},"Step 4: Add File Write Access (Restricted)",{"type":42,"tag":885,"props":1309,"children":1311},{"className":887,"code":1310,"language":889,"meta":890,"style":890},"(allow file-write*\n    ;; Working directory only\n    (subpath (param \"WORKING_DIR\"))\n\n    ;; Temp directories\n    (subpath \"\u002Fprivate\u002Ftmp\")\n    (subpath \"\u002Ftmp\")\n    (subpath \"\u002Fprivate\u002Fvar\u002Ffolders\")\n\n    ;; Device files for output\n    (literal \"\u002Fdev\u002Fnull\")\n    (literal \"\u002Fdev\u002Ftty\"))\n",[1312],{"type":42,"tag":179,"props":1313,"children":1314},{"__ignoreMap":890},[1315,1323,1331,1339,1346,1354,1361,1369,1377,1384,1392,1400],{"type":42,"tag":896,"props":1316,"children":1317},{"class":898,"line":899},[1318],{"type":42,"tag":896,"props":1319,"children":1320},{},[1321],{"type":48,"value":1322},"(allow file-write*\n",{"type":42,"tag":896,"props":1324,"children":1325},{"class":898,"line":908},[1326],{"type":42,"tag":896,"props":1327,"children":1328},{},[1329],{"type":48,"value":1330},"    ;; Working directory only\n",{"type":42,"tag":896,"props":1332,"children":1333},{"class":898,"line":917},[1334],{"type":42,"tag":896,"props":1335,"children":1336},{},[1337],{"type":48,"value":1338},"    (subpath (param \"WORKING_DIR\"))\n",{"type":42,"tag":896,"props":1340,"children":1341},{"class":898,"line":927},[1342],{"type":42,"tag":896,"props":1343,"children":1344},{"emptyLinePlaceholder":921},[1345],{"type":48,"value":924},{"type":42,"tag":896,"props":1347,"children":1348},{"class":898,"line":936},[1349],{"type":42,"tag":896,"props":1350,"children":1351},{},[1352],{"type":48,"value":1353},"    ;; Temp directories\n",{"type":42,"tag":896,"props":1355,"children":1356},{"class":898,"line":945},[1357],{"type":42,"tag":896,"props":1358,"children":1359},{},[1360],{"type":48,"value":1108},{"type":42,"tag":896,"props":1362,"children":1363},{"class":898,"line":954},[1364],{"type":42,"tag":896,"props":1365,"children":1366},{},[1367],{"type":48,"value":1368},"    (subpath \"\u002Ftmp\")\n",{"type":42,"tag":896,"props":1370,"children":1371},{"class":898,"line":963},[1372],{"type":42,"tag":896,"props":1373,"children":1374},{},[1375],{"type":48,"value":1376},"    (subpath \"\u002Fprivate\u002Fvar\u002Ffolders\")\n",{"type":42,"tag":896,"props":1378,"children":1379},{"class":898,"line":971},[1380],{"type":42,"tag":896,"props":1381,"children":1382},{"emptyLinePlaceholder":921},[1383],{"type":48,"value":924},{"type":42,"tag":896,"props":1385,"children":1386},{"class":898,"line":980},[1387],{"type":42,"tag":896,"props":1388,"children":1389},{},[1390],{"type":48,"value":1391},"    ;; Device files for output\n",{"type":42,"tag":896,"props":1393,"children":1394},{"class":898,"line":1102},[1395],{"type":42,"tag":896,"props":1396,"children":1397},{},[1398],{"type":48,"value":1399},"    (literal \"\u002Fdev\u002Fnull\")\n",{"type":42,"tag":896,"props":1401,"children":1402},{"class":898,"line":1111},[1403],{"type":42,"tag":896,"props":1404,"children":1405},{},[1406],{"type":48,"value":1407},"    (literal \"\u002Fdev\u002Ftty\"))\n",{"type":42,"tag":119,"props":1409,"children":1411},{"id":1410},"step-5-configure-network",[1412],{"type":48,"value":1413},"Step 5: Configure Network",{"type":42,"tag":51,"props":1415,"children":1416},{},[1417],{"type":48,"value":1418},"Three levels of network access:",{"type":42,"tag":885,"props":1420,"children":1422},{"className":887,"code":1421,"language":889,"meta":890,"style":890},";; OPTION 1: Block all network (most restrictive - use for build tools)\n(deny network*)\n\n;; OPTION 2: Localhost only (use for dev servers, local services)\n;; Bind to local ports\n(allow network-bind (local tcp \"*:*\"))\n;; Accept inbound connections\n(allow network-inbound (local tcp \"*:*\"))\n;; Outbound to localhost + DNS only\n(allow network-outbound\n    (literal \"\u002Fprivate\u002Fvar\u002Frun\u002FmDNSResponder\")  ;; DNS resolution\n    (remote ip \"localhost:*\"))                   ;; localhost only\n\n;; OPTION 3: Allow all network (least restrictive - avoid if possible)\n(allow network*)\n",[1423],{"type":42,"tag":179,"props":1424,"children":1425},{"__ignoreMap":890},[1426,1434,1442,1449,1457,1465,1473,1481,1489,1497,1505,1513,1521,1528,1536],{"type":42,"tag":896,"props":1427,"children":1428},{"class":898,"line":899},[1429],{"type":42,"tag":896,"props":1430,"children":1431},{},[1432],{"type":48,"value":1433},";; OPTION 1: Block all network (most restrictive - use for build tools)\n",{"type":42,"tag":896,"props":1435,"children":1436},{"class":898,"line":908},[1437],{"type":42,"tag":896,"props":1438,"children":1439},{},[1440],{"type":48,"value":1441},"(deny network*)\n",{"type":42,"tag":896,"props":1443,"children":1444},{"class":898,"line":917},[1445],{"type":42,"tag":896,"props":1446,"children":1447},{"emptyLinePlaceholder":921},[1448],{"type":48,"value":924},{"type":42,"tag":896,"props":1450,"children":1451},{"class":898,"line":927},[1452],{"type":42,"tag":896,"props":1453,"children":1454},{},[1455],{"type":48,"value":1456},";; OPTION 2: Localhost only (use for dev servers, local services)\n",{"type":42,"tag":896,"props":1458,"children":1459},{"class":898,"line":936},[1460],{"type":42,"tag":896,"props":1461,"children":1462},{},[1463],{"type":48,"value":1464},";; Bind to local ports\n",{"type":42,"tag":896,"props":1466,"children":1467},{"class":898,"line":945},[1468],{"type":42,"tag":896,"props":1469,"children":1470},{},[1471],{"type":48,"value":1472},"(allow network-bind (local tcp \"*:*\"))\n",{"type":42,"tag":896,"props":1474,"children":1475},{"class":898,"line":954},[1476],{"type":42,"tag":896,"props":1477,"children":1478},{},[1479],{"type":48,"value":1480},";; Accept inbound connections\n",{"type":42,"tag":896,"props":1482,"children":1483},{"class":898,"line":963},[1484],{"type":42,"tag":896,"props":1485,"children":1486},{},[1487],{"type":48,"value":1488},"(allow network-inbound (local tcp \"*:*\"))\n",{"type":42,"tag":896,"props":1490,"children":1491},{"class":898,"line":971},[1492],{"type":42,"tag":896,"props":1493,"children":1494},{},[1495],{"type":48,"value":1496},";; Outbound to localhost + DNS only\n",{"type":42,"tag":896,"props":1498,"children":1499},{"class":898,"line":980},[1500],{"type":42,"tag":896,"props":1501,"children":1502},{},[1503],{"type":48,"value":1504},"(allow network-outbound\n",{"type":42,"tag":896,"props":1506,"children":1507},{"class":898,"line":1102},[1508],{"type":42,"tag":896,"props":1509,"children":1510},{},[1511],{"type":48,"value":1512},"    (literal \"\u002Fprivate\u002Fvar\u002Frun\u002FmDNSResponder\")  ;; DNS resolution\n",{"type":42,"tag":896,"props":1514,"children":1515},{"class":898,"line":1111},[1516],{"type":42,"tag":896,"props":1517,"children":1518},{},[1519],{"type":48,"value":1520},"    (remote ip \"localhost:*\"))                   ;; localhost only\n",{"type":42,"tag":896,"props":1522,"children":1523},{"class":898,"line":1120},[1524],{"type":42,"tag":896,"props":1525,"children":1526},{"emptyLinePlaceholder":921},[1527],{"type":48,"value":924},{"type":42,"tag":896,"props":1529,"children":1530},{"class":898,"line":1128},[1531],{"type":42,"tag":896,"props":1532,"children":1533},{},[1534],{"type":48,"value":1535},";; OPTION 3: Allow all network (least restrictive - avoid if possible)\n",{"type":42,"tag":896,"props":1537,"children":1538},{"class":898,"line":1137},[1539],{"type":42,"tag":896,"props":1540,"children":1541},{},[1542],{"type":48,"value":1543},"(allow network*)\n",{"type":42,"tag":51,"props":1545,"children":1546},{},[1547],{"type":42,"tag":170,"props":1548,"children":1549},{},[1550],{"type":48,"value":1551},"Network filter syntax:",{"type":42,"tag":64,"props":1553,"children":1554},{},[1555,1566,1577,1588,1599],{"type":42,"tag":68,"props":1556,"children":1557},{},[1558,1564],{"type":42,"tag":179,"props":1559,"children":1561},{"className":1560},[],[1562],{"type":48,"value":1563},"(local tcp \"*:*\")",{"type":48,"value":1565}," - any local TCP port",{"type":42,"tag":68,"props":1567,"children":1568},{},[1569,1575],{"type":42,"tag":179,"props":1570,"children":1572},{"className":1571},[],[1573],{"type":48,"value":1574},"(local tcp \"*:8080\")",{"type":48,"value":1576}," - specific local port",{"type":42,"tag":68,"props":1578,"children":1579},{},[1580,1586],{"type":42,"tag":179,"props":1581,"children":1583},{"className":1582},[],[1584],{"type":48,"value":1585},"(remote ip \"localhost:*\")",{"type":48,"value":1587}," - outbound to localhost only",{"type":42,"tag":68,"props":1589,"children":1590},{},[1591,1597],{"type":42,"tag":179,"props":1592,"children":1594},{"className":1593},[],[1595],{"type":48,"value":1596},"(remote tcp)",{"type":48,"value":1598}," - outbound TCP to any host",{"type":42,"tag":68,"props":1600,"children":1601},{},[1602,1608],{"type":42,"tag":179,"props":1603,"children":1605},{"className":1604},[],[1606],{"type":48,"value":1607},"(literal \"\u002Fprivate\u002Fvar\u002Frun\u002FmDNSResponder\")",{"type":48,"value":1609}," - Unix socket for DNS",{"type":42,"tag":119,"props":1611,"children":1613},{"id":1612},"step-6-test-iteratively",[1614],{"type":48,"value":1615},"Step 6: Test Iteratively",{"type":42,"tag":51,"props":1617,"children":1618},{},[1619],{"type":48,"value":1620},"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.",{"type":42,"tag":51,"props":1622,"children":1623},{},[1624,1626],{"type":48,"value":1625},"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: ",{"type":42,"tag":1627,"props":1628,"children":1632},"a",{"href":1629,"rel":1630},"https:\u002F\u002Fgithub.com\u002Frstackjs\u002Frstack-examples\u002Ftree\u002Fmain\u002Frspack\u002F",[1631],"nofollow",[1633],{"type":48,"value":1629},{"type":42,"tag":885,"props":1635,"children":1639},{"className":1636,"code":1637,"language":1638,"meta":890,"style":890},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# Test basic execution\nsandbox-exec -f profile.sb -D WORKING_DIR=\u002Fpath -D HOME=$HOME \u002Fbin\u002Fecho \"test\"\n\n# Test the actual application\nsandbox-exec -f profile.sb -D WORKING_DIR=\u002Fpath -D HOME=$HOME \\\n  \u002Fpath\u002Fto\u002Fapplication --args\n\n# Test security restrictions\nsandbox-exec -f profile.sb -D WORKING_DIR=\u002Ftmp -D HOME=$HOME \\\n  cat ~\u002F.ssh\u002Fid_rsa\n# Expected: Operation not permitted\n","bash",[1640],{"type":42,"tag":179,"props":1641,"children":1642},{"__ignoreMap":890},[1643,1652,1718,1725,1733,1769,1782,1789,1797,1833,1846],{"type":42,"tag":896,"props":1644,"children":1645},{"class":898,"line":899},[1646],{"type":42,"tag":896,"props":1647,"children":1649},{"style":1648},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[1650],{"type":48,"value":1651},"# Test basic execution\n",{"type":42,"tag":896,"props":1653,"children":1654},{"class":898,"line":908},[1655,1661,1667,1672,1677,1682,1686,1691,1697,1702,1708,1713],{"type":42,"tag":896,"props":1656,"children":1658},{"style":1657},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[1659],{"type":48,"value":1660},"sandbox-exec",{"type":42,"tag":896,"props":1662,"children":1664},{"style":1663},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[1665],{"type":48,"value":1666}," -f",{"type":42,"tag":896,"props":1668,"children":1669},{"style":1663},[1670],{"type":48,"value":1671}," profile.sb",{"type":42,"tag":896,"props":1673,"children":1674},{"style":1663},[1675],{"type":48,"value":1676}," -D",{"type":42,"tag":896,"props":1678,"children":1679},{"style":1663},[1680],{"type":48,"value":1681}," WORKING_DIR=\u002Fpath",{"type":42,"tag":896,"props":1683,"children":1684},{"style":1663},[1685],{"type":48,"value":1676},{"type":42,"tag":896,"props":1687,"children":1688},{"style":1663},[1689],{"type":48,"value":1690}," HOME=",{"type":42,"tag":896,"props":1692,"children":1694},{"style":1693},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[1695],{"type":48,"value":1696},"$HOME ",{"type":42,"tag":896,"props":1698,"children":1699},{"style":1663},[1700],{"type":48,"value":1701},"\u002Fbin\u002Fecho",{"type":42,"tag":896,"props":1703,"children":1705},{"style":1704},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[1706],{"type":48,"value":1707}," \"",{"type":42,"tag":896,"props":1709,"children":1710},{"style":1663},[1711],{"type":48,"value":1712},"test",{"type":42,"tag":896,"props":1714,"children":1715},{"style":1704},[1716],{"type":48,"value":1717},"\"\n",{"type":42,"tag":896,"props":1719,"children":1720},{"class":898,"line":917},[1721],{"type":42,"tag":896,"props":1722,"children":1723},{"emptyLinePlaceholder":921},[1724],{"type":48,"value":924},{"type":42,"tag":896,"props":1726,"children":1727},{"class":898,"line":927},[1728],{"type":42,"tag":896,"props":1729,"children":1730},{"style":1648},[1731],{"type":48,"value":1732},"# Test the actual application\n",{"type":42,"tag":896,"props":1734,"children":1735},{"class":898,"line":936},[1736,1740,1744,1748,1752,1756,1760,1764],{"type":42,"tag":896,"props":1737,"children":1738},{"style":1657},[1739],{"type":48,"value":1660},{"type":42,"tag":896,"props":1741,"children":1742},{"style":1663},[1743],{"type":48,"value":1666},{"type":42,"tag":896,"props":1745,"children":1746},{"style":1663},[1747],{"type":48,"value":1671},{"type":42,"tag":896,"props":1749,"children":1750},{"style":1663},[1751],{"type":48,"value":1676},{"type":42,"tag":896,"props":1753,"children":1754},{"style":1663},[1755],{"type":48,"value":1681},{"type":42,"tag":896,"props":1757,"children":1758},{"style":1663},[1759],{"type":48,"value":1676},{"type":42,"tag":896,"props":1761,"children":1762},{"style":1663},[1763],{"type":48,"value":1690},{"type":42,"tag":896,"props":1765,"children":1766},{"style":1693},[1767],{"type":48,"value":1768},"$HOME \\\n",{"type":42,"tag":896,"props":1770,"children":1771},{"class":898,"line":945},[1772,1777],{"type":42,"tag":896,"props":1773,"children":1774},{"style":1663},[1775],{"type":48,"value":1776},"  \u002Fpath\u002Fto\u002Fapplication",{"type":42,"tag":896,"props":1778,"children":1779},{"style":1663},[1780],{"type":48,"value":1781}," --args\n",{"type":42,"tag":896,"props":1783,"children":1784},{"class":898,"line":954},[1785],{"type":42,"tag":896,"props":1786,"children":1787},{"emptyLinePlaceholder":921},[1788],{"type":48,"value":924},{"type":42,"tag":896,"props":1790,"children":1791},{"class":898,"line":963},[1792],{"type":42,"tag":896,"props":1793,"children":1794},{"style":1648},[1795],{"type":48,"value":1796},"# Test security restrictions\n",{"type":42,"tag":896,"props":1798,"children":1799},{"class":898,"line":971},[1800,1804,1808,1812,1816,1821,1825,1829],{"type":42,"tag":896,"props":1801,"children":1802},{"style":1657},[1803],{"type":48,"value":1660},{"type":42,"tag":896,"props":1805,"children":1806},{"style":1663},[1807],{"type":48,"value":1666},{"type":42,"tag":896,"props":1809,"children":1810},{"style":1663},[1811],{"type":48,"value":1671},{"type":42,"tag":896,"props":1813,"children":1814},{"style":1663},[1815],{"type":48,"value":1676},{"type":42,"tag":896,"props":1817,"children":1818},{"style":1663},[1819],{"type":48,"value":1820}," WORKING_DIR=\u002Ftmp",{"type":42,"tag":896,"props":1822,"children":1823},{"style":1663},[1824],{"type":48,"value":1676},{"type":42,"tag":896,"props":1826,"children":1827},{"style":1663},[1828],{"type":48,"value":1690},{"type":42,"tag":896,"props":1830,"children":1831},{"style":1693},[1832],{"type":48,"value":1768},{"type":42,"tag":896,"props":1834,"children":1835},{"class":898,"line":980},[1836,1841],{"type":42,"tag":896,"props":1837,"children":1838},{"style":1663},[1839],{"type":48,"value":1840},"  cat",{"type":42,"tag":896,"props":1842,"children":1843},{"style":1663},[1844],{"type":48,"value":1845}," ~\u002F.ssh\u002Fid_rsa\n",{"type":42,"tag":896,"props":1847,"children":1848},{"class":898,"line":1102},[1849],{"type":42,"tag":896,"props":1850,"children":1851},{"style":1648},[1852],{"type":48,"value":1853},"# Expected: Operation not permitted\n",{"type":42,"tag":51,"props":1855,"children":1856},{},[1857],{"type":42,"tag":170,"props":1858,"children":1859},{},[1860],{"type":48,"value":1861},"Common failure modes:",{"type":42,"tag":131,"props":1863,"children":1864},{},[1865,1886],{"type":42,"tag":135,"props":1866,"children":1867},{},[1868],{"type":42,"tag":139,"props":1869,"children":1870},{},[1871,1876,1881],{"type":42,"tag":143,"props":1872,"children":1873},{},[1874],{"type":48,"value":1875},"Symptom",{"type":42,"tag":143,"props":1877,"children":1878},{},[1879],{"type":48,"value":1880},"Cause",{"type":42,"tag":143,"props":1882,"children":1883},{},[1884],{"type":48,"value":1885},"Fix",{"type":42,"tag":159,"props":1887,"children":1888},{},[1889,1907,1925,1960],{"type":42,"tag":139,"props":1890,"children":1891},{},[1892,1897,1902],{"type":42,"tag":166,"props":1893,"children":1894},{},[1895],{"type":48,"value":1896},"Exit code 134 (SIGABRT)",{"type":42,"tag":166,"props":1898,"children":1899},{},[1900],{"type":48,"value":1901},"Sandbox violation",{"type":42,"tag":166,"props":1903,"children":1904},{},[1905],{"type":48,"value":1906},"Check which operation is blocked",{"type":42,"tag":139,"props":1908,"children":1909},{},[1910,1915,1920],{"type":42,"tag":166,"props":1911,"children":1912},{},[1913],{"type":48,"value":1914},"Exit code 65 + syntax error",{"type":42,"tag":166,"props":1916,"children":1917},{},[1918],{"type":48,"value":1919},"Invalid profile syntax",{"type":42,"tag":166,"props":1921,"children":1922},{},[1923],{"type":48,"value":1924},"Check Seatbelt syntax",{"type":42,"tag":139,"props":1926,"children":1927},{},[1928,1939,1949],{"type":42,"tag":166,"props":1929,"children":1930},{},[1931,1937],{"type":42,"tag":179,"props":1932,"children":1934},{"className":1933},[],[1935],{"type":48,"value":1936},"ENOENT",{"type":48,"value":1938}," for existing files",{"type":42,"tag":166,"props":1940,"children":1941},{},[1942,1944],{"type":48,"value":1943},"Missing ",{"type":42,"tag":179,"props":1945,"children":1947},{"className":1946},[],[1948],{"type":48,"value":192},{"type":42,"tag":166,"props":1950,"children":1951},{},[1952,1954],{"type":48,"value":1953},"Add ",{"type":42,"tag":179,"props":1955,"children":1957},{"className":1956},[],[1958],{"type":48,"value":1959},"(allow file-read-metadata)",{"type":42,"tag":139,"props":1961,"children":1962},{},[1963,1968,1973],{"type":42,"tag":166,"props":1964,"children":1965},{},[1966],{"type":48,"value":1967},"Process hangs",{"type":42,"tag":166,"props":1969,"children":1970},{},[1971],{"type":48,"value":1972},"Missing IPC permissions",{"type":42,"tag":166,"props":1974,"children":1975},{},[1976,1977,1983],{"type":48,"value":1953},{"type":42,"tag":179,"props":1978,"children":1980},{"className":1979},[],[1981],{"type":48,"value":1982},"(allow mach-lookup)",{"type":48,"value":1984}," if needed",{"type":42,"tag":57,"props":1986,"children":1988},{"id":1987},"seatbelt-syntax-reference",[1989],{"type":48,"value":1990},"Seatbelt Syntax Reference",{"type":42,"tag":119,"props":1992,"children":1994},{"id":1993},"path-filters",[1995],{"type":48,"value":1996},"Path Filters",{"type":42,"tag":885,"props":1998,"children":2000},{"className":887,"code":1999,"language":889,"meta":890,"style":890},"(subpath \"\u002Fpath\")           ;; \u002Fpath and all descendants\n(literal \"\u002Fpath\u002Ffile\")      ;; Exact path only\n(regex \"^\u002Fpath\u002F.*\\\\.js$\")   ;; Regex match\n",[2001],{"type":42,"tag":179,"props":2002,"children":2003},{"__ignoreMap":890},[2004,2012,2020],{"type":42,"tag":896,"props":2005,"children":2006},{"class":898,"line":899},[2007],{"type":42,"tag":896,"props":2008,"children":2009},{},[2010],{"type":48,"value":2011},"(subpath \"\u002Fpath\")           ;; \u002Fpath and all descendants\n",{"type":42,"tag":896,"props":2013,"children":2014},{"class":898,"line":908},[2015],{"type":42,"tag":896,"props":2016,"children":2017},{},[2018],{"type":48,"value":2019},"(literal \"\u002Fpath\u002Ffile\")      ;; Exact path only\n",{"type":42,"tag":896,"props":2021,"children":2022},{"class":898,"line":917},[2023],{"type":42,"tag":896,"props":2024,"children":2025},{},[2026],{"type":48,"value":2027},"(regex \"^\u002Fpath\u002F.*\\\\.js$\")   ;; Regex match\n",{"type":42,"tag":119,"props":2029,"children":2031},{"id":2030},"parameter-substitution",[2032],{"type":48,"value":2033},"Parameter Substitution",{"type":42,"tag":885,"props":2035,"children":2037},{"className":887,"code":2036,"language":889,"meta":890,"style":890},"(param \"WORKING_DIR\")                                    ;; Direct use\n(subpath (param \"WORKING_DIR\"))                          ;; In subpath\n(string-append (param \"HOME\") \"\u002F.config\")                ;; Concatenation\n(regex-quote (param \"HOME\"))                             ;; Escape for regex\n",[2038],{"type":42,"tag":179,"props":2039,"children":2040},{"__ignoreMap":890},[2041,2049,2057,2065],{"type":42,"tag":896,"props":2042,"children":2043},{"class":898,"line":899},[2044],{"type":42,"tag":896,"props":2045,"children":2046},{},[2047],{"type":48,"value":2048},"(param \"WORKING_DIR\")                                    ;; Direct use\n",{"type":42,"tag":896,"props":2050,"children":2051},{"class":898,"line":908},[2052],{"type":42,"tag":896,"props":2053,"children":2054},{},[2055],{"type":48,"value":2056},"(subpath (param \"WORKING_DIR\"))                          ;; In subpath\n",{"type":42,"tag":896,"props":2058,"children":2059},{"class":898,"line":917},[2060],{"type":42,"tag":896,"props":2061,"children":2062},{},[2063],{"type":48,"value":2064},"(string-append (param \"HOME\") \"\u002F.config\")                ;; Concatenation\n",{"type":42,"tag":896,"props":2066,"children":2067},{"class":898,"line":927},[2068],{"type":42,"tag":896,"props":2069,"children":2070},{},[2071],{"type":48,"value":2072},"(regex-quote (param \"HOME\"))                             ;; Escape for regex\n",{"type":42,"tag":119,"props":2074,"children":2076},{"id":2075},"operations",[2077],{"type":48,"value":152},{"type":42,"tag":51,"props":2079,"children":2080},{},[2081],{"type":42,"tag":170,"props":2082,"children":2083},{},[2084],{"type":48,"value":2085},"File operations:",{"type":42,"tag":885,"props":2087,"children":2089},{"className":887,"code":2088,"language":889,"meta":890,"style":890},"(allow file-read-data ...)          ;; Read file contents\n(allow file-read-metadata)          ;; stat, lstat, readdir (no contents)\n(allow file-read-xattr ...)         ;; Read extended attributes\n(allow file-test-existence ...)     ;; Check if file exists\n(allow file-map-executable ...)     ;; mmap executable (dylibs)\n(allow file-write-data ...)         ;; Write to existing files\n(allow file-write-create ...)       ;; Create new files\n(allow file-write-unlink ...)       ;; Delete files\n(allow file-write* ...)             ;; All write operations\n(allow file-read* ...)              ;; All read operations (use sparingly)\n",[2090],{"type":42,"tag":179,"props":2091,"children":2092},{"__ignoreMap":890},[2093,2101,2109,2117,2125,2133,2141,2149,2157,2165],{"type":42,"tag":896,"props":2094,"children":2095},{"class":898,"line":899},[2096],{"type":42,"tag":896,"props":2097,"children":2098},{},[2099],{"type":48,"value":2100},"(allow file-read-data ...)          ;; Read file contents\n",{"type":42,"tag":896,"props":2102,"children":2103},{"class":898,"line":908},[2104],{"type":42,"tag":896,"props":2105,"children":2106},{},[2107],{"type":48,"value":2108},"(allow file-read-metadata)          ;; stat, lstat, readdir (no contents)\n",{"type":42,"tag":896,"props":2110,"children":2111},{"class":898,"line":917},[2112],{"type":42,"tag":896,"props":2113,"children":2114},{},[2115],{"type":48,"value":2116},"(allow file-read-xattr ...)         ;; Read extended attributes\n",{"type":42,"tag":896,"props":2118,"children":2119},{"class":898,"line":927},[2120],{"type":42,"tag":896,"props":2121,"children":2122},{},[2123],{"type":48,"value":2124},"(allow file-test-existence ...)     ;; Check if file exists\n",{"type":42,"tag":896,"props":2126,"children":2127},{"class":898,"line":936},[2128],{"type":42,"tag":896,"props":2129,"children":2130},{},[2131],{"type":48,"value":2132},"(allow file-map-executable ...)     ;; mmap executable (dylibs)\n",{"type":42,"tag":896,"props":2134,"children":2135},{"class":898,"line":945},[2136],{"type":42,"tag":896,"props":2137,"children":2138},{},[2139],{"type":48,"value":2140},"(allow file-write-data ...)         ;; Write to existing files\n",{"type":42,"tag":896,"props":2142,"children":2143},{"class":898,"line":954},[2144],{"type":42,"tag":896,"props":2145,"children":2146},{},[2147],{"type":48,"value":2148},"(allow file-write-create ...)       ;; Create new files\n",{"type":42,"tag":896,"props":2150,"children":2151},{"class":898,"line":963},[2152],{"type":42,"tag":896,"props":2153,"children":2154},{},[2155],{"type":48,"value":2156},"(allow file-write-unlink ...)       ;; Delete files\n",{"type":42,"tag":896,"props":2158,"children":2159},{"class":898,"line":971},[2160],{"type":42,"tag":896,"props":2161,"children":2162},{},[2163],{"type":48,"value":2164},"(allow file-write* ...)             ;; All write operations\n",{"type":42,"tag":896,"props":2166,"children":2167},{"class":898,"line":980},[2168],{"type":42,"tag":896,"props":2169,"children":2170},{},[2171],{"type":48,"value":2172},"(allow file-read* ...)              ;; All read operations (use sparingly)\n",{"type":42,"tag":51,"props":2174,"children":2175},{},[2176],{"type":42,"tag":170,"props":2177,"children":2178},{},[2179],{"type":48,"value":2180},"Process operations:",{"type":42,"tag":885,"props":2182,"children":2184},{"className":887,"code":2183,"language":889,"meta":890,"style":890},"(allow process-exec* ...)           ;; Execute binaries\n(allow process-fork)                ;; Fork child processes\n(allow process-info-pidinfo)        ;; Query process info\n(allow signal)                      ;; Send\u002Freceive signals\n",[2185],{"type":42,"tag":179,"props":2186,"children":2187},{"__ignoreMap":890},[2188,2196,2204,2212],{"type":42,"tag":896,"props":2189,"children":2190},{"class":898,"line":899},[2191],{"type":42,"tag":896,"props":2192,"children":2193},{},[2194],{"type":48,"value":2195},"(allow process-exec* ...)           ;; Execute binaries\n",{"type":42,"tag":896,"props":2197,"children":2198},{"class":898,"line":908},[2199],{"type":42,"tag":896,"props":2200,"children":2201},{},[2202],{"type":48,"value":2203},"(allow process-fork)                ;; Fork child processes\n",{"type":42,"tag":896,"props":2205,"children":2206},{"class":898,"line":917},[2207],{"type":42,"tag":896,"props":2208,"children":2209},{},[2210],{"type":48,"value":2211},"(allow process-info-pidinfo)        ;; Query process info\n",{"type":42,"tag":896,"props":2213,"children":2214},{"class":898,"line":927},[2215],{"type":42,"tag":896,"props":2216,"children":2217},{},[2218],{"type":48,"value":2219},"(allow signal)                      ;; Send\u002Freceive signals\n",{"type":42,"tag":51,"props":2221,"children":2222},{},[2223],{"type":42,"tag":170,"props":2224,"children":2225},{},[2226],{"type":48,"value":2227},"Network operations:",{"type":42,"tag":885,"props":2229,"children":2231},{"className":887,"code":2230,"language":889,"meta":890,"style":890},"(allow network-bind (local tcp \"*:*\"))              ;; Bind to any local TCP port\n(allow network-bind (local tcp \"*:8080\"))           ;; Bind to specific port\n(allow network-inbound (local tcp \"*:*\"))           ;; Accept TCP connections\n(allow network-outbound (remote ip \"localhost:*\"))  ;; Outbound to localhost only\n(allow network-outbound (remote tcp))               ;; Outbound TCP to any host\n(allow network-outbound\n    (literal \"\u002Fprivate\u002Fvar\u002Frun\u002FmDNSResponder\"))     ;; DNS via Unix socket\n(allow network*)                                    ;; All network (use sparingly)\n(deny network*)                                     ;; Block all network\n",[2232],{"type":42,"tag":179,"props":2233,"children":2234},{"__ignoreMap":890},[2235,2243,2251,2259,2267,2275,2282,2290,2298],{"type":42,"tag":896,"props":2236,"children":2237},{"class":898,"line":899},[2238],{"type":42,"tag":896,"props":2239,"children":2240},{},[2241],{"type":48,"value":2242},"(allow network-bind (local tcp \"*:*\"))              ;; Bind to any local TCP port\n",{"type":42,"tag":896,"props":2244,"children":2245},{"class":898,"line":908},[2246],{"type":42,"tag":896,"props":2247,"children":2248},{},[2249],{"type":48,"value":2250},"(allow network-bind (local tcp \"*:8080\"))           ;; Bind to specific port\n",{"type":42,"tag":896,"props":2252,"children":2253},{"class":898,"line":917},[2254],{"type":42,"tag":896,"props":2255,"children":2256},{},[2257],{"type":48,"value":2258},"(allow network-inbound (local tcp \"*:*\"))           ;; Accept TCP connections\n",{"type":42,"tag":896,"props":2260,"children":2261},{"class":898,"line":927},[2262],{"type":42,"tag":896,"props":2263,"children":2264},{},[2265],{"type":48,"value":2266},"(allow network-outbound (remote ip \"localhost:*\"))  ;; Outbound to localhost only\n",{"type":42,"tag":896,"props":2268,"children":2269},{"class":898,"line":936},[2270],{"type":42,"tag":896,"props":2271,"children":2272},{},[2273],{"type":48,"value":2274},"(allow network-outbound (remote tcp))               ;; Outbound TCP to any host\n",{"type":42,"tag":896,"props":2276,"children":2277},{"class":898,"line":945},[2278],{"type":42,"tag":896,"props":2279,"children":2280},{},[2281],{"type":48,"value":1504},{"type":42,"tag":896,"props":2283,"children":2284},{"class":898,"line":954},[2285],{"type":42,"tag":896,"props":2286,"children":2287},{},[2288],{"type":48,"value":2289},"    (literal \"\u002Fprivate\u002Fvar\u002Frun\u002FmDNSResponder\"))     ;; DNS via Unix socket\n",{"type":42,"tag":896,"props":2291,"children":2292},{"class":898,"line":963},[2293],{"type":42,"tag":896,"props":2294,"children":2295},{},[2296],{"type":48,"value":2297},"(allow network*)                                    ;; All network (use sparingly)\n",{"type":42,"tag":896,"props":2299,"children":2300},{"class":898,"line":971},[2301],{"type":42,"tag":896,"props":2302,"children":2303},{},[2304],{"type":48,"value":2305},"(deny network*)                                     ;; Block all network\n",{"type":42,"tag":51,"props":2307,"children":2308},{},[2309],{"type":42,"tag":170,"props":2310,"children":2311},{},[2312],{"type":48,"value":2313},"IPC operations:",{"type":42,"tag":885,"props":2315,"children":2317},{"className":887,"code":2316,"language":889,"meta":890,"style":890},"(allow mach-lookup ...)             ;; Mach IPC lookups\n(allow mach-register ...)           ;; Register Mach services\n(allow ipc-posix-shm* ...)          ;; POSIX shared memory\n(allow ipc-posix-sem* ...)          ;; POSIX semaphores\n",[2318],{"type":42,"tag":179,"props":2319,"children":2320},{"__ignoreMap":890},[2321,2329,2337,2345],{"type":42,"tag":896,"props":2322,"children":2323},{"class":898,"line":899},[2324],{"type":42,"tag":896,"props":2325,"children":2326},{},[2327],{"type":48,"value":2328},"(allow mach-lookup ...)             ;; Mach IPC lookups\n",{"type":42,"tag":896,"props":2330,"children":2331},{"class":898,"line":908},[2332],{"type":42,"tag":896,"props":2333,"children":2334},{},[2335],{"type":48,"value":2336},"(allow mach-register ...)           ;; Register Mach services\n",{"type":42,"tag":896,"props":2338,"children":2339},{"class":898,"line":917},[2340],{"type":42,"tag":896,"props":2341,"children":2342},{},[2343],{"type":48,"value":2344},"(allow ipc-posix-shm* ...)          ;; POSIX shared memory\n",{"type":42,"tag":896,"props":2346,"children":2347},{"class":898,"line":927},[2348],{"type":42,"tag":896,"props":2349,"children":2350},{},[2351],{"type":48,"value":2352},"(allow ipc-posix-sem* ...)          ;; POSIX semaphores\n",{"type":42,"tag":51,"props":2354,"children":2355},{},[2356],{"type":42,"tag":170,"props":2357,"children":2358},{},[2359],{"type":48,"value":2360},"System operations:",{"type":42,"tag":885,"props":2362,"children":2364},{"className":887,"code":2363,"language":889,"meta":890,"style":890},"(allow sysctl-read)                 ;; Read system info\n(allow sysctl-write ...)            ;; Modify sysctl (rare)\n(allow iokit-open ...)              ;; IOKit device access\n(allow pseudo-tty)                  ;; Terminal emulation\n(allow dynamic-code-generation)     ;; JIT compilation\n(allow user-preference-read ...)    ;; Read user defaults\n",[2365],{"type":42,"tag":179,"props":2366,"children":2367},{"__ignoreMap":890},[2368,2376,2384,2392,2400,2408],{"type":42,"tag":896,"props":2369,"children":2370},{"class":898,"line":899},[2371],{"type":42,"tag":896,"props":2372,"children":2373},{},[2374],{"type":48,"value":2375},"(allow sysctl-read)                 ;; Read system info\n",{"type":42,"tag":896,"props":2377,"children":2378},{"class":898,"line":908},[2379],{"type":42,"tag":896,"props":2380,"children":2381},{},[2382],{"type":48,"value":2383},"(allow sysctl-write ...)            ;; Modify sysctl (rare)\n",{"type":42,"tag":896,"props":2385,"children":2386},{"class":898,"line":917},[2387],{"type":42,"tag":896,"props":2388,"children":2389},{},[2390],{"type":48,"value":2391},"(allow iokit-open ...)              ;; IOKit device access\n",{"type":42,"tag":896,"props":2393,"children":2394},{"class":898,"line":927},[2395],{"type":42,"tag":896,"props":2396,"children":2397},{},[2398],{"type":48,"value":2399},"(allow pseudo-tty)                  ;; Terminal emulation\n",{"type":42,"tag":896,"props":2401,"children":2402},{"class":898,"line":936},[2403],{"type":42,"tag":896,"props":2404,"children":2405},{},[2406],{"type":48,"value":2407},"(allow dynamic-code-generation)     ;; JIT compilation\n",{"type":42,"tag":896,"props":2409,"children":2410},{"class":898,"line":945},[2411],{"type":42,"tag":896,"props":2412,"children":2413},{},[2414],{"type":48,"value":2415},"(allow user-preference-read ...)    ;; Read user defaults\n",{"type":42,"tag":57,"props":2417,"children":2419},{"id":2418},"known-limitations",[2420],{"type":48,"value":2421},"Known Limitations",{"type":42,"tag":2423,"props":2424,"children":2425},"ol",{},[2426,2436],{"type":42,"tag":68,"props":2427,"children":2428},{},[2429,2434],{"type":42,"tag":170,"props":2430,"children":2431},{},[2432],{"type":48,"value":2433},"Deprecated but functional",{"type":48,"value":2435},": Apple deprecated sandbox-exec but it works through macOS 14+",{"type":42,"tag":68,"props":2437,"children":2438},{},[2439,2444,2446,2452,2453],{"type":42,"tag":170,"props":2440,"children":2441},{},[2442],{"type":48,"value":2443},"Temp directory access often required",{"type":48,"value":2445},": Many applications need ",{"type":42,"tag":179,"props":2447,"children":2449},{"className":2448},[],[2450],{"type":48,"value":2451},"\u002Ftmp",{"type":48,"value":819},{"type":42,"tag":179,"props":2454,"children":2456},{"className":2455},[],[2457],{"type":48,"value":2458},"\u002Fvar\u002Ffolders",{"type":42,"tag":57,"props":2460,"children":2462},{"id":2461},"example-generic-cli-application",[2463],{"type":48,"value":2464},"Example: Generic CLI Application",{"type":42,"tag":885,"props":2466,"children":2468},{"className":887,"code":2467,"language":889,"meta":890,"style":890},"(version 1)\n(deny default)\n\n;; Process\n(allow process-exec*)\n(allow process-fork)\n(allow sysctl-read)\n\n;; File metadata (path resolution)\n(allow file-read-metadata)\n\n;; File reads (allowlist)\n(allow file-read-data\n    (literal \"\u002F\") (literal \"\u002Fvar\") (literal \"\u002Fetc\") (literal \"\u002Ftmp\") (literal \"\u002Fprivate\")\n    (subpath \"\u002Fusr\") (subpath \"\u002Fbin\") (subpath \"\u002Fsbin\") (subpath \"\u002Fopt\")\n    (subpath \"\u002FSystem\") (subpath \"\u002FLibrary\") (subpath \"\u002Fdev\")\n    (subpath \"\u002Fprivate\u002Fvar\") (subpath \"\u002Fprivate\u002Fetc\") (subpath \"\u002Fprivate\u002Ftmp\")\n    (subpath (param \"WORKING_DIR\")))\n\n;; File writes (restricted)\n(allow file-write*\n    (subpath (param \"WORKING_DIR\"))\n    (subpath \"\u002Fprivate\u002Ftmp\") (subpath \"\u002Ftmp\") (subpath \"\u002Fprivate\u002Fvar\u002Ffolders\")\n    (literal \"\u002Fdev\u002Fnull\") (literal \"\u002Fdev\u002Ftty\"))\n\n;; Network disabled\n(deny network*)\n",[2469],{"type":42,"tag":179,"props":2470,"children":2471},{"__ignoreMap":890},[2472,2479,2486,2493,2501,2508,2515,2522,2529,2537,2544,2551,2559,2566,2574,2582,2590,2598,2605,2612,2620,2627,2634,2642,2650,2657,2666],{"type":42,"tag":896,"props":2473,"children":2474},{"class":898,"line":899},[2475],{"type":42,"tag":896,"props":2476,"children":2477},{},[2478],{"type":48,"value":905},{"type":42,"tag":896,"props":2480,"children":2481},{"class":898,"line":908},[2482],{"type":42,"tag":896,"props":2483,"children":2484},{},[2485],{"type":48,"value":914},{"type":42,"tag":896,"props":2487,"children":2488},{"class":898,"line":917},[2489],{"type":42,"tag":896,"props":2490,"children":2491},{"emptyLinePlaceholder":921},[2492],{"type":48,"value":924},{"type":42,"tag":896,"props":2494,"children":2495},{"class":898,"line":927},[2496],{"type":42,"tag":896,"props":2497,"children":2498},{},[2499],{"type":48,"value":2500},";; Process\n",{"type":42,"tag":896,"props":2502,"children":2503},{"class":898,"line":936},[2504],{"type":42,"tag":896,"props":2505,"children":2506},{},[2507],{"type":48,"value":942},{"type":42,"tag":896,"props":2509,"children":2510},{"class":898,"line":945},[2511],{"type":42,"tag":896,"props":2512,"children":2513},{},[2514],{"type":48,"value":951},{"type":42,"tag":896,"props":2516,"children":2517},{"class":898,"line":954},[2518],{"type":42,"tag":896,"props":2519,"children":2520},{},[2521],{"type":48,"value":960},{"type":42,"tag":896,"props":2523,"children":2524},{"class":898,"line":963},[2525],{"type":42,"tag":896,"props":2526,"children":2527},{"emptyLinePlaceholder":921},[2528],{"type":48,"value":924},{"type":42,"tag":896,"props":2530,"children":2531},{"class":898,"line":971},[2532],{"type":42,"tag":896,"props":2533,"children":2534},{},[2535],{"type":48,"value":2536},";; File metadata (path resolution)\n",{"type":42,"tag":896,"props":2538,"children":2539},{"class":898,"line":980},[2540],{"type":42,"tag":896,"props":2541,"children":2542},{},[2543],{"type":48,"value":986},{"type":42,"tag":896,"props":2545,"children":2546},{"class":898,"line":1102},[2547],{"type":42,"tag":896,"props":2548,"children":2549},{"emptyLinePlaceholder":921},[2550],{"type":48,"value":924},{"type":42,"tag":896,"props":2552,"children":2553},{"class":898,"line":1111},[2554],{"type":42,"tag":896,"props":2555,"children":2556},{},[2557],{"type":48,"value":2558},";; File reads (allowlist)\n",{"type":42,"tag":896,"props":2560,"children":2561},{"class":898,"line":1120},[2562],{"type":42,"tag":896,"props":2563,"children":2564},{},[2565],{"type":48,"value":1027},{"type":42,"tag":896,"props":2567,"children":2568},{"class":898,"line":1128},[2569],{"type":42,"tag":896,"props":2570,"children":2571},{},[2572],{"type":48,"value":2573},"    (literal \"\u002F\") (literal \"\u002Fvar\") (literal \"\u002Fetc\") (literal \"\u002Ftmp\") (literal \"\u002Fprivate\")\n",{"type":42,"tag":896,"props":2575,"children":2576},{"class":898,"line":1137},[2577],{"type":42,"tag":896,"props":2578,"children":2579},{},[2580],{"type":48,"value":2581},"    (subpath \"\u002Fusr\") (subpath \"\u002Fbin\") (subpath \"\u002Fsbin\") (subpath \"\u002Fopt\")\n",{"type":42,"tag":896,"props":2583,"children":2584},{"class":898,"line":1146},[2585],{"type":42,"tag":896,"props":2586,"children":2587},{},[2588],{"type":48,"value":2589},"    (subpath \"\u002FSystem\") (subpath \"\u002FLibrary\") (subpath \"\u002Fdev\")\n",{"type":42,"tag":896,"props":2591,"children":2592},{"class":898,"line":1155},[2593],{"type":42,"tag":896,"props":2594,"children":2595},{},[2596],{"type":48,"value":2597},"    (subpath \"\u002Fprivate\u002Fvar\") (subpath \"\u002Fprivate\u002Fetc\") (subpath \"\u002Fprivate\u002Ftmp\")\n",{"type":42,"tag":896,"props":2599,"children":2600},{"class":898,"line":1164},[2601],{"type":42,"tag":896,"props":2602,"children":2603},{},[2604],{"type":48,"value":1231},{"type":42,"tag":896,"props":2606,"children":2607},{"class":898,"line":1173},[2608],{"type":42,"tag":896,"props":2609,"children":2610},{"emptyLinePlaceholder":921},[2611],{"type":48,"value":924},{"type":42,"tag":896,"props":2613,"children":2614},{"class":898,"line":1182},[2615],{"type":42,"tag":896,"props":2616,"children":2617},{},[2618],{"type":48,"value":2619},";; File writes (restricted)\n",{"type":42,"tag":896,"props":2621,"children":2622},{"class":898,"line":1190},[2623],{"type":42,"tag":896,"props":2624,"children":2625},{},[2626],{"type":48,"value":1322},{"type":42,"tag":896,"props":2628,"children":2629},{"class":898,"line":1199},[2630],{"type":42,"tag":896,"props":2631,"children":2632},{},[2633],{"type":48,"value":1338},{"type":42,"tag":896,"props":2635,"children":2636},{"class":898,"line":1208},[2637],{"type":42,"tag":896,"props":2638,"children":2639},{},[2640],{"type":48,"value":2641},"    (subpath \"\u002Fprivate\u002Ftmp\") (subpath \"\u002Ftmp\") (subpath \"\u002Fprivate\u002Fvar\u002Ffolders\")\n",{"type":42,"tag":896,"props":2643,"children":2644},{"class":898,"line":1216},[2645],{"type":42,"tag":896,"props":2646,"children":2647},{},[2648],{"type":48,"value":2649},"    (literal \"\u002Fdev\u002Fnull\") (literal \"\u002Fdev\u002Ftty\"))\n",{"type":42,"tag":896,"props":2651,"children":2652},{"class":898,"line":1225},[2653],{"type":42,"tag":896,"props":2654,"children":2655},{"emptyLinePlaceholder":921},[2656],{"type":48,"value":924},{"type":42,"tag":896,"props":2658,"children":2660},{"class":898,"line":2659},26,[2661],{"type":42,"tag":896,"props":2662,"children":2663},{},[2664],{"type":48,"value":2665},";; Network disabled\n",{"type":42,"tag":896,"props":2667,"children":2669},{"class":898,"line":2668},27,[2670],{"type":42,"tag":896,"props":2671,"children":2672},{},[2673],{"type":48,"value":1441},{"type":42,"tag":51,"props":2675,"children":2676},{},[2677],{"type":42,"tag":170,"props":2678,"children":2679},{},[2680],{"type":48,"value":2681},"Usage:",{"type":42,"tag":885,"props":2683,"children":2685},{"className":1636,"code":2684,"language":1638,"meta":890,"style":890},"sandbox-exec -f profile.sb \\\n  -D WORKING_DIR=\u002Fpath\u002Fto\u002Fproject \\\n  -D HOME=$HOME \\\n  \u002Fpath\u002Fto\u002Fapplication\n",[2686],{"type":42,"tag":179,"props":2687,"children":2688},{"__ignoreMap":890},[2689,2709,2726,2741],{"type":42,"tag":896,"props":2690,"children":2691},{"class":898,"line":899},[2692,2696,2700,2704],{"type":42,"tag":896,"props":2693,"children":2694},{"style":1657},[2695],{"type":48,"value":1660},{"type":42,"tag":896,"props":2697,"children":2698},{"style":1663},[2699],{"type":48,"value":1666},{"type":42,"tag":896,"props":2701,"children":2702},{"style":1663},[2703],{"type":48,"value":1671},{"type":42,"tag":896,"props":2705,"children":2706},{"style":1693},[2707],{"type":48,"value":2708}," \\\n",{"type":42,"tag":896,"props":2710,"children":2711},{"class":898,"line":908},[2712,2717,2722],{"type":42,"tag":896,"props":2713,"children":2714},{"style":1663},[2715],{"type":48,"value":2716},"  -D",{"type":42,"tag":896,"props":2718,"children":2719},{"style":1663},[2720],{"type":48,"value":2721}," WORKING_DIR=\u002Fpath\u002Fto\u002Fproject",{"type":42,"tag":896,"props":2723,"children":2724},{"style":1693},[2725],{"type":48,"value":2708},{"type":42,"tag":896,"props":2727,"children":2728},{"class":898,"line":917},[2729,2733,2737],{"type":42,"tag":896,"props":2730,"children":2731},{"style":1663},[2732],{"type":48,"value":2716},{"type":42,"tag":896,"props":2734,"children":2735},{"style":1663},[2736],{"type":48,"value":1690},{"type":42,"tag":896,"props":2738,"children":2739},{"style":1693},[2740],{"type":48,"value":1768},{"type":42,"tag":896,"props":2742,"children":2743},{"class":898,"line":927},[2744],{"type":42,"tag":896,"props":2745,"children":2746},{"style":1663},[2747],{"type":48,"value":2748},"  \u002Fpath\u002Fto\u002Fapplication\n",{"type":42,"tag":57,"props":2750,"children":2752},{"id":2751},"references",[2753],{"type":48,"value":2754},"References",{"type":42,"tag":64,"props":2756,"children":2757},{},[2758,2768],{"type":42,"tag":68,"props":2759,"children":2760},{},[2761],{"type":42,"tag":1627,"props":2762,"children":2765},{"href":2763,"rel":2764},"https:\u002F\u002Freverse.put.as\u002Fwp-content\u002Fuploads\u002F2011\u002F09\u002FApple-Sandbox-Guide-v1.0.pdf",[1631],[2766],{"type":48,"value":2767},"Apple Sandbox Guide (reverse-engineered)",{"type":42,"tag":68,"props":2769,"children":2770},{},[2771],{"type":42,"tag":1627,"props":2772,"children":2775},{"href":2773,"rel":2774},"https:\u002F\u002Fkeith.github.io\u002Fxcode-man-pages\u002Fsandbox-exec.1.html",[1631],[2776],{"type":48,"value":2777},"sandbox-exec man page",{"type":42,"tag":2779,"props":2780,"children":2781},"style",{},[2782],{"type":48,"value":2783},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":2785,"total":2941},[2786,2803,2813,2833,2848,2861,2873,2883,2896,2907,2919,2930],{"slug":2787,"name":2787,"fn":2788,"description":2789,"org":2790,"tags":2791,"stars":23,"repoUrl":24,"updatedAt":2802},"address-sanitizer","detect memory errors during fuzzing","AddressSanitizer detects memory errors during fuzzing. Use when fuzzing C\u002FC++ code to find buffer overflows and use-after-free bugs.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2792,2795,2798,2799],{"name":2793,"slug":2794,"type":16},"C#","c",{"name":2796,"slug":2797,"type":16},"Debugging","debugging",{"name":14,"slug":15,"type":16},{"name":2800,"slug":2801,"type":16},"Testing","testing","2026-07-17T06:05:14.925095",{"slug":2804,"name":2804,"fn":2805,"description":2806,"org":2807,"tags":2808,"stars":23,"repoUrl":24,"updatedAt":2812},"aflpp","perform multi-core fuzzing of C\u002FC++ projects","AFL++ is a fork of AFL with better fuzzing performance and advanced features. Use for multi-core fuzzing of C\u002FC++ projects.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2809,2810,2811],{"name":2793,"slug":2794,"type":16},{"name":14,"slug":15,"type":16},{"name":2800,"slug":2801,"type":16},"2026-07-17T06:05:12.433192",{"slug":2814,"name":2814,"fn":2815,"description":2816,"org":2817,"tags":2818,"stars":23,"repoUrl":24,"updatedAt":2832},"agentic-actions-auditor","audit GitHub Actions for security vulnerabilities","Audits GitHub Actions workflows for security vulnerabilities in AI agent integrations including Claude Code Action, Gemini CLI, OpenAI Codex, and GitHub AI Inference. Detects attack vectors where attacker-controlled input reaches AI agents running in CI\u002FCD pipelines, including env var intermediary patterns, direct expression injection, dangerous sandbox configurations, and wildcard user allowlists. Use when reviewing workflow files that invoke AI coding agents, auditing CI\u002FCD pipeline security for prompt injection risks, or evaluating agentic action configurations.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2819,2822,2825,2828,2831],{"name":2820,"slug":2821,"type":16},"Agents","agents",{"name":2823,"slug":2824,"type":16},"CI\u002FCD","ci-cd",{"name":2826,"slug":2827,"type":16},"Code Analysis","code-analysis",{"name":2829,"slug":2830,"type":16},"GitHub Actions","github-actions",{"name":14,"slug":15,"type":16},"2026-07-18T05:47:48.564744",{"slug":2834,"name":2834,"fn":2835,"description":2836,"org":2837,"tags":2838,"stars":23,"repoUrl":24,"updatedAt":2847},"algorand-vulnerability-scanner","scan Algorand smart contracts for vulnerabilities","Scans Algorand smart contracts for 11 common vulnerabilities including rekeying attacks, unchecked transaction fees, missing field validations, and access control issues. Use when auditing Algorand projects (TEAL\u002FPyTeal).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2839,2842,2843,2844],{"name":2840,"slug":2841,"type":16},"Audit","audit",{"name":2826,"slug":2827,"type":16},{"name":14,"slug":15,"type":16},{"name":2845,"slug":2846,"type":16},"Smart Contracts","smart-contracts","2026-07-18T05:47:43.989063",{"slug":2849,"name":2849,"fn":2850,"description":2851,"org":2852,"tags":2853,"stars":23,"repoUrl":24,"updatedAt":2860},"ask-questions-if-underspecified","clarify requirements before implementation","Clarify requirements before implementing. Use when serious doubts arise.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2854,2857],{"name":2855,"slug":2856,"type":16},"Engineering","engineering",{"name":2858,"slug":2859,"type":16},"Productivity","productivity","2026-07-17T06:05:33.543262",{"slug":2862,"name":2862,"fn":2863,"description":2864,"org":2865,"tags":2866,"stars":23,"repoUrl":24,"updatedAt":2872},"atheris","fuzz Python code with Atheris","Atheris is a coverage-guided Python fuzzer based on libFuzzer. Use for fuzzing pure Python code and Python C extensions.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2867,2870,2871],{"name":2868,"slug":2869,"type":16},"Python","python",{"name":14,"slug":15,"type":16},{"name":2800,"slug":2801,"type":16},"2026-07-17T06:05:14.575191",{"slug":2874,"name":2874,"fn":2875,"description":2876,"org":2877,"tags":2878,"stars":23,"repoUrl":24,"updatedAt":2882},"audit-augmentation","augment code graphs with audit findings","Augments Trailmark code graphs with external audit findings from SARIF static analysis results, weAudit annotation files, and version-gated Trailmark 0.4.x binary-analysis graph exports. Maps findings to graph nodes by file and line overlap, creates severity-based subgraphs, and enables cross-referencing findings with pre-analysis data (blast radius, taint, etc.). Use when projecting SARIF results onto a code graph, overlaying weAudit annotations, importing binary graph findings, cross-referencing Semgrep, CodeQL, or binary-analysis findings with call graph data, or visualizing audit findings in the context of code structure.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2879,2880,2881],{"name":2840,"slug":2841,"type":16},{"name":2826,"slug":2827,"type":16},{"name":14,"slug":15,"type":16},"2026-08-01T05:44:54.920542",{"slug":2884,"name":2884,"fn":2885,"description":2886,"org":2887,"tags":2888,"stars":23,"repoUrl":24,"updatedAt":2895},"audit-context-building","build architectural context for code analysis","Enables ultra-granular, line-by-line code analysis to build deep architectural context before vulnerability or bug finding.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2889,2892,2893,2894],{"name":2890,"slug":2891,"type":16},"Architecture","architecture",{"name":2840,"slug":2841,"type":16},{"name":2826,"slug":2827,"type":16},{"name":2855,"slug":2856,"type":16},"2026-07-18T05:47:40.122449",{"slug":2897,"name":2897,"fn":2898,"description":2899,"org":2900,"tags":2901,"stars":23,"repoUrl":24,"updatedAt":2906},"audit-prep-assistant","prepare codebases for security audits","Prepares codebases for security review using Trail of Bits' checklist. Helps set review goals, runs static analysis tools, increases test coverage, removes dead code, ensures accessibility, and generates documentation (flowcharts, user stories, inline comments).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2902,2903,2904,2905],{"name":2840,"slug":2841,"type":16},{"name":2826,"slug":2827,"type":16},{"name":2855,"slug":2856,"type":16},{"name":14,"slug":15,"type":16},"2026-07-18T05:47:39.210985",{"slug":2908,"name":2908,"fn":2909,"description":2910,"org":2911,"tags":2912,"stars":23,"repoUrl":24,"updatedAt":2918},"burpsuite-project-parser","parse Burp Suite project files","Searches and explores Burp Suite project files (.burp) from the command line. Use when searching response headers or bodies with regex patterns, extracting security audit findings, dumping proxy history or site map data, or analyzing HTTP traffic captured in a Burp project.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2913,2914,2917],{"name":2840,"slug":2841,"type":16},{"name":2915,"slug":2916,"type":16},"CLI","cli",{"name":14,"slug":15,"type":16},"2026-07-17T06:05:33.198077",{"slug":2920,"name":2920,"fn":2921,"description":2922,"org":2923,"tags":2924,"stars":23,"repoUrl":24,"updatedAt":2929},"c-review","audit C and C++ code","Performs comprehensive C\u002FC++ security review for memory corruption, integer overflows, race conditions, and platform-specific vulnerabilities. Use when auditing native C\u002FC++ applications, reviewing daemons or services for memory safety, or hunting integer overflow \u002F use-after-free \u002F race conditions in userspace code.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2925,2926,2927,2928],{"name":2840,"slug":2841,"type":16},{"name":2793,"slug":2794,"type":16},{"name":2826,"slug":2827,"type":16},{"name":14,"slug":15,"type":16},"2026-07-17T06:05:11.333374",{"slug":2931,"name":2931,"fn":2932,"description":2933,"org":2934,"tags":2935,"stars":23,"repoUrl":24,"updatedAt":2940},"cairo-vulnerability-scanner","scan Cairo and StarkNet contracts for vulnerabilities","Scans Cairo\u002FStarkNet smart contracts for 6 critical vulnerabilities including felt252 arithmetic overflow, L1-L2 messaging issues, address conversion problems, and signature replay. Use when auditing StarkNet projects.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2936,2937,2938,2939],{"name":2840,"slug":2841,"type":16},{"name":2826,"slug":2827,"type":16},{"name":14,"slug":15,"type":16},{"name":2845,"slug":2846,"type":16},"2026-07-18T05:47:42.84568",111,{"items":2943,"total":2989},[2944,2951,2957,2965,2972,2977,2983],{"slug":2787,"name":2787,"fn":2788,"description":2789,"org":2945,"tags":2946,"stars":23,"repoUrl":24,"updatedAt":2802},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2947,2948,2949,2950],{"name":2793,"slug":2794,"type":16},{"name":2796,"slug":2797,"type":16},{"name":14,"slug":15,"type":16},{"name":2800,"slug":2801,"type":16},{"slug":2804,"name":2804,"fn":2805,"description":2806,"org":2952,"tags":2953,"stars":23,"repoUrl":24,"updatedAt":2812},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2954,2955,2956],{"name":2793,"slug":2794,"type":16},{"name":14,"slug":15,"type":16},{"name":2800,"slug":2801,"type":16},{"slug":2814,"name":2814,"fn":2815,"description":2816,"org":2958,"tags":2959,"stars":23,"repoUrl":24,"updatedAt":2832},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2960,2961,2962,2963,2964],{"name":2820,"slug":2821,"type":16},{"name":2823,"slug":2824,"type":16},{"name":2826,"slug":2827,"type":16},{"name":2829,"slug":2830,"type":16},{"name":14,"slug":15,"type":16},{"slug":2834,"name":2834,"fn":2835,"description":2836,"org":2966,"tags":2967,"stars":23,"repoUrl":24,"updatedAt":2847},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2968,2969,2970,2971],{"name":2840,"slug":2841,"type":16},{"name":2826,"slug":2827,"type":16},{"name":14,"slug":15,"type":16},{"name":2845,"slug":2846,"type":16},{"slug":2849,"name":2849,"fn":2850,"description":2851,"org":2973,"tags":2974,"stars":23,"repoUrl":24,"updatedAt":2860},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2975,2976],{"name":2855,"slug":2856,"type":16},{"name":2858,"slug":2859,"type":16},{"slug":2862,"name":2862,"fn":2863,"description":2864,"org":2978,"tags":2979,"stars":23,"repoUrl":24,"updatedAt":2872},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2980,2981,2982],{"name":2868,"slug":2869,"type":16},{"name":14,"slug":15,"type":16},{"name":2800,"slug":2801,"type":16},{"slug":2874,"name":2874,"fn":2875,"description":2876,"org":2984,"tags":2985,"stars":23,"repoUrl":24,"updatedAt":2882},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2986,2987,2988],{"name":2840,"slug":2841,"type":16},{"name":2826,"slug":2827,"type":16},{"name":14,"slug":15,"type":16},77]