Clear the quarantine flag from the cask, for builds that need it - #8
Merged
Conversation
install.sh stripped the quarantine attribute, so anyone following the documented path was fine and anyone running `brew install --cask` directly was not. They got the dialog that offers Move to Trash or Done — and Move to Trash deletes the app, which is how the first install on this machine lost its bundle. Homebrew 6 removed --no-quarantine, so there is no flag to pass and it has to come off afterwards. postflight is where the cask can do that. Guarded on the signature rather than done unconditionally. Once a release is signed with a Developer ID and notarized, macOS has no objection and stripping quarantine would be discarding a real check for nothing — so this heals the unsigned builds and turns itself into a no-op the moment there is an identity. It says out loud what it is doing and why, because a cask silently weakening Gatekeeper is not something anyone should have to read the source to discover. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
install.shstripped the quarantine attribute, so anyone following the documented path was fine — and anyone runningbrew install --cask rolemodel/tap/rolemodel-openscreendirectly was not.They get the dialog offering Move to Trash or Done, and Move to Trash genuinely deletes the app. That's how the first install on this machine lost its bundle entirely:
/Applicationsempty, Caskroom holding a broken symlink.Homebrew 6 removed
--no-quarantine, so there's no flag to pass — it has to come off after the fact, andpostflightis where a cask can do that.Guarded, not unconditional
Once a release is signed with a Developer ID and notarized, macOS has no objection, and stripping quarantine would be discarding a real check for nothing. So this heals the unsigned builds and becomes a no-op the moment there's an identity — no follow-up change needed when the certificate lands.
It also
opoos what it's doing and why. A cask that silently weakens Gatekeeper isn't something anyone should have to read the source to discover.Related
Paired with RoleModel/openscreen#4, which stops ad-hoc builds carrying hardened runtime — the reason the app exited before drawing a window even once quarantine was cleared. Quarantine was necessary but not sufficient; both were needed.
lib/verify.mjs— 698 passed, 0 failed.🤖 Generated with Claude Code