Skip to content

feat(arm64) natively arm64 build on macos#1171

Open
smoy wants to merge 1 commit into
ossf:mainfrom
smoy:feat-arm64-support
Open

feat(arm64) natively arm64 build on macos#1171
smoy wants to merge 1 commit into
ossf:mainfrom
smoy:feat-arm64-support

Conversation

@smoy

@smoy smoy commented Jun 25, 2026

Copy link
Copy Markdown

Done — it works natively on Apple Silicon

Your premise turned out to be the key insight, just one level up from binaries: the blocker was never the Go binary, it was the amd64 images emulated on an arm64 VM breaking gVisor.
Building the images natively for linux/arm64 fixes it completely. I verified the full pipeline on your machine.

What I changed (3 small code changes, all no-ops on amd64):

  • sandboxes/dynamicanalysis/Dockerfile — AWS CLI URL is now arch-aware ($(uname -m)); PowerShell installs from the official arm64 tarball on arm64 (Microsoft's apt repo is amd64-only and broke the dependency solver).
  • cmd/analyze/main.go — fixed a real bug: -offline dynamic analysis skipped bridge creation, so packet capture failed before any phase ran. The bridge is now always created for dynamic analysis (sandbox still runs --network=none when offline).

What I added:

  • scripts/load_sandbox_images_macos.sh — handles the one fiddly macOS step (loading locally-built sandbox images into a Docker named-volume podman store, since the Linux make sync path and virtiofs-overlay don't work here). Lints clean and tested from scratch.
  • Rewrote docs/local-analysis.md — replaced the (now-wrong) "not supported on Apple Silicon" section with the verified native-build procedure.

  Done — it works natively on Apple Silicon

  Your premise turned out to be the key insight, just one level up from binaries: the blocker was never the Go binary, it was the amd64 images emulated on an arm64 VM breaking gVisor.
  Building the images natively for linux/arm64 fixes it completely. I verified the full pipeline on your machine.

  What I changed (3 small code changes, all no-ops on amd64):
  - sandboxes/dynamicanalysis/Dockerfile — AWS CLI URL is now arch-aware ($(uname -m)); PowerShell installs from the official arm64 tarball on arm64 (Microsoft's apt repo is amd64-only
  and broke the dependency solver).
  - cmd/analyze/main.go — fixed a real bug: -offline dynamic analysis skipped bridge creation, so packet capture failed before any phase ran. The bridge is now always created for
  dynamic analysis (sandbox still runs --network=none when offline).

  What I added:
  - scripts/load_sandbox_images_macos.sh — handles the one fiddly macOS step (loading locally-built sandbox images into a Docker named-volume podman store, since the Linux make sync
  path and virtiofs-overlay don't work here). Lints clean and tested from scratch.
  - Rewrote docs/local-analysis.md — replaced the (now-wrong) "not supported on Apple Silicon" section with the verified native-build procedure.

Signed-off-by: Steven Moy <github@stevenmoy.com>
@smoy smoy force-pushed the feat-arm64-support branch from 25af386 to 0bc15ba Compare June 25, 2026 00:09
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.

1 participant