Fix release build codesign failure by scoping targetGlob to binaries#40324
Merged
Fix release build codesign failure by scoping targetGlob to binaries#40324
Conversation
The OneBranch Official template's Guardian codesign validation defaults to scanning .ps1/.psm1/.vbs/.js scripts, which causes 14 CodeSign.MissingSigningCert errors on unsigned tool/test scripts. Restrict codesign.targetGlob to only signed binary and package extensions (.dll, .exe, .sys, .msi, .msix, .msixbundle, .appx, .nupkg). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the OneBranch release pipeline configuration to prevent Guardian CodeSign validation from scanning unsigned scripts (e.g., .ps1) and failing the release build, while still enforcing signing checks for shipped binaries/packages.
Changes:
- Configure
globalSdl.codesign.targetGlobto scope CodeSign validation to binary/package extensions only. - Explicitly set CodeSign enforcement to enabled and breaking (
enabled: true,break: true) for the release pipeline.
OneBlue
approved these changes
Apr 27, 2026
| codesign: | ||
| enabled: true | ||
| break: true | ||
| targetGlob: '**\*.dll;**\*.exe;**\*.sys;**\*.msi;**\*.msix;**\*.msixbundle;**\*.appx;**\*.nupkg' |
Collaborator
There was a problem hiding this comment.
nit: I'd remove .sys, since we don't sign drivers
Member
Author
There was a problem hiding this comment.
fair, but I don't think it's harmful either. This is straight from some 1ES docs.
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.
Problem
The release build (145356685) failed in the
uget\ stage at Guardian: Post Analysis with 14 \CodeSign.MissingSigningCert\ errors on unsigned PowerShell scripts.
The OneBranch \Microsoft.Official.yml\ template's Guardian codesign validation defaults to scanning .ps1, .psm1, .vbs, .js, and other script types. Since our tool/test/diagnostics scripts aren't code-signed, this breaks the build.
Fix
Add \globalSdl.codesign.targetGlob\ to restrict codesign validation to only signed binary and package extensions:
This excludes script files from codesign validation while keeping enforcement for all shipped binaries and packages.
Validation