-
Notifications
You must be signed in to change notification settings - Fork 1
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
CycloneDX Ruby Support #410
Conversation
Hi @jeffrey778zhan, noticed CycloneDX support was being added. Happy to provide some feedback if you like. |
Hey @coderpatros, absolutely! Any feedback is welcome. |
@jeffrey778zhan thanks for starting this up! Could you take a first stab at writing the docs for this scanner (and maybe some edits to the readme) before we merge and while we review the PR? |
Sure! I can add in the relevant information into salus_reports.md |
Does CycloneDX provide a function for you to validate the result against a schema? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tested something like docker build ...
, then docker run ...
to generate the cycloneDX output file, to ensure no strange behavior?
You can use the CycloneDX CLI tool or web tool for validation. Alternatively you can grab a copy of the schemas from the specification repo if you want to perform your own validation. |
Jeffrey, we included a copy of the sarif schema in salus to validate against our sarif results. Can you look into whether it's possible to do something similar for CycloneDX? |
Yep, if I'm understanding your question correctly currently this PR is scoped for only the changes needed to build CycloneDX reports from Ruby dependencies so there's still config changes needed to be made (i.e to add option to read the cyclonedx format option in the config) before we can generate the cycloneDX output file from docker. And at that point we'll be ready to test something like |
Hi @coderpatros, for the |
I don't think it would be valid. Besides the version not being encoded, I think it should be a specific version only or omitted. @pombredanne @stevespringett is that statement correct for purls? |
@jeffrey778zhan you wrote:
Short answer: a version need to be a version, e.g. a resolved concrete version and not a range, constraints, wildcard or specifier of sorts. So:
Eventually we want to a spec how to encode version ranges likely as a purl qualifier and there is work underway.
The general directions I favor is explained at aboutcode-org/vulnerablecode#119 (comment) and package-url/purl-spec#84 (comment) |
Thanks @coderpatros and @pombredanne for the confirmation. Will only include resolved concrete versions in the purl for now. |
Add Ruby Dependency Component builder with unit tests. Generate CycloneDX components follow spec version 1.3, specifically making use of the new properties type.