Skip to main content

weft-macos-sandbox

macOS sandbox runner plugin for Weft.

This extension adds the macos-sandbox runner via the weft.runners entry-point group. It currently supports one-shot command TaskSpecs only and uses sandbox-exec with a caller-provided profile.

Environment variables

The sandboxed child process does not inherit the full host environment. By default only a fixed baseline of session-plumbing variables is forwarded:

  • HOME
  • LANG
  • LC_ALL
  • LC_CTYPE
  • LOGNAME
  • PATH
  • SHELL
  • TERM
  • TMPDIR
  • USER

To forward additional host-derived values, opt in explicitly via spec.runner.options.env_passthrough:

{
  "runner": {
    "name": "macos-sandbox",
    "options": {
      "profile": "/path/to/sandbox.sb",
      "env_passthrough": ["MY_HOST_TOKEN"]
    }
  }
}

For fixed values (not derived from the host), set spec.env instead. spec.env always wins over both the baseline and env_passthrough, so TaskSpec-declared values cannot be shadowed by host state.

Migration note: weft-macos-sandbox releases before 0.6.0 inherited the full host environment; set env_passthrough explicitly if you depended on that.

Security model

This plugin's preflight validation only checks that spec.runner.options.profile exists on disk (not that it is a regular, non-empty file) and that the configured sandbox_binary (default sandbox-exec) is on PATH; at construction time the option only needs to be a non-empty string. It does not parse or validate the profile's contents. Isolation is exactly what the supplied Seatbelt profile grants — nothing more, nothing less. A profile that reads (allow default) grants no isolation at all; the plugin runs it without complaint. Writing a correctly restrictive profile is the caller's responsibility.

sandbox-exec is an Apple-deprecated, undocumented mechanism: Apple has marked the command deprecated for years and publishes no supported API or stability guarantee for the Seatbelt profile language it consumes. Treat this runner as a best-effort, host-specific containment tool, not a supported or guaranteed sandbox boundary — consistent with Weft's broader trust model (docs/specifications/00-Overview_and_Architecture.md, "Observability and Security"): user-level trust, not hostile multi-tenancy, with the OS/filesystem as the actual security boundary.

Release tag:

  • weft_macos_sandbox/vX.Y.Z

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

weft_macos_sandbox-0.6.1.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

weft_macos_sandbox-0.6.1-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file weft_macos_sandbox-0.6.1.tar.gz.

File metadata

  • Download URL: weft_macos_sandbox-0.6.1.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for weft_macos_sandbox-0.6.1.tar.gz
Algorithm Hash digest
SHA256 9daea76b25e1ee8387a3a8910eb73a5f0f61d19ba7a680ec178b2d2dd46b67d6
MD5 04477eae1ab487a36d791fb20849c0f5
BLAKE2b-256 86d4e328b99350d6d6196599e566b698c1c4f1bab244ee40100da422dbd4c900

See more details on using hashes here.

File details

Details for the file weft_macos_sandbox-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: weft_macos_sandbox-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for weft_macos_sandbox-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 db03e0db89d301cdfbb27ef06891c6a818095729e8fa5e482859c6fcbc0bd59f
MD5 c4b5d620565297fae4e61845f5cbc2a8
BLAKE2b-256 03344754d633320d81c84f32021bb63ac22f62f7703d39f42bcb91e896b96a7b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.6.1 This release

2 files

0.6.0

2 files

0.5.4

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page