Skip to content

Guides

How to sign Windows binaries in CI

Authenticode signing needs a certificate that must not be exposed.

5 min read

Authenticode signing needs a certificate that must not be exposed.

Why it happens

The private key has to be available to signtool without being recoverable from logs or artifacts.

How to fix it

  1. Use a cloud HSM or Azure Trusted Signing rather than a PFX in a secret
  2. If using a PFX, store it base64-encoded and delete it after signing
  3. Sign in a job scoped to a protected environment with required reviewers

Your next build could be twice as fast, at half the price

Start free. Migrating away is the same one line, and we publish that diff too.