Skip to content

Pin Syft's output format to CycloneDX 1.4#754

Closed
brunoapimentel wants to merge 1 commit intokonflux-ci:mainfrom
brunoapimentel:pin-cyclonedx-version
Closed

Pin Syft's output format to CycloneDX 1.4#754
brunoapimentel wants to merge 1 commit intokonflux-ci:mainfrom
brunoapimentel:pin-cyclonedx-version

Conversation

@brunoapimentel
Copy link
Copy Markdown
Contributor

Newer versions of Syft may default to newer versions of CycloneDX (as observed in the recent 0.99.0 version). The problem is that the schema is bound to change between CycloneDX versions, which can bring breaking changes to the pipelines, specially to the scripts that merge different SBOMS.

This patch unblocks the update of Syft to >=0.99 (#722).

Newer versions of Syft may default to newer versions of CycloneDX (as
observed in the recent 0.99.0 version). The problem is that the schema
is bound to change between CycloneDX versions, which can bring breaking
changes to the pipelines, specially to the scripts that merge different
SBOMS.

This patch pins the output CycloneDX format to avoid unwanted breaking
changes.

Signed-off-by: Bruno Pimentel <bpimente@redhat.com>
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@brunoapimentel brunoapimentel mentioned this pull request Jan 19, 2024
1 task
@brunoapimentel brunoapimentel requested review from chmeliik, mkosiarc and mmorhun and removed request for mkosiarc January 19, 2024 17:57
@lcarva
Copy link
Copy Markdown
Contributor

lcarva commented Jan 19, 2024

I'm pretty sure it's been producing with 1.5 format for a while. So much so that we hard-coded 1.5 as the expected schema version in EC.

I think we need to update EC to accept either. Can you confirm?

@brunoapimentel
Copy link
Copy Markdown
Contributor Author

I'm pretty sure it's been producing with 1.5 format for a while. So much so that we hard-coded 1.5 as the expected schema version in EC.

I think we need to update EC to accept either. Can you confirm?

While this is very odd, since apparently the 1.5 format was only adopted with this patch (which made it's way into 0.99), I can confirm Syft 0.98 already outputs CycloneDX 1.5 🤯

The initial reason for this proposed change is that the CI is failing when upgrading to Syft >=0.99. But the real reason for it is that Syft changed the format to specify .metadata.tools (docs), not the actual CycloneDX version. Version 1.5 still supports the legacy format from <=1.4.

Well, I think there's no point in reverting the CycloneDX version if updating Syft is not urgent right now. I'll close this PR, and the problem will be handled in hermetoproject/hermeto#452.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants