Skip to content

Feature: Sign files with Azure trusted signing - #4038

Merged
infeo merged 11 commits into
developfrom
feature/azure-trusted-signing
Nov 11, 2025
Merged

infeo merged 11 commits into
developfrom
feature/azure-trusted-signing

Conversation

@infeo

@infeo infeo commented Nov 11, 2025

Copy link
Copy Markdown
Member

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.

@infeo infeo added this to the 1.18.0 milestone Nov 11, 2025
@infeo
infeo requested a review from Copilot November 11, 2025 12:59
@infeo infeo self-assigned this Nov 11, 2025
@coderabbitai

coderabbitai Bot commented Nov 11, 2025 •

Copy link
Copy Markdown

Note

Other AI code review bot(s) detected

CodeRabbit 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.

Walkthrough

Adds 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

  • Review credential masking/output logic in the composite action
  • Verify parameter mapping for each signing invocation (files-folder, filters, recurse, append-signature, description, URLs, Azure IDs/secrets)
  • Check Windows path changes and conditional if: expressions across workflow steps
  • Confirm coexistence/ordering of Azure and Actalis signing steps where both remain

Possibly related PRs

Suggested labels

os:windows, misc:installer

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding Azure Trusted Signing integration to the signing workflow.
Description check ✅ Passed The description is directly related to the changeset, explaining the rationale for refactoring to Azure Trusted Signing and detailing the implementation approach.
Linked Issues check ✅ Passed The PR addresses issue #3994 by implementing Azure Trusted Signing to build certificate reputation, which should reduce SmartScreen warnings over time as Windows gains trust in the certificate.
Out of Scope Changes check ✅ Passed All changes are within scope: creating the signing action, updating the workflow to use Azure Trusted Signing, and retaining Actalis as backup are all directly aligned with issue #3994's objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/azure-trusted-signing

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fd9d272 and 93c2cc6.

📒 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-secrets step 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: cryptomatorSigning and certificate-profile-name: production (action.yml lines 62–63), but the workflow defines different environment variables AZURE_TRUSTED_SIGNING_ACCOUNT: 'skymatic' and AZURE_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: Add append-signature: true to 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: true to 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 omits append-signature.

MSI files do not support multiple signatures per the PR objectives, so append-signature correctly defaults to false. This ensures only the Azure Trusted Signing signature is applied to MSI files.


368-378: Good: append-signature: true preserves 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: true to preserve the Actalis signature alongside the Azure signature, consistent with the burn engine approach and the dual-signing strategy outlined in the PR objectives.

Comment thread .github/workflows/win-exe.yml Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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.

Comment thread .github/workflows/win-exe.yml Resolved
Comment thread .github/workflows/win-exe.yml Resolved
Comment thread .github/workflows/win-exe.yml Resolved
Comment thread .github/workflows/win-exe.yml Resolved
Comment thread .github/workflows/win-exe.yml Resolved
@infeo

infeo commented Nov 11, 2025 •

Copy link
Copy Markdown
Member Author

@coderabbitai coderabbitai Bot 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.

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: true but also provide default values. In GitHub Actions, when both are specified, the default takes precedence and the input is effectively optional. For clarity, either:

  • Remove required: true and keep defaults, OR
  • Remove defaults and keep required: true

Since 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

📥 Commits

Reviewing files that changed from the base of the PR and between 93c2cc6 and 05bb8ab.

📒 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: bash setting applies only to run: steps, not to uses: actions. Action inputs like base-dir are 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:

  1. Boolean syntax is correct: GitHub Actions automatically coerces true to 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.

  2. 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 the files-folder input. 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 of true) 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.

Comment thread .github/workflows/win-exe.yml Resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

misc:installer Affects installer or launcher os:windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[1.18.0] Windows Defender SmartScreen prevented an unrecognized app from starting

2 participants