Skip to content

Sign the PyInstaller executable and the MSI installer #328

@PierreRaybaut

Description

@PierreRaybaut

Context

The artifacts produced by the release CI workflow (the PyInstaller binary DataLab.exe and the MSI installer) are not digitally signed. This has several consequences:

  • Windows SmartScreen displays an "Unknown publisher" warning on first launch, which degrades user experience and can block installation in corporate environments.
  • IT security policies: many organisations refuse to execute unsigned binaries.
  • Integrity verification: the lack of signature prevents any automated cryptographic verification of the origin and integrity of downloaded artifacts.
  • Trust: for an open source project with industrial ambitions, signing is an expected signal of quality and maturity.

Code signing was intentionally deferred until the release process was fully automated via GitHub Actions (see related issue #327): signing, especially for a Windows binary and an MSI installer, is significantly easier to set up in an automated, reproducible environment than in a heterogeneous local workflow.

Goal

Add a code signing (Authenticode) step to the release CI workflow for:

  1. The PyInstaller executable DataLab.exe.
  2. The MSI installer generated by the WiX Toolset.

Signing must happen after artifacts are produced by the existing jobs, without changing the build logic itself.

Technical options to investigate

  • Certificate type:
    • OV (Organization Validation) or EV (Extended Validation)?
    • An EV certificate grants immediate SmartScreen reputation but requires a hardware device (HSM / USB token) — poorly compatible with CI execution.
    • Cloud-based solutions such as Azure Key Vault + Trusted Signing (formerly Azure Code Signing) or DigiCert KeyLocker allow signing from a CI runner without a physical HSM.
  • Provider: Sectigo, DigiCert, GlobalSign, SSL.com, Microsoft Trusted Signing, etc. — trade-off between cost, SmartScreen reputation and CI integration.
  • Signing tool: signtool.exe (Windows SDK), osslsigncode, or a dedicated tool from the provider.
  • Secrets management: credentials and certificate access stored in GitHub Actions secrets, with a documented rotation procedure.
  • Timestamping: mandatory so that signatures remain valid after the certificate expires (/tr + /td sha256 with signtool).
  • Verification: post-signing verification step (signtool verify /pa /v).

Acceptance criteria

  • DataLab.exe and DataLab-X.Y.Z.msi produced by the CI workflow are digitally signed and timestamped.
  • signtool verify /pa succeeds on both artifacts.
  • The SmartScreen "Unknown publisher" warning no longer appears (subject to the chosen certificate type and reputation accrual).
  • Signatures remain valid after the certificate expires, thanks to timestamping.
  • The certificate renewal procedure is documented and tested.

Dependencies

  • Blocker resolved: fully automated release CI workflow (see related issue Automate the full release process via GitHub Actions).
  • Budget: code signing certificate acquisition (recurring annual cost).
  • Organisational decision: choice of provider and certificate type.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions