Skip to content

Move Windows launcher signing to SignPath (supersedes #70) - #73

Merged
vadi2 merged 9 commits into
developmentfrom
ccr-59402c3b-4a6v01
Nov 14, 2026
Merged

vadi2 merged 9 commits into
developmentfrom
ccr-59402c3b-4a6v01

Conversation

@vadi2

@vadi2 vadi2 commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Supersedes #70. This keeps @jmckisson's commit unchanged and rebases it onto development now that #71 is merged. The commits after it fix the problems from the review on #70, plus what three further review rounds on this PR found.

Fixes on top of #70

  1. Sign all 44 launchers. SignPath wildcards match exactly one file unless max-matches says otherwise (docs). The artifact configuration now uses max-matches="unbounded".
  2. Signed launchers land in a fresh directory. The action extracts over its output directory without clearing it. With the staging directory as output, the unsigned copies already there satisfied deploy-win.sh's "is it there?" check. It now extracts into signed-launchers/, which prepare-signing-win.sh removes beforehand.
  3. Every signature is verified. A new step runs Get-AuthenticodeSignature on each launcher that went in. It fails the job if one is missing or its status isn't Valid, rather than trusting the signing request's success.
  4. Missing secrets fail the build. Signing no longer turns itself off when SIGNPATH_API_TOKEN is empty. A build that should be signed fails if either SignPath secret is missing, as the Azure login step did, instead of publishing unsigned launchers with green CI.
  5. Permissions. Adds actions: read, which the action's github-token is documented to need. Drops id-token: write, which the action never uses.
  6. Windows launchers in releases.
    • No artifact ever contains extracted-games/, so organize-launchers.sh always falls back to artifact names.
    • Its Windows pattern, *MINGW64*|*Windows*, never matched MudletInstaller-CLANG64, so it now matches *CLANG64* too.
  7. No unsigned launcher can be published by mistake.
    • deploy-win.sh exits 7 if a signed launcher is missing or can't be copied over its unsigned original.
    • prepare-signing-win.sh exits 7 if a launcher can't be staged.
    • The release job downloads only MudletInstaller-* artifacts, so unsigned-launchers can never be organized into a release.
  8. Only builds that are released are signed. SignPath Foundation requires a manual approval for every signing request (terms), so the compile job now waits for check-new-games and signs only tags and development builds that add a game. Manual workflow_dispatch runs on any branch are still signed, so a SignPath change can be tried before merging - they need approving too. The signing wait is raised to 4 hours to leave an approver time.
  9. Re-runs. The unsigned-launchers upload uses overwrite: true, so a re-run of a failed signing job can upload again.
  10. Launcher metadata. The terms require the artifact configuration to enforce product name and version. The launchers now carry a Windows version resource (MudletInstaller.rc.in, product name MudletInstaller, version from the release tag as X.Y.Z.0, 0.0.0.0 for unreleased builds), and the launchers configuration requires both via a version parameter the workflow passes.
  11. Uses a dedicated bootstrap SignPath project. The OSS organization can't create projects, so SignPath support created project bootstrap (repository URL https://github.com/Mudlet/bootstrap.git, origin verification on release-signing). The workflow signs with project-slug: 'bootstrap' and the policy files live in .signpath/policies/bootstrap/.

Testing

  • Ran the Windows job's scripts end to end with a mocked cygpath, with SignPath emulated the way its action works (create the folder if missing, extract over it):
    • Signing disabled: unsigned launchers published, exit 0.
    • All launchers signed: signed launchers published, exit 0.
    • One launcher missing from SignPath's output: exit 7. The unfixed Move Windows launcher signing from Azure Trusted Signing to SignPath #70 code published UNSIGNED-… with exit 0 here.
    • A stale signed copy left from an earlier run: removed first, so exit 7.
    • Copying a signed launcher fails: exit 7. Before the fix, exit 0 with that game shipped unsigned.
    • Staging a launcher fails: prepare-signing-win.sh exits 7.
  • organize-launchers.sh on a mocked release: development produces no *-Windows.exe. This branch produces one per game from the CLANG64 artifact.
  • shellcheck -S warning: clean on all three changed scripts.
  • actionlint: no findings on changed lines. The same 24 are on both base and branch, all on existing lines.
  • The XML is well-formed.
  • PR CI only exercises the unsigned path, because PR builds never sign. The SignPath steps and the signature check need a real signing run.

Before the first signed release

  • SignPath support created project bootstrap with repository URL https://github.com/Mudlet/bootstrap.git; its release-signing policy verifies that origin. A dedicated CI user, bootstrap CI, is the submitter on both bootstrap policies, so Mudlet/Mudlet's CI builds token can't sign for bootstrap and vice versa
  • Artifact configuration launchers is added to the bootstrap project from .signpath/artifact-configuration-launchers.xml
  • Repo secrets SIGNPATH_API_TOKEN (the bootstrap CI user's token) and SIGNPATH_ORGANIZATION_ID are added
  • Bootstrap has an OSI license file - SignPath Foundation requires one (COPYING, GPL-2.0-or-later like Mudlet)
  • A manual workflow_dispatch run produces signed launchers, the "Verify launcher signatures" step passes, and SignPath accepts the product-version match (run: all 46 launchers signed by CN=SignPath Foundation, request completed with version 0.0.0.0)
  • Windows Explorer → Properties → Digital Signatures on one launcher shows the SignPath Foundation certificate (MudletInstaller-StickMUD.exe from the run, on Windows 11: signer SignPath Foundation, sha256, DigiCert timestamp; Get-AuthenticodeSignature reports Valid, issuer GlobalSign GCC R45 CodeSigning CA 2020; ProductName MudletInstaller, ProductVersion 0.0.0.0)
  • After merging, a signed run no longer logs No GitHub policy found at .signpath/policies/bootstrap/release-signing.yml (the v1.3.1 run logged Found policy file .signpath/policies/bootstrap/release-signing.yml.)

Until these are done, ordinary pushes are unaffected and only a release fails.

After merging

  • Remove the AZURE_CREDENTIALS secret.

🤖 Generated with Claude Code

https://claude.ai/code/session_013FrhV64D6WvcALMeDsT8cb

jmckisson and others added 2 commits November 13, 2026 13:01
The launchers are now staged into one artifact by prepare-signing-win.sh,
signed by SignPath in a single request covering the whole GameList, and
picked back up by deploy-win.sh, which fails if signing was enabled but a
launcher came back unsigned. Drops jsign and the Azure login steps.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Allow the launcher wildcard to match every game. SignPath wildcards
  match exactly one file unless max-matches says otherwise, so 44
  launchers would have failed every signing request.
- Extract signed launchers into a fresh signed-launchers/ directory.
  The action extracts over its output directory without clearing it,
  so using the staging directory let the unsigned copies pass the
  missing-launcher check in deploy-win.sh.
- Verify every launcher's Authenticode signature after signing, since
  SignPath passes uncovered files through unsigned.
- Fail builds that should be signed when the SignPath secrets are
  missing, instead of publishing unsigned launchers, as the Azure step
  did before.
- Grant actions: read, which the SignPath action's token needs to read
  job details and download the artifact; drop the unused id-token.
- Pick up Windows launchers from the MudletInstaller-CLANG64 artifact
  in organize-launchers.sh. Releases cut for new games without a tag
  only reach that fallback, which matched MINGW64 or Windows, so they
  shipped no Windows launchers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013FrhV64D6WvcALMeDsT8cb
…releasable builds

deploy-win.sh didn't check the copy of the signed launcher over the unsigned
one, so a failed copy published the unsigned launcher with CI green.

The comment justifying signing every non-PR build said they can all end up in
a release, but only tags and development can. Sign just those, so master
pushes no longer spend production signing requests.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013FrhV64D6WvcALMeDsT8cb
…omments

- prepare-signing-win.sh exits 7 if a launcher can't be renamed or staged,
  instead of leaving it to deploy-win.sh three steps later.
- The release job only downloads the MudletInstaller-* artifacts, so the
  unsigned-launchers artifact can never be organized into a release.
- Let a re-run of a failed signing job upload its artifact again.
- Comments: SignPath, not the action, uses the token; the verify step
  fails test-signing builds; drop an unverified claim about SignPath
  passing uncovered files through.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013FrhV64D6WvcALMeDsT8cb
Restricting signing to tags and development left no way to try a SignPath
change before merging it, which the PR's own checklist relies on.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013FrhV64D6WvcALMeDsT8cb

vadi2 commented Nov 13, 2026

Copy link
Copy Markdown
Member Author

The macOS job failed on 98ca2c0 (log) because codesign --timestamp in CI/package-mac.sh reported "The timestamp service is not available". That's Apple's timestamp server being unreachable, not something in this PR, which doesn't touch the macOS packaging. The macOS job passed on e723aa4, and 98ca2c0 has since been superseded by 40f24f8, whose run is still in progress.


Generated by Claude Code

@vadi2
vadi2 enabled auto-merge (squash) November 13, 2026 14:23
@vadi2
vadi2 merged commit 11c283f into development Nov 14, 2026
10 checks passed
@vadi2
vadi2 deleted the ccr-59402c3b-4a6v01 branch November 14, 2026 20:05
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.

3 participants