Sign the Windows build with Azure Artifact Signing
- ci/sign-windows.sh signs alkane-toolkit.exe from Linux with jsign through the blueflaresigning account (RFC 3161 timestamped), using the least-privilege CI service principal alkane-toolkit-ci-signer. It is a no-op until the repository variable AZURE_SIGNING_PROFILE names a certificate profile; after that any signing failure fails the build. - release.yml and next.yml sign before packaging; windows-native.yml checks the signature with Get-AuthenticodeSignature on real Windows and requires Valid once signing is on. - CI image adds a Java runtime and a checksum-pinned jsign 7.6 (re-pinned); windows-ci.sh fetches the same jar on older images. - scripts/enable-windows-signing.sh turns signing on after Microsoft approves the publisher identity validation: creates the PublicTrust certificate profile, narrows the signer role to it, sets the variable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -63,6 +63,18 @@ jobs:
|
||||
$os = Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion'
|
||||
"Testing run $env:RUN_ID on Windows $($os.DisplayVersion) build $($os.CurrentBuild)"
|
||||
|
||||
- name: Authenticode signature (native Windows)
|
||||
env:
|
||||
SIGNING_ENABLED: ${{ vars.AZURE_SIGNING_PROFILE }}
|
||||
run: |
|
||||
# Windows itself judges the signature: chain to a trusted root,
|
||||
# intact file hash, valid timestamp. Required once signing is on.
|
||||
$sig = Get-AuthenticodeSignature "$env:ALKANE_NATIVE\alkane-toolkit.exe"
|
||||
Write-Host "Signature: $($sig.Status) $($sig.StatusMessage)"
|
||||
if ($sig.SignerCertificate) { Write-Host "Signer: $($sig.SignerCertificate.Subject)" }
|
||||
if ($sig.TimeStamperCertificate) { Write-Host "Timestamp: $($sig.TimeStamperCertificate.Subject)" }
|
||||
if ($env:SIGNING_ENABLED -and $sig.Status -ne 'Valid') { exit 1 }
|
||||
|
||||
- name: Unit tests (native Windows)
|
||||
run: |
|
||||
$failed = @()
|
||||
|
||||
Reference in New Issue
Block a user