Skip to content

Latest commit

Β 

History

History
52 lines (39 loc) Β· 2.26 KB

File metadata and controls

52 lines (39 loc) Β· 2.26 KB

Platforms

firstrun's static preview runs on every platform Go supports. The live syscall trace is implemented with ptrace and currently targets linux/amd64; everywhere else, firstrun automatically uses the static preview.

Platform Static preview Live syscall trace
Linux / amd64 βœ… βœ…
Linux / arm64 βœ… β›” (falls back to static)
macOS (Intel / Apple Silicon) βœ… β›” (falls back to static)
Windows βœ… β›” (falls back to static)

Run firstrun doctor to see exactly what's available on your machine, including a quick self-test of the tracer.

Linux / amd64 β€” the live tracer

Privileges

firstrun traces a child it launches itself, so it works as an unprivileged user. On systems with the Yama LSM (/proc/sys/kernel/yama/ptrace_scope = 1, the common default) tracing your own direct children is still allowed, so no extra setup is needed.

seccomp sandboxes

If firstrun itself runs inside a seccomp-filtered sandbox (some CI runners and container setups), the tracer still works: it neutralizes syscalls by redirecting them to a harmless getuid rather than to an invalid syscall number, so it never trips a filter's SIGSYS. See docs/how-it-works.md.

Containers

Tracing inside a container needs CAP_SYS_PTRACE, which Docker drops by default. Add --cap-add=SYS_PTRACE (or --privileged) if you want the live preview inside a container. Without it, firstrun falls back to the static preview.

Why not the other platforms (yet)?

  • linux/arm64 β€” the engine is the same; only the register/argument decoding is architecture-specific. This is the most tractable port and a great first contribution (see CONTRIBUTING.md).
  • macOS β€” ptrace is heavily restricted; a real backend would use DTrace or the Endpoint Security framework. Under exploration.
  • Windows β€” would use the debug API plus a filesystem/registry filter. Not yet started.

In all of these cases the static preview is fully functional today β€” you still get the plain-English explanation, the predicted effects, and the risk flags. You just don't get the syscall-level confirmation that the live trace provides.