Skip to content

Sign the Windows slicec binary in release builds - #825

Open
pepone wants to merge 1 commit into
mainfrom
sign-windows-release-binary
Open

pepone wants to merge 1 commit into
mainfrom
sign-windows-release-binary

Conversation

@pepone

@pepone pepone commented Sep 14, 2026

Copy link
Copy Markdown
Member

The release workflow uploads slicec.exe to download.zeroc.com without an Authenticode signature, and IceRpc.Slice.Tools bundles it unchanged. The tools/windows-x64/slicec.exe in IceRpc.Slice.Tools 0.6.0 on nuget.org is NotSigned, while the managed assemblies in the same package carry ZeroC's signature. This was found while fixing icerpc/icerpc-csharp#4949.

This PR signs the Windows binary on the Windows build leg, before the artifact upload, with the same Trusted Signing account, certificate profile and action version as icerpc-csharp's build-packages.yml:

  • Releases (any quality other than nightly): signing is mandatory.
  • Nightly builds: signing is optional, through a new authenticode_sign input (default false) on workflow_call and workflow_dispatch. The scheduled nightly doesn't set it, so it stays unsigned. A manual nightly run can opt in.
  • Verify step: after signing, a step fails the build unless Get-AuthenticodeSignature reports Valid, so a signing problem can't lead to an unsigned binary being uploaded. The upload job needs build, so nothing is published in that case.

The signing action is pinned to a commit SHA, as in icerpc-csharp, because it receives the signing credentials.

Before merging

The AZURE_TENANT_ID, AZURE_CLIENT_ID and AZURE_CLIENT_SECRET secrets are organization secrets that are not currently shared with this repository. An org admin needs to add icerpc/slicec to their selected repositories. Until then, a non-nightly release fails at the signing step. The scheduled nightly doesn't sign, so it isn't affected.

Testing

  • actionlint 1.7.12 reports no issues.
  • The signing policy script gives true for stable and RC with any input value, false for nightly by default, and true for nightly with authenticode_sign: true.
  • The verify step's PowerShell passes on a ZeroC-signed assembly from nuget.org and fails on the unsigned 0.4.0 slicec.exe.
  • The signing step itself can only run here once the secrets are shared. A manual workflow_dispatch with quality: nightly and authenticode_sign: true exercises it without publishing a stable release.

The workflow is the same on 0.4.x, so this commit cherry-picks cleanly and a 0.4.1 release would ship a signed slicec.exe.

What's Changed

None - release pipeline change: the published Windows slicec binary is now Authenticode-signed; the compiler itself is unchanged.

slicec.exe was uploaded to download.zeroc.com unsigned, and IceRpc.Slice.Tools
bundles it as is. Sign it with Authenticode on the Windows build leg, before
the artifact upload: always for non-nightly releases, and for nightly builds
when the new authenticode_sign input is set. A follow-up step checks the
signature, so a release build fails instead of publishing an unsigned binary.
Copilot AI lite review requested due to automatic review settings September 14, 2026 10:52
@pepone pepone added this to the 0.4.1 milestone Sep 14, 2026

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.

🔵 Needs a closer look

Release signing and publication gating depend on organization secrets and warrant final human review.

Pull request overview

Updates the release workflow to Authenticode-sign Windows slicec.exe before publication.

Changes:

  • Adds configurable signing for releases and nightly builds.
  • Verifies signatures before artifact upload.
  • Blocks publication when required signing fails.
File summaries
File Summary
.github/workflows/build-release.yml Adds signing policy, Azure Trusted Signing, verification, and release gating.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

2 participants