Skip to content

Conversation

@Bertk
Copy link
Collaborator

@Bertk Bertk commented Apr 22, 2025

Add SBOM files for coverlet nuget packages e.g.

image

@Bertk Bertk requested review from SimonCropp and removed request for SimonCropp June 3, 2025 11:30
@Bertk Bertk requested a review from Copilot June 6, 2025 08:35
Copy link
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 adds support for generating SBOM files for NuGet packages across multiple projects by enabling SBOM generation during CI builds and adding the required package references.

  • Added the property driven by the TF_BUILD environment variable in three csproj files.
  • Included a PackageReference to Microsoft.Sbom.Targets with appropriate PrivateAssets and IncludeAssets settings in the csproj files.
  • Updated Directory.Packages.props to pin the Microsoft.Sbom.Targets package version.

Reviewed Changes

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

File Description
src/coverlet.msbuild.tasks/coverlet.msbuild.tasks.csproj Added GenerateSBOM property and Microsoft.Sbom.Targets package reference for SBOM generation.
src/coverlet.console/coverlet.console.csproj Enabled SBOM generation and added Microsoft.Sbom.Targets package reference.
src/coverlet.collector/coverlet.collector.csproj Introduced the GenerateSBOM flag and added Microsoft.Sbom.Targets package reference.
Directory.Packages.props Added package version for Microsoft.Sbom.Targets.
Comments suppressed due to low confidence (7)

src/coverlet.msbuild.tasks/coverlet.msbuild.tasks.csproj:22

  • [nitpick] Consider enhancing this comment with details on the expected value of TF_BUILD and the conditions under which SBOM generation occurs to support future maintainability.
<!-- create SBOM for CI build-->

src/coverlet.msbuild.tasks/coverlet.msbuild.tasks.csproj:46

  • Verify that the configured PrivateAssets and IncludeAssets for Microsoft.Sbom.Targets conform with the project’s dependency management policies.
<PackageReference Include="Microsoft.Sbom.Targets">

src/coverlet.console/coverlet.console.csproj:9

  • [nitpick] Consider adding a brief note about TF_BUILD in this comment to clarify when SBOM generation is enabled during CI builds.
<!-- create SBOM for CI build-->

src/coverlet.console/coverlet.console.csproj:30

  • Ensure that the dependency settings (PrivateAssets and IncludeAssets) for Microsoft.Sbom.Targets are consistent with other projects and meet the overall design requirements.
<PackageReference Include="Microsoft.Sbom.Targets">

src/coverlet.collector/coverlet.collector.csproj:21

  • [nitpick] Expand this comment to specify what TF_BUILD represents and the scenario under which SBOM generation will be triggered.
<!-- create SBOM for CI build-->

src/coverlet.collector/coverlet.collector.csproj:45

  • Review the asset inclusion/exclusion settings for Microsoft.Sbom.Targets to ensure they are optimal and consistent with related projects.
<PackageReference Include="Microsoft.Sbom.Targets">

Directory.Packages.props:32

  • Consider using a centralized version variable for Microsoft.Sbom.Targets to maintain consistency across projects, if applicable.
<PackageVersion Include="Microsoft.Sbom.Targets" Version="3.1.0" />

@Bertk Bertk reopened this Dec 3, 2025
@Bertk Bertk closed this Dec 3, 2025
@Bertk Bertk reopened this Dec 3, 2025
Updated the `<GenerateSBOM>` property in `coverlet.collector.csproj`, `coverlet.console.csproj`, and `coverlet.msbuild.tasks.csproj` to explicitly set it to `true`, ensuring consistent SBOM generation across all environments. Previously, this property relied on the `$(TF_BUILD)` variable.

Additionally, removed a redundant closing `</Project>` tag from `coverlet.collector.csproj` to improve file structure and readability.
@Bertk Bertk marked this pull request as draft December 6, 2025 11:11
@Bertk Bertk added the feature PR label for new features label Dec 9, 2025
Bertk added 3 commits January 11, 2026 09:21
Upgraded the Microsoft.Sbom.Targets NuGet package from version 3.1.0 to 4.1.5 in Directory.Packages.props to ensure compatibility with the latest features and improvements.
@Bertk Bertk marked this pull request as ready for review January 11, 2026 09:10
@Bertk Bertk added the enhancement General enhancement request label Jan 11, 2026
Bertk added 4 commits January 11, 2026 10:32
Updated the `<GenerateSBOM>` property in `coverlet.collector.csproj`, `coverlet.console.csproj`, and `coverlet.msbuild.tasks.csproj` to explicitly set it to `true`, ensuring consistent SBOM generation across all environments. Previously, this property relied on the `$(TF_BUILD)` variable.

Additionally, removed a redundant closing `</Project>` tag from `coverlet.collector.csproj` to improve file structure and readability.
Bertk added 6 commits January 11, 2026 10:32
Upgraded the Microsoft.Sbom.Targets NuGet package from version 3.1.0 to 4.1.5 in Directory.Packages.props to ensure compatibility with the latest features and improvements.
Fix indentation of condition in CheckNugetStatus template step

Corrected the indentation of the condition property under the CheckNugetStatus.yml template step in azure-pipelines.yml. This structural fix ensures the condition is properly associated with the template step, improving YAML validity without changing any logic.
@Bertk Bertk merged commit 68efb63 into coverlet-coverage:master Jan 11, 2026
11 checks passed
@Bertk Bertk deleted the nuget-SBOM branch January 11, 2026 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement General enhancement request feature PR label for new features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants