Skip to content

Commit c23499c

Browse files
committed
Add comprehensive metadata for SBOM generation
This update ensures that generated Software Bill of Materials (SBOMs) include detailed company and copyright information. It also explicitly sets the package version for SBOMs and enables fetching license information, improving accuracy and supply chain security.
1 parent 14ccbd5 commit c23499c

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

Directory.Build.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
<PropertyGroup>
44
<NeutralLanguage>en</NeutralLanguage>
55
<Authors>Brian Lagunas;Dan Siegel</Authors>
6+
<Company>Prism Software, LLC</Company>
7+
<Copyright Condition="'$(Copyright)'==''">Copyright (C) 2015-$([System.DateTime]::Now.ToString(`yyyy`)) Prism Software, LLC - all rights reserved</Copyright>
68
<PackageProjectUrl>https://github.com/PrismLibrary/Prism</PackageProjectUrl>
79
<PackageLicenseFile>LICENSE</PackageLicenseFile>
810
<PackageIcon>prism-logo.png</PackageIcon>

Directory.Build.targets

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,20 @@
66

77
<PropertyGroup Condition=" $(IsPackable) ">
88
<GenerateSBOM>true</GenerateSBOM>
9+
<SbomGenerationFetchLicenseInformation>true</SbomGenerationFetchLicenseInformation>
10+
<SbomGenerationPackageSupplier>$(Company)</SbomGenerationPackageSupplier>
911
<!-- Nuget source link -->
1012
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
1113
<PublishRepositoryUrl>true</PublishRepositoryUrl>
1214
<EmbedUntrackedSources>true</EmbedUntrackedSources>
1315
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
1416
</PropertyGroup>
1517

18+
<Target Name="SetSbomMetadata"
19+
BeforeTargets="GenerateSbomTarget"
20+
AfterTargets="GetBuildVersion">
21+
<PropertyGroup>
22+
<SbomGenerationPackageVersion>$(PackageVersion)</SbomGenerationPackageVersion>
23+
</PropertyGroup>
24+
</Target>
1625
</Project>

0 commit comments

Comments
 (0)