Skip to content

feat(app): attach a signed Ovis.dmg to every release and link it from ovis.sh - #1834

Merged
devswha merged 1 commit into
mainfrom
feat/mac-dmg-release
Oct 24, 2026
Merged

devswha merged 1 commit into
mainfrom
feat/mac-dmg-release

Conversation

@devswha

@devswha devswha commented Oct 24, 2026

Copy link
Copy Markdown
Owner

What it does for the user

Anyone can download Ovis for Mac (app/mac, the one-click setup app) from https://ovis.sh and open it without a Gatekeeper warning, and every release keeps that download current with no hand work.

  • New workflow .github/workflows/mac-dmg.yml (Mac app). On a GitHub-hosted macos-latest runner it checks out the release tag, imports the Developer ID Application identity from secrets into a temporary keychain, runs app/mac/build.sh (version from the tag), notarizes and staples the DMG, and uploads Ovis.dmg to the release (--clobber). The keychain and the keys are removed in an always() step.
    • release.yml calls it after publish (workflow_call, secrets: inherit), since a release created with GITHUB_TOKEN fires no release event.
    • workflow_dispatch with a tag input gives an existing release (for example v0.4.13) its DMG.
    • A gate job checks the ref is main, the tag shape and that the release is published. When any of the five secrets is missing, it ends with a ::notice:: naming them and exits 0, so the release does not fail. The gate only receives set/unset flags, never the secret values.
  • No broken download link mid-release. release.yml now publishes with --latest=false. The Mac job marks the release latest once Ovis.dmg is attached, and only when its tag is the newest v* tag, so a by-hand run for an older tag never takes "latest" back. Nothing else in the repo reads releases/latest (checked with grep). If the Mac job skips or fails, the previous release stays latest until the workflow is run for the new tag.
  • ovis.sh. _redirects adds /Ovis.dmg → https://github.com/devswha/ovis/releases/latest/download/Ovis.dmg (302).
    • The hero and closing "Download for Mac" buttons are real links to it.
    • The Mac copy no longer says coming soon: the note under the buttons, the closing box, the Desktop app card and its tag, and the FAQ answer, with its JSON-LD copy kept equal. zh/ja/ko entries are updated.
    • iPhone and Android stay "coming soon". platform.js turns the button back into a "Coming soon" note for iPhone and Android visitors, so a phone never gets a dmg link.
  • Docs. app/mac/README.md has a new Releases section covering the flow and the secrets, docs/development.md gets a short note in Releasing, and there is a changelog fragment.

Secrets (set by the maintainer, Settings → Secrets and variables → Actions)

Secret Holds
MAC_DEVELOPER_ID_P12 Developer ID Application certificate and private key as .p12, base64
MAC_DEVELOPER_ID_P12_PASSWORD Its export password
MAC_NOTARY_KEY_P8 App Store Connect API key .p8, base64
MAC_NOTARY_KEY_ID That key's ID
MAC_NOTARY_ISSUER Its issuer ID

How it was verified

  • Lint and tests: actionlint 1.7.12 (Docker) is clean on mac-dmg.yml and release.yml. bun test scripts/ovis-site.test.ts scripts/ovis-site-platform.test.ts scripts/changelog-fold.test.ts scripts/pages-gate.test.ts: 83 pass. bun run check fast also passes.
  • The gate script, run locally:
    • With no secrets it prints ::notice title=Ovis.dmg skipped::…, exits 0 and outputs ready=false.
    • A ref other than main, a malformed tag or a tag with no release exits 1.
    • With every secret set and v0.4.13, it outputs ready=true.
  • Keychain, build and cleanup steps, run over SSH on the maintainer's test Mac (eamac) with a self-signed stand-in "Developer ID Application" .p12 (only the test copy dropped -v from find-identity, because the stand-in is untrusted):
    • The temporary keychain imported the identity, and build.sh signed the app (hardened runtime, timestamp) and the DMG with it.
    • The version came from the tag (0.0.1).
    • The cleanup step deleted the keychain and keys, and the user keychain search list came back as before.
    • This found and fixed a sed bug: find-identity appends a trust suffix after the quoted name.
    • Real notarization needs Apple's credentials, so it was not run here. build.sh already does it with the same environment variables.
  • The site, served locally and driven headless with Mac and iPhone user agents at 1440×900 and 390×844:
    • On a Mac both buttons are <a class="dl-primary" href="https://ovis.sh/Ovis.dmg">, and App Store and Google Play still say coming soon.
    • On an iPhone the primary button is a "Coming soon" note with no link.
    • ?lang=ko is translated, and the layout is unchanged at both widths.
  • Reviews: the omo-native-code-reviewer agent approved with no HIGH, and Codex (gpt-6-astra) found nothing.
    • The reviewer's MEDIUM, the link 404ing during the build window, is fixed by the deferred "latest" above.
    • Its LOW about the gate receiving secret values is fixed with the set/unset flags.

Needs a real review

This changes the release workflow and handles signing secrets, so it needs a real review, not only checks. It touches no server/, src/ or shared/ code.

… ovis.sh

A new Mac app workflow builds app/mac on a GitHub-hosted Mac, signs it with the
Developer ID from repository secrets in a temporary keychain, notarizes and
staples it, and attaches Ovis.dmg to the release. Release calls it after
publishing, and it can be run by hand for an existing tag. Without the secrets
it skips with a notice. Release now publishes without marking the release
latest; the Mac job marks it latest once the DMG is attached, so
ovis.sh/Ovis.dmg (redirecting to releases/latest/download/Ovis.dmg) never lands
on a release without one.

ovis.sh's Mac button becomes that download link; iPhone and Android stay
coming soon.
@coderabbitai

coderabbitai Bot commented Oct 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 5 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 055e820 and 685b550.

Files selected for processing: 8
  • .github/workflows/mac-dmg.yml
  • .github/workflows/release.yml
  • app/mac/README.md
  • changelog.d/mac-dmg-download.md
  • docs/development.md
  • ovis-site/_redirects
  • ovis-site/assets/platform.js
  • ovis-site/index.html
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying ovis with  Cloudflare Pages  Cloudflare Pages

Latest commit: 685b550
Status: ✅  Deploy successful!
Preview URL: https://0d528185.ovis.pages.dev
Branch Preview URL: https://feat-mac-dmg-release.ovis.pages.dev

View logs

@devswha

devswha commented Oct 24, 2026

Copy link
Copy Markdown
Owner Author

Checked on the Cloudflare preview of this head (685b550):

  • curl -sI https://feat-mac-dmg-release.ovis.pages.dev/Ovis.dmg → HTTP/2 302, location: https://github.com/devswha/ovis/releases/latest/download/Ovis.dmg; following it ends in 200 on the release asset (v0.4.13 already has Ovis.dmg).
  • Both Download for Mac buttons on the preview page are <a class="dl-primary" href="https://ovis.sh/Ovis.dmg">.

CodeRabbit hit its review limit on this PR, so no CodeRabbit review has run yet.

@devswha

devswha commented Oct 24, 2026

Copy link
Copy Markdown
Owner Author

Merge pass review-work report. Overall: PASSED. This PR changes workflows and CodeRabbit was rate-limited, so per AGENTS.md this comment records the independent review, its findings and how each was resolved.

Lane Verdict Confidence
Manual QA (6 rows, artifacts kept) PASS -
Code review (omo-native-code-reviewer, programming and remove-ai-slops) PASS -
Gate review (another model) technically acceptable. Its only blocker was that this review record had to be on the PR, which this comment provides HIGH

Merging runs nothing.

  • mac-dmg.yml triggers only on workflow_call and workflow_dispatch.
  • No release, tag, workflow run or secret was touched by this review or by the merge.

Verified.

  • 93 site, platform, changelog-fold and pages-gate tests pass, and so does the typecheck.
  • actionlint 1.7.12 is clean on both workflows.
  • v0.4.13, the current latest release, already carries Ovis.dmg. ovis.sh/Ovis.dmg follows releases/latest/download/Ovis.dmg, which ends in HTTP 200.
  • Browser probes on the preview:
    • Mac visitors get the link.
    • iPhone and Android get "Coming soon".
    • No-JS and ChromeOS visitors get the Mac link.
  • Secrets reach the scripts only through env.
    • Nothing runs set -x.
    • Step outputs are only the keychain path and the public identity name.
    • The self-hosted gate job sees only set/unset booleans.
  • Permissions are least-privilege, and there's no pull_request trigger.
  • inputs.tag reaches scripts only through env. Before it's validated, it's used only as the concurrency group name.
  • --latest=false breaks no update path. install.sh, install.ps1, server/updater.ts and the remote bundles all use explicit tags, and the Pages gate doesn't depend on "latest".
  • app/mac/build.sh reads exactly the variables the workflow sets.

Findings and how each was resolved. None blocks; all are left as follow-ups.

  • M-1: the signing job has never run. v0.4.13's dmg was attached by hand.
    • The intermediate certificate is imported unconditionally (mac-dmg.yml:87). If the .p12 already includes it, the import may fail with "item already exists".
    • If the job fails, the release stays published and the previous dmg stays latest, so nothing breaks for users.
    • Recommendation: once the secrets are set, run the Mac app workflow by hand for v0.4.13 before the next release, so the first real signing run isn't a release.
  • M-2: the keychain can outlive a failed import. The keychain path is written to the step output last, so a failure partway through the import skips delete-keychain. The impact is low, because the hosted runner is thrown away after the job.
  • M-3: the main-only check lives inside the workflow. A writer could run a modified copy of the workflow from another branch, and repository secrets would be available to it. Today the only collaborator is the owner, so no lower-trust path exists. Hardening: put the five signing secrets in a GitHub Environment limited to main.
  • LOW findings:
    • The newest-tag check would rank a -rc tag first. No such tags exist today.
    • The tag fetch is unauthenticated, which works while the repo is public.
    • The README release badges lag until a dmg is attached.
    • stapler validate runs twice.
    • A comment says "in case the .p12 lacks it" next to an unconditional import.

Not verified: real notarization and a quarantined launch of a CI-built dmg.

Merge order: this PR shares docs/development.md with #1824, which is held for a docs fix. git merge-tree is clean, so per the maintainer's rule it doesn't wait.

All required checks are green and no review thread is open.

CodeRabbit did not review this PR (rate-limited or skipped). The reviews above stand in for it.

@devswha
devswha merged commit e68716c into main Oct 24, 2026
10 checks passed
@devswha
devswha deleted the feat/mac-dmg-release branch October 24, 2026 11:33
devswha pushed a commit that referenced this pull request Oct 24, 2026
.github/workflows/mac-dmg.yml (#1834) arrived after the pins with
actions/checkout@v7; it now uses the same v7.0.1 commit SHA as every other
checkout. It already kept no Git credential, and its tag fetch reads the
public repository anonymously.

The release publish fixture expects the --latest=false that #1834 added to
gh release create.
devswha pushed a commit that referenced this pull request Oct 24, 2026
.github/workflows/mac-dmg.yml (#1834) arrived after the pins with
actions/checkout@v7; it now uses the same v7.0.1 commit SHA as every other
checkout. It already kept no Git credential, and its tag fetch reads the
public repository anonymously.

The release publish fixture expects the --latest=false that #1834 added to
gh release create.
devswha added a commit that referenced this pull request Oct 25, 2026
… action updates (#1847)

## What this does
Hardens the supply chain of every workflow without changing what any job
does.

- **Pins every external action to a commit SHA.** All 9 external actions
used in `.github/workflows/*.yml` and
`.github/actions/setup-ci/action.yml` now use the full commit SHA their
current tag points to, with the exact release in a `# vX.Y.Z` comment.
No major version changes. A moved or compromised tag can no longer
change what CI runs. Each pin was checked against `gh api
repos/<action>/commits/<tag>`. That includes what main added since this
branch was cut: #1743's self-hosted runner work changed no workflow
files, and the new Mac app workflow (`mac-dmg.yml`, #1834) gets the same
pinned checkout. The pin test failed on it until it did, so the next new
workflow is caught the same way.
- **`persist-credentials: false` on every `actions/checkout`.** No later
step needs the checkout's token: the repository is public, so the
release and Release guards fetches read it anonymously, and `gh release
create` authenticates with `GH_TOKEN`. Nothing in CI runs `git push`.
- **Dependabot also scans the setup-ci composite action** (`directories:
["/", "/.github/actions/setup-ci"]`): `/` only covers
`.github/workflows`, so those pins would never have been updated.
- **Dependabot waits 7 days before taking a new action release**
(`cooldown.default-days: 7`; [GitHub's default is
3](https://docs.github.com/en/code-security/dependabot/working-with-dependabot/dependabot-options-reference)).
Security updates are never delayed. `dependabot.yml` says how to take an
urgent fix by hand.

## Why
A tag-pinned action runs whatever the tag points to today, and a
checkout that keeps its token leaves it in `.git/config` for every later
step. Both are the usual ways a compromised action spreads.

## How it was verified
- `scripts/ci-setup.test.ts` parses every workflow and the composite
action, and rejects a floating ref, a missing version comment, a
non-local reusable workflow or a checkout that keeps its credential,
naming the step. Dropping one `persist-credentials: false` fails it, and
so did the unpinned `mac-dmg.yml` checkout until it was pinned.
- `bun test ./scripts/ci-setup.test.ts ./scripts/ci-runner-route.test.ts
./scripts/ci-browser.test.ts ./scripts/pages-gate.test.ts`: 82 pass.
`bun run check fast` passes (pinned actionlint).
- Code review (omo-native-code-reviewer): APPROVE, no HIGH. It confirmed
anonymous fetches against real GitHub and the validity of `directories`
+ `groups` + `cooldown`. The merge pass's test findings were fixed by
deleting the tests that could not fail; see the PR comments.

## Review
**This changes workflows and checkout credentials: it needs a real
review before merging.** If the repository ever becomes private, the
anonymous fetches in `release.yml` and the Release guards step will need
a token again.

---------

Co-authored-by: mp <mp@local>
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