Repository navigation
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This was referenced Nov 23, 2026
This branch has not been deployed
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.
Summary
The Release workflow signs, notarizes and publishes to the auto-update feed for any pushed
v*tag and any manual dispatch from any branch, and every signing secret is a repo-level secret that any workflow on any branch can read. This moves the signing work behind a protectedreleaseenvironment and refuses to sign anything that is not already onmain.guardjob (ubuntu, no secrets) runs first. It fails unless a manual dispatch comes fromrefs/heads/mainandgit merge-base --is-ancestor "$GITHUB_SHA" origin/mainholds (checkout usesfetch-depth: 0). Because it runs before any environment job, a bad ref fails before anyone is asked to approve. It guards against mistakes only: a tag at an unreviewed commit runs that commit's copy of the workflow. The environment and tag ruleset below are the actual boundary.buildandnotarizenow run inenvironment: release.generate_appcast.py, signature check) moves frompublishintonotarize, gated onpublish == 'true'. It hands the signed appcast topublishas acotabby-appcastartifact. Why:publishhas to stay ingithub-pagesfordeploy-pages, and a job has only one environment. Without the move, the Sparkle key would sit in an environment with no reviewers, or need a third approval per release.notarizealready holds the final stapled DMG the signature covers.publishnow reads no signing secret, onlyGITHUB_TOKEN.gh release createpasses--target "$GITHUB_SHA", so a tag created by a dispatch run points at the built commit, not at whatevermainis when publish runs.RELEASING.mddescribes the new gate.Validation
actionlint .github/workflows/release.yml: no new findings. The only two reported are the shellcheck notes already onmain(SC2129 in the metadata step, SC2046 in the certificate import step), which this PR doesn't touch.SPARKLE_KEY_FILEviaGITHUB_ENV,steps.sparkle-tools, andneeds.build.outputs.*fromnotarize.release-artifactsstill containsappcast.xml, sorepublish-pages.ymlkeeps working.publish: falsedispatch frommainafter merging. A dry run skips the appcast steps, so the moved signing steps first run on the next real publish.Linked issues
None filed. Addresses H1 from a static security review of
8cdbea2.Risk / rollout notes
Merging first does not break releases. Until a
releaseenvironment exists, GitHub creates it unprotected the first time a job references it, and repo-level secrets keep resolving. The protection only takes effect once these settings are applied:releaseenvironment (Settings → Environments → New environment →release):mainand tagv*.releaseenvironment secrets, using the same values:DEVELOPER_ID_APPLICATION_CERT,DEVELOPER_ID_CERT_PASSWORD,APPLE_TEAM_ID,APPLE_ID,APPLE_APP_SPECIFIC_PASSWORD,SPARKLE_ED25519_PRIVATE_KEY.publish: falsedispatch frommainto confirm build and notarize pick up the environment secrets.v*, enable "Restrict creations", "Restrict updates" and "Restrict deletions", and put only the maintainer/admin role on the bypass list. Without it, anyone with write access can create av*tag, and that tag satisfies the environment'sv*deployment rule.Behavior changes:
buildstarts and one whennotarizestarts. Dry runs also need both.main, and tags on commits not onmain, now fail inguard.notarizealso re-submits notarization. Before, only the cheappublishjob re-ran.Follow-ups, not done here:
HOMEBREW_TAP_TOKEN(used byupdate-homebrew-cask) is still repo-level. It can rewrite the tap's cask, so consider moving it into an environment too.SPARKLE_ED25519_PRIVATE_KEYfor its public-key match check. A separate PR removes it from the build job.🤖 Generated with Claude Code