Skip to content

[7.0] Scope NuGet package signing to specific packages#4111

Merged
mdaigle merged 1 commit intorelease/7.0from
cherry-pick/7.0/4058
Apr 2, 2026
Merged

[7.0] Scope NuGet package signing to specific packages#4111
mdaigle merged 1 commit intorelease/7.0from
cherry-pick/7.0/4058

Conversation

@paulmedynski
Copy link
Copy Markdown
Contributor

@paulmedynski paulmedynski commented Mar 31, 2026

Cherry-pick of #4058 to release/7.0


Original PR Description

Description

Fixes : #4029

The ESRP NuGet signing steps in the OneBranch pipeline use a broad *.*nupkg glob pattern, meaning they scan and sign every .nupkg/.snupkg file found in the output directory, not just the package built by the current job. If dependency packages from upstream stages are inadvertently present, they get re-scanned and re-signed unnecessarily.

PR #3998 addressed the primary cause by isolating PACK_OUTPUT to a dedicated output/ directory (separate from packages/where downloaded dependencies live). This PR adds a defense layer by scoping the ESRP glob patterns so each job only matches its own packages.

Changes

  • esrp-code-signing-step.yml : Added nupkgPattern parameter (default *.*nupkg) used in the pkg signing path
  • compound-esrp-nuget-signing-step.yml : Added pattern parameter (default *.*nupkg) for malware scanning and code signing
  • build-signed-sqlclient-package-job.yml : Passes Microsoft.Data.SqlClient.[0-9]*nupkg, the [0-9] ensures versioned MDS packages match but Extension packages (starting with a letter after SqlClient) do not.
  • build-signed-csproj-package-job.yml : Passes .*nupkg, scopes to the exact package being built (e.g., Microsoft.Data.SqlClient.Internal.Logging.*nupkg)

Copilot AI review requested due to automatic review settings March 31, 2026 19:28
@github-project-automation github-project-automation Bot moved this to To triage in SqlClient Board Mar 31, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 tightens ESRP NuGet malware scanning/signing in the OneBranch pipelines so each job only matches and signs the package(s) it produced, avoiding re-scanning/re-signing dependency packages that may be present in the output directory.

Changes:

  • Add configurable NuGet glob parameters to ESRP signing step templates (defaulting to the prior *.*nupkg behavior).
  • Scope Microsoft.Data.SqlClient package signing to the job’s own versioned packages.
  • Scope csproj-based package signing (Logging/Abstractions/Azure/etc.) to the job’s exact package name.

Reviewed changes

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

File Description
eng/pipelines/onebranch/steps/esrp-code-signing-step.yml Adds nupkgPattern parameter and uses it for ESRP NuGet scan/sign inputs.
eng/pipelines/onebranch/steps/compound-esrp-nuget-signing-step.yml Adds pattern parameter to scope malware scanning and signing of NuGet packages.
eng/pipelines/onebranch/jobs/build-signed-sqlclient-package-job.yml Passes a version-scoped pattern for Microsoft.Data.SqlClient packages to the ESRP pkg signing step.
eng/pipelines/onebranch/jobs/build-signed-csproj-package-job.yml Passes a package-name-scoped pattern for NuGet signing of csproj-based packages.

@paulmedynski paulmedynski added this to the 7.0.1 milestone Mar 31, 2026
@paulmedynski paulmedynski marked this pull request as ready for review March 31, 2026 19:48
@paulmedynski paulmedynski requested a review from a team as a code owner March 31, 2026 19:48
@paulmedynski paulmedynski moved this from To triage to In review in SqlClient Board Mar 31, 2026
@mdaigle mdaigle merged commit 5fe010e into release/7.0 Apr 2, 2026
10 of 12 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in SqlClient Board Apr 2, 2026
@mdaigle mdaigle deleted the cherry-pick/7.0/4058 branch April 2, 2026 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants