diff --git a/.github/workflows/release-macos.yml b/.github/workflows/release-macos.yml index 7071502e..c7dfee91 100644 --- a/.github/workflows/release-macos.yml +++ b/.github/workflows/release-macos.yml @@ -93,6 +93,19 @@ jobs: bash scripts/build-app.sh --sign fi + # Gatekeeper gate: after build-app.sh signs + notarizes, prove the shipped + # .app is codesign-valid (--deep --strict), Gatekeeper-accepted (spctl + # --assess), and carries a stapled notarization ticket. An app that built but + # didn't notarize launches to a Gatekeeper block on every user's Mac, so that + # must fail the release here. --require-signed exits non-zero unless all hold. + # NOTE: like the rest of this workflow, this mac path is unverified locally + # (no Mac on hand); first exercise it via workflow_dispatch publish=false. + - name: Verify the shipped app is signed + notarized + shell: bash + run: | + set -euo pipefail + node scripts/ci/verify-signature.js --require-signed + - name: Upload artifact (non-publish runs) if: github.event_name == 'workflow_dispatch' && github.event.inputs.publish != 'true' uses: actions/upload-artifact@v4 diff --git a/.github/workflows/release-windows.yml b/.github/workflows/release-windows.yml index dcf0e627..9a326aaa 100644 --- a/.github/workflows/release-windows.yml +++ b/.github/workflows/release-windows.yml @@ -132,6 +132,19 @@ jobs: } if ($LASTEXITCODE -ne 0) { throw "build-app-win.ps1 failed ($LASTEXITCODE)" } + # SmartScreen gate: after electron-builder + the Azure sign hook run, prove + # the bits we are about to ship are ACTUALLY Authenticode-Valid. An unsigned + # installer trips SmartScreen on every user's first launch, so a release that + # silently didn't sign (missing secrets, hook skip) must fail here, not ship. + # verify-signature.js --require-signed exits non-zero unless Status == Valid. + - name: Verify the shipped artifact is signed + shell: pwsh + run: | + node scripts/ci/verify-signature.js --require-signed --target electron/dist/win-unpacked/OpenSwarm.exe + if ($LASTEXITCODE -ne 0) { throw "inner OpenSwarm.exe is not validly signed" } + node scripts/ci/verify-signature.js --require-signed --target electron/dist/OpenSwarm-Setup-x64.exe + if ($LASTEXITCODE -ne 0) { throw "OpenSwarm-Setup-x64.exe (installer) is not validly signed" } + - name: Upload artifact (non-publish runs) if: github.event_name == 'workflow_dispatch' && github.event.inputs.publish != 'true' uses: actions/upload-artifact@v4