Skip to content

Use Custom Validation Policy for vPack Pipeline - #27911

Merged
Justin Chung (jshigetomi) merged 2 commits into
PowerShell:masterfrom
jshigetomi:fix/vpack-tools-only-policy-master
Aug 31, 2026
Merged

Use Custom Validation Policy for vPack Pipeline#27911
Justin Chung (jshigetomi) merged 2 commits into
PowerShell:masterfrom
jshigetomi:fix/vpack-tools-only-policy-master

Conversation

@jshigetomi

@jshigetomi Justin Chung (jshigetomi) commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

PR Summary

vPack code sign validation changed without notice. While we wait for one branch to administer a fix, we will use our own code sign validation policy.

PR Context

This PR will unblock our vPack pipeline.

PR Checklist

  • PR has a meaningful title
  • Summarized changes
  • Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header
  • This PR is ready to merge and is not work in progress
    • If the PR is work in progress, please add the prefix WIP: or [ WIP ] to the beginning of the title and remove the prefix when the PR is ready.
  • Breaking changes
    • None
  • User-facing changes
    • Not Applicable
  • Testing - New and feature
    • N/A or can only be tested interactively
  • Tooling
    • N/A

… policy

Port the v7.4.19 vPack signing changes (PR 41365, PR 41411, PR 41417) onto
the current master pipeline structure, which already matches the state
those PRs were built on (PR 41207/41209/41246 were superseded by PR 41365
and are not needed here).

- obp-file-signing.yml: add `ThirdPartySigningProfile` and
  `SignAllBinariesWithThirdPartyProfile` parameters so a caller can force
  every file to be (re)signed with a single certificate instead of only
  the files missing an official signature.
- PowerShell-vPack-Stages.yml: sign all vPack files (*.ps1, *.psm1,
  *.ps1xml, *.psd1, *.exe, *.dll) with the Windows build tools
  certificate, then validate the signed payload against a new
  repository-managed CodeSign policy that only trusts that certificate.
  Fail the build on any SARIF result other than `CodeSign.MatchingPolicy`.
- PowerShell-vPack-Stages.yml: disable the injected CodeSign validator via
  `templateContext.sdl.codeSignValidation` and `ob_sdl_codeSignValidation_excludes`
  so official-build adapters that force it on do not conflict with the
  tools-only validation above.
- .config/codesignpolicy.xml: add the new CodeSign policy that allows only
  the "Windows Internal Build Tools CodeSign" publisher.
- PowerShell-vPack-Official.yml: remove the now-unused `useCustomPolicy`
  globalSdl flag, since the vPack job validates signatures itself.

Related work items: #164495
Copilot AI lite review requested due to automatic review settings August 31, 2026 22:20
@jshigetomi
Justin Chung (jshigetomi) requested a review from a team as a code owner August 31, 2026 22:20
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@jshigetomi Justin Chung (jshigetomi) added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Aug 31, 2026
@jshigetomi Justin Chung (jshigetomi) changed the title vPack: Sign all binaries with the Windows tools certificate Use Custom Validation Policy for vPack Pipeline Aug 31, 2026

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

Ports the vPack signing/validation flow from release/v7.4.19 to master so the vPack payload is re-signed with the Windows build tools certificate and validated against a tools-only CodeSign policy, while minimizing impact to other callers of shared signing templates.

Changes:

  • Disable injected CodeSign validation for the vPack stage and explicitly re-sign + validate the full vPack payload using a repo-managed custom CodeSign policy.
  • Extend obp-file-signing.yml to allow overriding the third-party signing profile and optionally signing all binaries with that profile.
  • Add a custom CodeSign policy XML that only permits the Windows Internal Build Tools CodeSign publisher; remove an unused/obsolete globalSdl.useCustomPolicy setting from the vPack official pipeline.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
.pipelines/templates/stages/PowerShell-vPack-Stages.yml Disables injected CodeSign validation for vPack, signs all vPack files with tools cert, and validates against custom policy with SARIF post-processing.
.pipelines/templates/obp-file-signing.yml Adds parameters to override third-party signing profile and to optionally sign all binaries with that profile.
.pipelines/PowerShell-vPack-Official.yml Removes globalSdl.useCustomPolicy to align with explicit per-stage CodeSign validation.
.config/codesignpolicy.xml Introduces a tools-only CodeSign policy used by the vPack validation step.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread .pipelines/templates/obp-file-signing.yml
Comment thread .pipelines/templates/stages/PowerShell-vPack-Stages.yml Outdated
Comment thread .pipelines/templates/stages/PowerShell-vPack-Stages.yml
Discover the latest CodeSign validation SARIF beneath the task results root instead of assuming the task always writes to index 001.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 99e6a033-65fd-4a39-9a71-2ce9b7657c10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backport-7.4.x-Done Backport-7.5.x-Consider Backport-7.6.x-Done CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants