Skip to content

fix: capture process identity in macOS sandboxes - #3

Merged
janicduplessis merged 1 commit into
mainfrom
fix/macos-sandbox-boot
Sep 7, 2026
Merged

fix: capture process identity in macOS sandboxes#3
janicduplessis merged 1 commit into
mainfrom
fix/macos-sandbox-boot

Conversation

@janicduplessis

@janicduplessis janicduplessis commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Description

macOS process capture fails in the Codex workspace sandbox: reading the PID and exact start time succeeds, but the boot-session query returns EPERM. Fixes #2.

Solution

Allow new macOS tokens to omit boot identity when access is denied, retaining the exact microsecond start timestamp. Tokens already carrying a boot ID still require it to match. If the start timestamp matches, inability to verify the saved boot ID returns ACCESS_DENIED.

Without boot identity, a repeated PID and exact timestamp after a reboot or clock reset cannot be distinguished. This relaxes the original boot-ID requirement to allow restricted captures; the limitation is documented. Linux and Windows identity requirements are unchanged. Prepares 0.1.1.

Test plan

  • Verified capture, serialization, fresh-reader matching, and exited-child detection inside the actual Codex sandbox.
  • On macOS, npm run build && npm run test:sandbox exercises denied boot queries, both sandbox-boundary directions, denied process inspection, and denied ps execution.
  • Installed-package smoke test passes with install scripts disabled. CI builds and tests all six OS/architecture combinations before release.

@janicduplessis

Copy link
Copy Markdown
Contributor Author

Fresh independent safety review completed for 0398667: no actionable code findings. Real sandbox and ordinary identity tests passed; clarified the description to distinguish a proven timestamp mismatch from an unverifiable saved boot ID.

@janicduplessis
janicduplessis marked this pull request as ready for review September 7, 2026 20:32
@janicduplessis
janicduplessis merged commit 6b56ebb into main Sep 7, 2026
14 checks passed
@janicduplessis
janicduplessis deleted the fix/macos-sandbox-boot branch September 7, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

macOS capture fails when sandbox denies boot-session sysctl

1 participant