Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CycloneDX to 8.0.0 and BOM validation to v1_6 #907

Merged
merged 2 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CycloneDX.Tests/FunctionalTests/FunctionalTestHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ public static async Task<Bom> Test(RunOptions options, INugetServiceFactory nuge
ValidationResult validationResult;
if (options.json)
{
validationResult = await Json.Validator.ValidateAsync(mockBomFileStream, SpecificationVersion.v1_5).ConfigureAwait(false);
validationResult = await Json.Validator.ValidateAsync(mockBomFileStream, SpecificationVersion.v1_6).ConfigureAwait(false);
}
else
{
validationResult = Xml.Validator.Validate(mockBomFileStream, SpecificationVersion.v1_5);
validationResult = Xml.Validator.Validate(mockBomFileStream, SpecificationVersion.v1_6);
}
Assert.True(validationResult.Valid);

Expand Down
4 changes: 2 additions & 2 deletions CycloneDX.Tests/ValidationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ public async Task Validation(string fileFormat, bool disableGitHubLicenses)
ValidationResult validationResult;
if (fileFormat == "json")
{
validationResult = await Json.Validator.ValidateAsync(mockBomFileStream, SpecificationVersion.v1_5).ConfigureAwait(true);
validationResult = await Json.Validator.ValidateAsync(mockBomFileStream, SpecificationVersion.v1_6).ConfigureAwait(true);
}
else
{
validationResult = Xml.Validator.Validate(mockBomFileStream, SpecificationVersion.v1_5);
validationResult = Xml.Validator.Validate(mockBomFileStream, SpecificationVersion.v1_6);
}

Assert.True(validationResult.Valid);
Expand Down
2 changes: 1 addition & 1 deletion CycloneDX/Services/NugetV3Service.cs
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ public async Task<Component> GetComponentAsync(string name, string version, Comp

private static Component SetupComponentProperties(Component component, NuspecModel nuspecModel)
{
component.Author = nuspecModel.nuspecReader.GetAuthors();
component.Authors = new List<OrganizationalContact> { new OrganizationalContact { Name = nuspecModel.nuspecReader.GetAuthors() } };
component.Copyright = nuspecModel.nuspecReader.GetCopyright();
// this prevents empty copyright values in the JSON BOM
if (string.IsNullOrEmpty(component.Copyright))
Expand Down
4 changes: 2 additions & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="CycloneDX.Core" Version="7.0.1" />
<PackageVersion Include="CycloneDX.Core" Version="8.0.0" />
<PackageVersion Include="Microsoft.Build" Version="17.3.2" />
<PackageVersion Include="Microsoft.Build.Engine" Version="17.8.3" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
Expand All @@ -18,4 +18,4 @@
<PackageVersion Include="System.IO.Abstractions" Version="21.0.2" />
<PackageVersion Include="System.IO.Abstractions.TestingHelpers" Version="21.0.2" />
</ItemGroup>
</Project>
</Project>