Repository navigation
Feature: Sign files with Azure trusted signing - #4038
Conversation
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughAdds a new composite GitHub Action at .github/actions/win-sign-action/action.yml that masks/exports Azure credentials and invokes Azure Trusted Signing for Windows artifacts. Updates .github/workflows/win-exe.yml to call the new Azure Trusted Signing steps in multiple places (DLLs, MSI, WiX burn engine, EXE installers), using Windows-style paths and preserving conditional execution; some Actalis signing steps are kept in parallel. Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20–30 minutes
Possibly related PRs
Suggested labels
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/actions/win-sign-action/action.yml(1 hunks).github/workflows/win-exe.yml(5 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Agent
- GitHub Check: Build .msi Installer (x64, windows-latest, zulu, 24.0.1+9, jdk)
🔇 Additional comments (6)
.github/actions/win-sign-action/action.yml (2)
40-48: Good: Azure secrets are properly masked.The
set-secretsstep correctly masks all three Azure credentials before exporting them to outputs, preventing accidental leakage in logs.
30-31: Verify intent of hardcoded Azure account/profile values or parameterize them.Confirmed: The action hardcodes
trusted-signing-account-name: cryptomatorSigningandcertificate-profile-name: production(action.yml lines 62–63), but the workflow defines different environment variablesAZURE_TRUSTED_SIGNING_ACCOUNT: 'skymatic'andAZURE_CERT_PROFILE: 'SkymaticProduction'(win-exe.yml lines 30–31) that are not passed to the action.These hardcoded values prevent the action from being reusable across different Azure Trusted Signing configurations. Either confirm these values are correct for all callers, or add inputs to the action so they can be overridden per invocation.
.github/workflows/win-exe.yml (4)
193-202: Addappend-signature: trueto DLLs signing step if multiple signing passes are intended.This DLLs signing step precedes the Actalis signing step (line 203). If Azure and Actalis signatures are both to be preserved on the same binaries, add
append-signature: trueto the Azure step. Otherwise, the Actalis signature will overwrite Azure's.The step currently relies on the action's default
append-signature: false(action.yml line 26). Clarify the intended signing order and whether multiple signatures should coexist on DLLs.
262-271: MSI signing correctly omitsappend-signature.MSI files do not support multiple signatures per the PR objectives, so
append-signaturecorrectly defaults tofalse. This ensures only the Azure Trusted Signing signature is applied to MSI files.
368-378: Good:append-signature: truepreserves Actalis signature before applying Azure signature.The WiX burn engine signing step correctly preserves the Actalis signature before applying the new Azure Trusted Signing signature, maintaining the dual-signature strategy.
392-402: Good: EXE installer signing strategy is consistent with burn engine.The EXE installer signing step correctly applies
append-signature: trueto preserve the Actalis signature alongside the Azure signature, consistent with the burn engine approach and the dual-signing strategy outlined in the PR objectives.
There was a problem hiding this comment.
Pull Request Overview
This PR refactors Windows code signing to use Azure Trusted Signing as the primary signing method, with Actalis code signing retained as a backup for reputation building. The changes introduce a new reusable composite action for Azure Trusted Signing and update the Windows installer workflow to use it.
Key Changes:
- Introduced a new composite action (
.github/actions/win-sign-action) to centralize Azure Trusted Signing logic - Updated the Windows installer workflow to sign DLLs, EXE, and burn engine files with Azure Trusted Signing first, followed by Actalis
- MSI files are now signed only with Azure Trusted Signing (MSIs don't support multiple signatures)
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
.github/workflows/win-exe.yml |
Updated to use the new Azure Trusted Signing action for signing DLLs, MSI, burn engine, and EXE installer; removed unused isDebug input parameter; added Azure account configuration environment variables |
.github/actions/win-sign-action/action.yml |
New composite action that wraps the Azure Trusted Signing action with configurable inputs for file paths, extensions, and Azure credentials |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
A working, double-signed, not SAC-triggering installer can be found in https://github.com/cryptomator/cryptomator/actions/runs/19266245321 |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
.github/actions/win-sign-action/action.yml (2)
3-36: Clarify required vs. optional inputs with defaults.Lines 14 and 17 mark inputs as
required: truebut also providedefaultvalues. In GitHub Actions, when both are specified, the default takes precedence and the input is effectively optional. For clarity, either:
- Remove
required: trueand keep defaults, OR- Remove defaults and keep
required: trueSince the action benefits from sensible defaults, consider marking these as
required: false:file-extensions: description: 'List of file extensions to sign, separated by comma' - required: true + required: false default: 'exe,dll,ps1' description: description: 'Signature description' - required: true + required: false default: 'Cryptomator'
50-76: Consider making Azure account/profile names configurable via action inputs.Lines 62–63 hardcode the Azure Trusted Signing account (
cryptomatorSigning) and profile (production) names. If these values need to be changed or if other projects use this action, consider exposing them as optional inputs with defaults:Add two new optional inputs at the top of the action:
client-secret: description: 'Azure Client Secret' required: true + trusted-signing-account-name: + description: 'Azure Trusted Signing account name' + required: false + default: 'cryptomatorSigning' + certificate-profile-name: + description: 'Azure certificate profile name' + required: false + default: 'production'Then update line 62–63 to use these inputs:
- trusted-signing-account-name: cryptomatorSigning - certificate-profile-name: production + trusted-signing-account-name: ${{ inputs.trusted-signing-account-name }} + certificate-profile-name: ${{ inputs.certificate-profile-name }}This maintains backward compatibility while improving flexibility.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/actions/win-sign-action/action.yml(1 hunks).github/workflows/win-exe.yml(4 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-06-17T12:55:22.351Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 2666
File: .github/workflows/win-exe.yml:0-0
Timestamp: 2025-06-17T12:55:22.351Z
Learning: In the Cryptomator Windows build workflow, the debug launcher (CryptomatorDebug) should be included in every build as an additional, non-standard executable, not conditionally based on the isDebug input. This design provides users with debugging capabilities when needed without affecting the normal user experience.
Applied to files:
.github/workflows/win-exe.yml.github/actions/win-sign-action/action.yml
📚 Learning: 2024-12-10T17:06:19.650Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3641
File: .github/workflows/win-exe.yml:19-19
Timestamp: 2024-12-10T17:06:19.650Z
Learning: In the Cryptomator project, the exact JDK version is fixed in release workflows (e.g., `.github/workflows/win-exe.yml`, `.github/workflows/mac-dmg.yml`) to ensure reproducible builds.
Applied to files:
.github/actions/win-sign-action/action.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Build .msi Installer (x64, windows-latest, zulu, 24.0.1+9, jdk)
🔇 Additional comments (3)
.github/workflows/win-exe.yml (3)
260-269: The review comment is incorrect; no changes needed.The
defaults: run: shell: bashsetting applies only torun:steps, not touses:actions. Action inputs likebase-dirare passed directly to the composite action without bash processing. The azure/trusted-signing-action expects Windows-style paths with backslashes for absolute paths, and all local win-sign-action calls throughout the workflow consistently use this format.Likely an incorrect or invalid review comment.
390-400: Review comment is incorrect. No changes required.The review misunderstands GitHub Actions input handling and the existing codebase patterns:
Boolean syntax is correct: GitHub Actions automatically coerces
trueto the string"true"for action inputs. The boolean syntax at line 396 is equivalent to'true'and matches the pattern already used at lines 196, 207, and 372.Backslash path is consistent: The Windows-style backslash separator at line 394 is intentional and consistent with identical
base-dir: ${{ github.workspace }}\...patterns at lines 195, 264, and 370. Changing only this instance would introduce inconsistency.Likely an incorrect or invalid review comment.
366-376: ****The review comment's primary suggestion to use forward slashes (
/tmp) contradicts the official azure/trusted-signing-action documentation, which explicitly requires Windows-style backslash paths for thefiles-folderinput. All current usages in the codebase (lines 195, 264, 370, 372, 394, 396) correctly use backslashes and are consistent with the action's requirements.The suggestion to quote the boolean (
'true'instead oftrue) is a minor consistency note—both forms are valid in GitHub Actions YAML—but the action.yml default already uses the quoted form'false', so this would be a reasonable stylistic improvement. However, this does not warrant the path separator change, which would break the action.Likely an incorrect or invalid review comment.
Closes #3994.
This PR refactors signing again to use Azure Trusted Signing.
The files are signed via the azure/trusted-signing-action. Actalis code signing is kept as backup and to increase cert reputation.
The actual signing is moved into its own repo-private action to dedup code. (
./.github/actions/win-sign-action).The MSI is only signed via Azure Trusted signing, because MSI's don't support multiple signatures.