Repository navigation
feat(desktop): sign, notarize and publish desktop releases (desktop-vX.Y.Z → GitHub Release) - #1580
Conversation
Add release-desktop.yml. A desktop-vX.Y.Z tag (equal to desktop-app/package.json's version) builds the app, signs it by fingerprint with the Eigen Labs Developer ID the CLI uses (SLDQ2GJ6TL, same secrets), notarizes and staples the app and the DMG, verifies the signature, team, bundle ID, version, Gatekeeper assessment, stapled tickets and bundled CLI installer, and publishes the DMG, zip and SHA256SUMS as a GitHub Release that is not marked Latest. A manual run is a dry run that attaches the same artifacts without publishing. Publishing is refused while the latest published CLI lacks `darkbloom desktop`. electron-builder.ts gains a release mode (DARKBLOOM_DESKTOP_RELEASE=1) that requires the notarization credentials and team, forces code signing and notarizes; development and preview builds are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Threat model review — advisoryReviewed head Reviewers: anthropic/claude-sonnet-5.5: first pass completed; anthropic/claude-opus-5.5: not needed by escalation policy; openai/gpt-6.1-sol: selected depth completed (1 batches) MEDIUM: Release signing/notarization secrets are reachable from any ref; tag or dispatch is not tied to a protected branch or environment.github/workflows/release-desktop.yml:17 · new attack surface The workflow runs on any pushed `desktop-v*` tag and on `workflow_dispatch` from any branch. Nothing checks that the tagged commit is reachable from master or that the run uses a protected GitHub Environment with required reviewers. The job imports the shared Eigen Labs Developer ID p12 and Apple notarization credentials, then publishes (tag) or uploads (dispatch) a Developer-ID-signed, notarized app. Anyone able to push a tag or branch can get arbitrary code built, signed and notarized under the vendor identity that also signs the CLI. Dispatch from a modified branch yields a signed artifact even without a release. Fix: bind the secrets to a protected environment, restrict the tag/branch to master (e.g. `git merge-base --is-ancestor $GITHUB_SHA origin/master`), and use tag protection rules. Raised by: anthropic/claude-sonnet-5.5 MEDIUM: `npm ci` runs with an unlocked Developer ID keychain and notarization password in its environment.github/workflows/release-desktop.yml:129 · new attack surface The Developer ID key is imported into an unlocked keychain on the user search list (lines 94-109) before dependencies are installed. The next step then runs `npm ci`, which executes dependency lifecycle scripts, with `APPLE_APP_SPECIFIC_PASSWORD` and `APPLE_ID` in its environment (lines 125-130). A compromised or typosquatted npm package could use `codesign`/`security` to sign arbitrary binaries as team SLDQ2GJ6TL, or read the notarization password. Fix: install dependencies in an earlier step before the cert import and without secrets (`npm ci --ignore-scripts`, running only trusted rebuilds), and expose the Apple credentials only to the packaging and notarize commands. Raised by: anthropic/claude-sonnet-5.5 LOW: Unvalidated coordinator API version string is written to GITHUB_ENV.github/workflows/release-desktop.yml:81 · new attack surface `cli` comes from `curl` on api.darkbloom.dev/v1/releases/latest and is echoed into `$GITHUB_ENV` without validation. This happens unconditionally on the dry-run branch (line 81), and on the success branch only after the `git cat-file` check. A response with an embedded newline could inject arbitrary environment variables (e.g. NODE_OPTIONS, BASH_ENV, PUBLISH, CSC_NAME) into later steps that hold the signing key. This extends CI signing trust to the coordinator's HTTP response. Fix: validate the value against a strict semver regex before using or exporting it. Raised by: anthropic/claude-sonnet-5.5 MEDIUM: Developer ID signing and notarization secrets are reachable from any pushed desktop-v* tag or any-branch workflow_dispatch.github/workflows/release-desktop.yml:17 · new attack surface The workflow runs on any pushed `desktop-v*` tag and on `workflow_dispatch` from any ref (lines 14-17). Nothing in the supplied file requires the commit to be reachable from master, and no protected GitHub Environment with required reviewers is used. The job imports the shared Eigen Labs Developer ID p12 and the Apple notarization credentials (lines 83-117, 124-125). A user who can push a tag or a branch can get arbitrary code built, signed and notarized under the vendor identity that also signs the CLI. Tag runs also publish a GitHub Release. Dispatch runs from a modified branch yield a signed artifact. Fix: bind the secrets to a protected environment, verify that `$GITHUB_SHA` is an ancestor of origin/master, and add tag protection rules. Repository-level protections are outside the supplied evidence. Raised by: anthropic/claude-sonnet-5.5 LOW: `npm ci` lifecycle scripts run while the Developer ID keychain is unlocked and Apple credentials are in the environment.github/workflows/release-desktop.yml:128 · new attack surface The Developer ID key is imported into an unlocked keychain on the user search list (lines 94-108). The next step then runs `npm ci` (line 128) with `APPLE_ID` and `APPLE_APP_SPECIFIC_PASSWORD` in its environment (lines 124-125). A compromised dependency lifecycle script could sign arbitrary binaries as team SLDQ2GJ6TL or read the notarization password. The packaging step must run the same dependency tree with these secrets anyway, so the extra exposure is limited to install-time scripts. Fix: install dependencies in an earlier step, before the cert import and without secrets, using `npm ci --ignore-scripts` plus explicit trusted rebuilds. Expose the Apple credentials only to the packaging and notarize commands. Raised by: anthropic/claude-sonnet-5.5 LOW: Unvalidated CLI version string from the release API is written to GITHUB_ENV.github/workflows/release-desktop.yml:80 · new attack surface `cli` comes from `curl` on api.darkbloom.dev/v1/releases/latest and is written to `$GITHUB_ENV` without validation. This happens on the dry-run branch (line 80) and on the success branch (line 74). If the response were malformed or compromised, a value containing newlines could inject environment variables such as NODE_OPTIONS, BASH_ENV or CSC_NAME into later steps that hold the signing key. The coordinator is trusted in this model, so exploitation needs an upstream compromise. Fix: validate the value against a strict semver regex before using or exporting it. Raised by: anthropic/claude-sonnet-5.5 Models: budgeted Sonnet / selective Opus / selective Sol 6.1. Findings require human validation; this review never requests changes or blocks merging. Scan completed; human review required. Coverage: 26/26 source units; cross-file integration complete. 0 selected depth batch(es) pending. All threat definitions indexed; relevant full definitions selected. Unchanged callers are not scanned. Cost this run: $0.0000 reported, $0.0000 reserved with unknown cost; 0 paid request(s), 0 reused batch(es), 0 provider cache-hit tokens. Saved findings and earlier report · Historical findings are not confirmed resolved. Bedrock: 5 request(s), 134294 uncached + 0 cache-read + 50532 cache-write input / 9883 output tokens; 0 request(s) with unknown usage. OpenRouter backup used 0 time(s). Dollar amounts above cover OpenRouter only; AWS billing is reconciled separately. |
Set ProviderCore.version to 0.10.2 and render the v0.10.2 changelog entry from the 27 fragments added since v0.10.1, ordered by theme behind an upgrade and rollout section: Nemotron 3.5 Super prefix caching (#1586, #1588); GLM-5.3-Flash prefix caching (#1587, #1589, #1590); 4-bit SSD checkpoints and the SSD prefix cache on every model (#1592 (mlx-swift-lm#363), #1584, #1592); Logprobs on Nemotron 3.5 Super and GLM-5.3-Flash (#1564); OpenRouter compatibility: GLM-5.3-Flash and MiMo-V2.6-Flash requests no longer refused (#1585, #1592); Speed: MTP and throughput (#1592 (mlx-swift-lm#360), #1593 (mlx-swift-lm#357), #1595 (mlx-swift-lm#359), #1594, #1595, #1598 (mlx-swift-lm#362), #1594); Provider diagnostics: refusal reasons and load memory (#1592, #1603); MLX stack (#1596); Desktop release workflow (#1580). Apply 12 corrections reviewed against the code. #1580 is already in the v0.10.1 tag but merged after the 0.10.1 preparation, so its fragment is rendered here. Mark v0.10.1 as published on 2026-10-24. Record in the provider release runbook the SDK pin check, the enablement order (darkbloom-platform#464 before any catalog logprobs change, the GLM allowlist tuple, then both models' logprobs after the rollout and Super's tuple after a signed restart check), the platform evidence and the published history. No tag, registration, upload, deployment or enablement is performed.
Set ProviderCore.version to 0.10.2 and render the v0.10.2 changelog entry from the 27 fragments added since v0.10.1, ordered by theme behind an upgrade and rollout section: Nemotron 3.5 Super prefix caching (#1586, #1588); GLM-5.3-Flash prefix caching (#1587, #1589, #1590); 4-bit SSD checkpoints and the SSD prefix cache on every model (#1592 (mlx-swift-lm#363), #1584, #1592); Logprobs on Nemotron 3.5 Super and GLM-5.3-Flash (#1564); OpenRouter compatibility: GLM-5.3-Flash and MiMo-V2.6-Flash requests no longer refused (#1585, #1592); Speed: MTP and throughput (#1592 (mlx-swift-lm#360), #1593 (mlx-swift-lm#357), #1595 (mlx-swift-lm#359), #1594, #1595, #1598 (mlx-swift-lm#362), #1594); Provider diagnostics: refusal reasons and load memory (#1592, #1603); MLX stack (#1596); Desktop release workflow (#1580). Apply 14 corrections reviewed against the code. #1580 is already in the v0.10.1 tag but merged after the 0.10.1 preparation, so its fragment is rendered here. Mark v0.10.1 as published on 2026-10-24. Record in the provider release runbook the SDK pin check, the enablement order (darkbloom-platform#464 before any catalog logprobs change, the GLM allowlist tuple, then both models' logprobs after the rollout and Super's tuple after a signed restart check), the platform evidence and the published history. No tag, registration, upload, deployment or enablement is performed.
Set ProviderCore.version to 0.10.2 and render the v0.10.2 changelog entry from the 20 fragments added since v0.10.1, ordered by theme behind an upgrade and rollout section: Nemotron 3.5 Super prefix caching (#1586, #1588); GLM-5.3-Flash prefix caching (#1587, #1589, #1590); 4-bit SSD checkpoints and the SSD prefix cache on every model (#1592 (mlx-swift-lm#363), #1584, #1592); Logprobs on Nemotron 3.5 Super and GLM-5.3-Flash (#1564); GLM-5.3-Flash OpenRouter request controls (#1585, #1592); Speed: MTP and throughput (#1592 (mlx-swift-lm#360), #1593 (mlx- swift-lm#357), #1595 (mlx-swift-lm#359), #1594, #1595, #1598 (mlx-swift- lm#362), #1594); Provider diagnostics (#1592); MLX stack (#1596); Desktop release workflow (#1580). Apply 12 corrections reviewed against the code. #1580 is already in the v0.10.1 tag but merged after the 0.10.1 preparation, so its fragment is rendered here. Mark v0.10.1 as published on 2026-10-24. Record in the provider release runbook the SDK pin check, the enablement order (darkbloom-platform#464 before any catalog logprobs change, the GLM allowlist tuple, then both models' logprobs after the rollout and Super's tuple after a signed restart check), the platform evidence and the published history. No tag, registration, upload, deployment or enablement is performed. Co-authored-by: Jonathan Spangler <5055076+jonathan308@users.noreply.github.com>
Summary
The desktop app merged in #1518, but nothing builds or publishes it:
desktop.ymlonly lints, tests and builds (plus an unsigned review DMG on manual dispatch), and GitHub Releases only carries the CLI bundle. So there's no DMG anyone can download.This adds a release pipeline with the agreed defaults:
SLDQ2GJ6TL). It reuses the CLI release's secrets (APPLE_CERTIFICATE_P12,APPLE_CERTIFICATE_PASSWORD,APPLE_ID,APPLE_APP_PASSWORD), so no new secrets are needed.desktop-vX.Y.Z=desktop-app/package.jsonversion (now0.1.0).desktop-vX.Y.ZwithDarkbloom-X.Y.Z-arm64.dmg, the.zipandSHA256SUMS, not marked Latest, so CLI releases keep that slot.Before / After
flowchart LR subgraph Before["Before"] direction TB B1(["#1518 merged"]):::user --> B2["desktop.yml: lint, test, build<br/>(unsigned review DMG on dispatch)"]:::code B2 --> B3(["No signed DMG, nowhere to download"]):::bad end subgraph After["After"] direction TB A1(["push tag desktop-v0.1.0"]):::user --> A2["release-desktop.yml: sign (SLDQ2GJ6TL),<br/>notarize + staple app & DMG, verify"]:::fix A2 --> A3(["GitHub Release desktop-v0.1.0:<br/>DMG · zip · SHA256SUMS"]):::good A4(["Run workflow (manual)"]):::user --> A5(["Same build as a run artifact,<br/>nothing published"]):::good end classDef user fill:#1f2937,stroke:#93c5fd,color:#f9fafb classDef code fill:#312e81,stroke:#a5b4fc,color:#eef2ff classDef bad fill:#7f1d1d,stroke:#fca5a5,color:#fef2f2 classDef fix fill:#065f46,stroke:#6ee7b7,color:#ecfdf5 classDef good fill:#14532d,stroke:#86efac,color:#f0fdf4Legend: blue = user action, indigo = unchanged code path, red = defect, green = changed code / fixed outcome.
Changes
.github/workflows/release-desktop.yml(new)api.darkbloom.dev/v1/releases/latestthe app's bundled installer uses. It refuses to publish if that CLI's tag has nodarkbloom desktopcommand; otherwise new users would be stuck at Install CLI. A dry run only warns.release-provider.ymldoes, and picks the Developer ID Application identity forSLDQ2GJ6TLby fingerprint.npm run distwithDARKBLOOM_DESKTOP_RELEASE=1. Electron-builder signs with the hardened runtime, then notarizes and staples the app.notarytool submit --wait, failing with Apple's log) and staples it.codesign --verify --deep --strict, the team ID,CFBundleIdentifier(io.darkbloom.desktop) and the version;spctlreports Notarized Developer ID, andstapler validatepasses for the app and the DMG;spctlassesses the DMG andhdiutil verifypasses;gh release create … --verify-tag --latest=falsewith install notes.desktop-app/electron-builder.tsAPPLE_ID,APPLE_APP_SPECIFIC_PASSWORDandAPPLE_TEAM_ID=SLDQ2GJ6TL, refuses to also be a preview, forces code signing, setsnotarize, and signs by fingerprint (the samesignAsyncpath the preview uses).desktop-app/tests/releaseBuildConfig.test.ts(new): release mode signs and notarizes forSLDQ2GJ6TL; it refuses missing credentials, another team or a preview; dev and preview stay un-notarized.docs/operations/desktop-release.md(new runbook: prerequisites, dry run, tag, verification, rollback),docs/operations/README.mdanddocs/developer/desktop-app.md(Release qualification links it). Alsochangelog.d/desktop-release-pipeline.md.Validation
make docs-checkreports 3 broken links, all into thelibs/submodules (not checked out here, unrelated).Not yet exercised end to end: the workflow can only be dispatched once it's on
master. After merge, run it manually (dry run) before tagging.Release sequence
darkbloom desktop; its release run is in progress). The gate checks this.git tag desktop-v0.1.0 <master commit> && git push origin desktop-v0.1.0. The download URL is thenhttps://github.com/Layr-Labs/d-inference/releases/download/desktop-v0.1.0/Darkbloom-0.1.0-arm64.dmg.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.