Skip to content

fix(macos): clear ALL xattrs on install (provenance, not just quarantine)#24

Merged
NJannasch merged 1 commit into
mainfrom
fix/macos-provenance-xattr
May 9, 2026
Merged

fix(macos): clear ALL xattrs on install (provenance, not just quarantine)#24
NJannasch merged 1 commit into
mainfrom
fix/macos-provenance-xattr

Conversation

@NJannasch

Copy link
Copy Markdown
Owner

Summary

The previous Gatekeeper workaround in `install.sh` only stripped `com.apple.quarantine`. macOS sometimes also attaches `com.apple.provenance` during a curl download, which SIGKILLs the binary on first launch — even after quarantine is gone. That's what users see when `curl … | bash` reaches the trailing `"$dest" --install --yes` and dies.

```
==> Updating VibeCockpit unknown → v0.15.0
==> Installed v0.15.0 to /Users/jannasch/.local/bin/vibecockpit
bash: line 55: 5134 Killed: 9 "$dest" --install --yes
```

The fix is one line in two places: switch from `xattr -d com.apple.quarantine` to `xattr -c` (clear all xattrs).

Why no `codesign`

The Go toolchain already ad-hoc signs the binary at build time, so we don't need to invoke `codesign` ourselves. Avoiding it keeps the install path tooling-free.

Test plan

  • CI green
  • On macOS: re-run `curl -fsSL …/install.sh | bash` after merge — `--install --yes` should not SIGKILL anymore

…ine)

The previous fix stripped only com.apple.quarantine. macOS sometimes
also attaches com.apple.provenance during a curl download, which
SIGKILLs the binary on first launch — even after quarantine is gone.
That's the SIGKILL users see on `curl … | bash` when the script reaches
`"$dest" --install --yes`.

- install.sh: replace `xattr -d com.apple.quarantine` with `xattr -c`
  to clear every extended attribute the OS attached during download.
- internal/install/install.go: same fix for the .app bundle path
  (`xattr -dr com.apple.quarantine` → `xattr -cr`).

The Go toolchain already ad-hoc signs the binary at build time, so we
don't need to invoke `codesign` ourselves — that would add a tooling
dependency the install path shouldn't rely on.
@NJannasch NJannasch merged commit b233265 into main May 9, 2026
1 check passed
@NJannasch NJannasch deleted the fix/macos-provenance-xattr branch May 9, 2026 20:54
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