Skip to content

build: enabled DigiCert code signing for windows executable and package#766

Merged
derevnjuk merged 4 commits into
nextfrom
code-sign
Jul 14, 2026
Merged

build: enabled DigiCert code signing for windows executable and package#766
derevnjuk merged 4 commits into
nextfrom
code-sign

Conversation

@anchu-bright

@anchu-bright anchu-bright commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Add Authenticode code signing for the Windows release artifacts using
DigiCert KeyLocker (Software Trust Manager) cloud signing.

In the deploy workflow's generate-binary job (Windows target):

  • Decode the client-auth PKCS#12 from a base64 secret and export the
    SM_* environment for the DigiCert tooling.
  • Install the KeyLocker client tools (smctl + KSP) via
    digicert/code-signing-software-trust-action, then run
    smctl windows certsync to sync the code signing certificate into
    the local certificate store.
  • Sign cli.exe before building the MSI so the executable embedded in
    the installer is signed, then sign bright-cli.msi after it is built.
    Checksums are computed afterwards, so they cover the signed files.

Rewrite tools/scripts/sign-windows.ps1 to sign a given file by
certificate SHA1 thumbprint (signtool /sha1 with a DigiCert RFC 3161
timestamp) and verify the result. Signing is skipped gracefully when
the SM_* secrets are absent, so local and fork builds still succeed.

Requires the SM_HOST, SM_API_KEY, SM_CLIENT_CERT_FILE_B64,
SM_CLIENT_CERT_PASSWORD and SM_CODE_SIGNING_CERT_SHA1_HASH secrets.

@anchu-bright
anchu-bright requested a review from derevnjuk July 8, 2026 10:59
@anchu-bright anchu-bright changed the title enabled DigiCert code signing ci: enabled DigiCert code signing for windows executable and package Jul 8, 2026
@derevnjuk derevnjuk added the Type: ci Pull requests that update CI/CD workflows label Jul 8, 2026
@derevnjuk
derevnjuk enabled auto-merge (squash) July 8, 2026 11:27
@anchu-bright anchu-bright changed the title ci: enabled DigiCert code signing for windows executable and package build: enabled DigiCert code signing for windows executable and package Jul 8, 2026

@derevnjuk derevnjuk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, seems like are correct and technically accurate, but there are a few minors

Comment thread .github/workflows/deploy.yml Outdated
Comment thread .github/workflows/deploy.yml Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds Authenticode code signing for Windows release artifacts by integrating DigiCert KeyLocker (Software Trust Manager) into the deploy workflow, and updates the Windows signing script to sign arbitrary files by certificate thumbprint and verify the result.

Changes:

  • Update tools/scripts/sign-windows.ps1 to sign a provided file path using signtool /sha1 + RFC3161 timestamping, then verify the signature.
  • Extend .github/workflows/deploy.yml to prepare DigiCert KeyLocker env vars, install DigiCert tooling, sync the cert into the Windows store, and sign both the .exe and .msi before computing checksums.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
tools/scripts/sign-windows.ps1 Reworked signing script to sign by SHA1 thumbprint and verify signatures.
.github/workflows/deploy.yml Adds Windows-only DigiCert KeyLocker setup + signing steps for release artifacts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tools/scripts/sign-windows.ps1
Comment thread .github/workflows/deploy.yml
@derevnjuk
derevnjuk disabled auto-merge July 14, 2026 13:11
@derevnjuk
derevnjuk enabled auto-merge (squash) July 14, 2026 13:11
@derevnjuk
derevnjuk merged commit 247e4b6 into next Jul 14, 2026
6 checks passed
@derevnjuk
derevnjuk deleted the code-sign branch July 14, 2026 13:12
@anchu-bright
anchu-bright restored the code-sign branch July 14, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: ci Pull requests that update CI/CD workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants