Skip to content

buildSeatbeltProfile

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/libs/agent-core/src/tools/bash-sandbox.ts

Build a macOS Seatbelt profile (SBPL) that:

  • Denies everything by default
  • Allows global file reads (metadata, data, xattr)
  • Allows file writes only within rootDir
  • Allows process exec/fork (needed for sh, node, npm, git, etc.)
  • Allows signal sending to own process group

Signature

ts
function buildSeatbeltProfile(rootDir: string): string

Parameters

NameType
rootDirstring

Returns: string

Was this page helpful?

Download as PDF