mirror of
https://github.com/waybarrios/opencode-power-pack.git
synced 2026-11-18 18:03:43 +00:00
Complete portable script execution under native macOS containment
Add the missing Seatbelt interpreter permission through an exact-version, fail-closed compatibility shim so shell and env shebang commands work without weakening filesystem visibility. Align the Linux credential-directory test with its disposable tmpfs behavior and document when the temporary upstream compatibility layer can be removed.
This commit is contained in:
@@ -83,6 +83,8 @@ Host filesystem reads are denied by default. The runner exposes the workspace, i
|
||||
|
||||
Selecting a command grants read access to that executable. If it belongs to a package or Python virtual environment identified by a nearby `package.json` or `pyvenv.cfg`, the bounded package root is also readable so resource-bearing CLIs can start. The runner also resolves bounded shebang dependencies, including `#!/usr/bin/env node` and `env -S`, without exposing a whole version-manager or system prefix. Commands selected from `~/.local/bin` can read `~/.local/lib` for user-level Python packages, but not user configuration, cache, or credential directories. Installing project-specific tools inside the workspace remains the most predictable option.
|
||||
|
||||
The pinned native runtime omits macOS Seatbelt's separate `process-exec-interpreter` permission even though it permits native executable files. The adapter adds exactly that narrow operation to the generated macOS profile after verifying the pinned descriptor shape. It fails closed if the upstream profile changes. Filesystem read rules still decide which scripts and interpreters are visible, and the compatibility shim should be removed when a verified upstream release includes the permission directly.
|
||||
|
||||
When the command starts inside a Git repository, the runner treats the containing worktree root as the workspace while preserving the original working directory. Existing credential-shaped files are denied recursively, and exact credential paths in both the repository root and original working directory stay protected even when absent at startup. The runner also exposes validated linked-worktree and submodule metadata, so ordinary inspection commands work from nested directories, linked worktrees, and standard submodules. The repository's `.git/config` remains readable while writes to it and hooks remain denied. Do not store credentials in Git remote URLs or custom repository configuration. Use an explicitly granted environment variable for network credentials instead.
|
||||
|
||||
The runner is intentionally lightweight and on demand. It uses native Seatbelt or Bubblewrap primitives for one command tree, creates no persistent container or daemon, and removes its private directory afterward. Because the pinned upstream manager has process-global state, a second command in the same Node.js process is rejected while one is active. Independent CLI processes have separate managers.
|
||||
|
||||
Reference in New Issue
Block a user