Skip to content
New issue

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

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

Already on GitHub? # to your account

feat(cdx): Update to CycloneDX 1.6 #489

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
CDXGEN_VERSION: '10.8.1'
CDXGEN_PLUGINS_VERSION: '1.6.2'
GRYPE_VERSION: 'v0.79.2'
SBOMQS_VERSION: 'v0.1.5'
SBOMQS_VERSION: 'v0.1.6'
DEPSCAN_VERSION: 'v5.4.2'
NYDUS_VERSION: '2.2.5'
SWIFT_VERSION: '5.10.1'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
env:
CDXGEN_PLUGINS_VERSION: '1.6.2'
GRYPE_VERSION: 'v0.79.2'
SBOMQS_VERSION: 'v0.1.5'
SBOMQS_VERSION: 'v0.1.6'
DEPSCAN_VERSION: 'v5.4.2'
NYDUS_VERSION: '2.2.5'
java_version: '21'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public CdxgenClient() {
* * --project-name %s # name of main component of the SBOM, defaulting to the repository name
* * --no-validate # disable cdxgen validation as we try to process everything
*/
private static final String CDXGEN_CMD_FMT = "cdxgen --spec-version 1.5 -o %s%s%s%s%s%s --project-name %s --no-validate";
private static final String CDXGEN_CMD_FMT = "cdxgen --spec-version 1.6 -o %s%s%s%s%s%s --project-name %s --no-validate";

public record SbomCreationCommand(
Path repoDir,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public DependencyTrackClient(
*/
public Uni<Result<Project>> uploadSBOM(RepositoryDetails repoDetails, Bom sbom, String projectName, Project parentProject, Optional<String> commitSha) {
var projectVersion = repoDetails.version();
var sbomBase64 = Base64.getEncoder().encodeToString(new BomJsonGenerator(sbom, Version.VERSION_15).toJsonString().getBytes(StandardCharsets.UTF_8));
var sbomBase64 = Base64.getEncoder().encodeToString(new BomJsonGenerator(sbom, Version.VERSION_16).toJsonString().getBytes(StandardCharsets.UTF_8));
var payload = new JsonObject(Map.of(
"projectName", projectName,
"projectVersion", projectVersion,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import org.kohsuke.github.GHEventPayload;
import org.kohsuke.github.GitHub;
import org.mockito.ArgumentCaptor;
import org.testcontainers.shaded.org.hamcrest.CoreMatchers;

import java.io.IOException;
import java.util.Optional;
Expand Down
Loading