Repository navigation
ci(release): Authenticode-sign Windows release binaries via Azure Artifact Signing - #234
Merged
Merged
Conversation
…ifact Signing Sign reld.exe, reld-link.exe and llvm_ld.dll in the windows-x64 and windows-arm64 build-cross lanes with a SHA-256-pinned jsign 7.6 jar against Azure Artifact Signing (OIDC azure/login, token via env), after the llvm-ld lock check and before packaging, so the archive, SHA256SUMS and manifest.json describe signed bytes. A structural post-sign check fails closed on any unsigned PE, and smoke-windows requires Get-AuthenticodeSignature Valid for every PE in the shipped archive. pull_request runs (untrusted OIDC subject) skip signing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Azure Artifact Signing (Authenticode) to
release.yml, same approach as forge-ci/zccache#2048 and forge-ci/bosn#807.What gets signed:
reld.exe,reld-link.exeandllvm_ld.dllin thebuild-crosswindows-x64 (x86_64-pc-windows-msvc) and windows-arm64 (aarch64-pc-windows-msvc) lanes. Signing runs afterci/fetch_llvm_ld.pyhas checked the DLL against its lock and beforeci/package_release.py, so the zip,SHA256SUMSandmanifest.jsonall describe the signed bytes.How:
ci/sign_windows_release.pyuses jsign 7.6, pinned by SHA-256, withTRUSTEDSIGNING,SHA-256and an RFC 3161 timestamp fromtimestamp.acs.microsoft.com. The token comes fromaz account get-access-token --resource https://codesigning.azure.net, is masked, and reaches jsign as--storepass env:RELD_AZURE_SIGNING_TOKEN.azure/login@a457da9e…(v2.3.0) over OIDC, withallow-no-subscriptions: true.smoke-windowsnow requiresGet-AuthenticodeSignatureto reportValidfor every.exeand.dllin the archive thatpublishships.build-crossgets job-levelcontents: readandid-token: write.ci.tomlallowlistsazure/login, the six org secrets, andid-token: writeforbuild-cross.Behaviour change: preflight emits
sign=falseonly forpull_requestruns, because their OIDC subject is not trusted. Tag pushes and dispatches frommainsign. A dispatch from any other branch fails closed instead of producing unsigned binaries. So this PR's own release.yml run checks the unsigned pipeline only. The signing path is first exercised on the next tag or dispatch from main.Tests: cases added to
ci/tests/test_ci_workflow.py(no new test file): the signature checker, the multi-directory fail-closed check, the pinned jsign argv, and step ordering in release.yml.pytest ci/testsgives 392 passed, and actionlint is clean.ci-lint precheck (pinned 92106df, with PyYAML): it goes from 414 to 416 violations. The two new ones come with the request itself: SEC-002 allows
id-tokenonly on an OIDC publisher job, and GATE-012 flags anid-tokenjob that runs on PRs. The precheck is not a merge gate today.