You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Inspect owned macOS processes when sandbox blocks ps #477
On macOS, a sandbox that refuses execution of setuid tools can prevent Stim from inspecting its own collector processes. Cleanup safely refuses to signal an unverified collector, but cannot finish even when the collector belongs to the workspace.
Evidence
src/process-args.ts reads commands and start times through ps. A synthetic child-process probe under a macOS sandbox returns no command/start identity when /bin/ps cannot execute. A read-only native probe using proc_pidinfo(PROC_PIDTBSDINFO) and sysctl(KERN_PROCARGS2) can inspect the same child under that policy.
Cause
Process ownership currently depends on executing ps, rather than using the non-privileged native process APIs available to a same-user process. collector/ownership.ts correctly treats failed inspection as unverified.
Fix idea
Add a bounded macOS native inspection path with exact argument boundaries and stable start-time validation. Preserve fail-closed ownership, PID-reuse checks, and existing behavior on other platforms. Verify live, exited, zombie, denied, malformed, and changed-identity cases, plus real sandboxed collector cleanup. Package the helper reproducibly without requiring a global installation or weakening the sandbox.
User-directed replacement for PR #478: persist exact unique-pid identities for Stim-launched supervisors, collectors, and managed tunnels. Do not reconstruct ownership from argv. Leave externally started Metro processes alone, including legacy live records without verifiable identity. Keep device-side adb shell ps. Claimed: fix/persisted-process-477
Activity
janicduplessis commentedon Sep 7, 2026
Claimed: fix/macos-process-inspection-477
janicduplessis commentedon Sep 7, 2026
User-directed replacement for PR #478: persist exact unique-pid identities for Stim-launched supervisors, collectors, and managed tunnels. Do not reconstruct ownership from argv. Leave externally started Metro processes alone, including legacy live records without verifiable identity. Keep device-side adb shell ps. Claimed: fix/persisted-process-477