Support for local and git dependencies #16
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces support for handling local checkout dependencies (rebar3
_checkouts) and refactors the CPE and PURL generation logic to cover more dependency types and edge cases.Changes
Local Dependencies
checkoutdependencies (dependencies found in_checkouts/).pkg:otpPURL type for local OTP application dependencies.pkg:genericPURL type for other local dependencies.CPE Generation
rebar3_sbom_cpefunctions name. The previous names were too restrictive. (renamed function calls inrebar3_sbom_cpe_SUITEas well)tag,branch, andreftypes.git@github.com:...) to correctly extract organization names for CPEs.PURL Enhancements
rebar3_sbom_purl:local_otp_app/2andrebar3_sbom_purl:local/2to support local OTP apps and local non-otp apps. See dataflow here for more detailsTesting
test/rebar3_sbom_purl_SUITE.erlto cover PURL generation for Hex, GitHub, Bitbucket, and local packages. This was lacking and addingrebar3_sbom_purl:local_otp_app/2andrebar3_sbom_purl:local/2made me add the SUITE.checkout_app_dependency_testtorebar3_sbom_json_SUITEto verify SBOM output for local checkout apps + corresponding local app in "test/local_app/_checkouts".Note
I tried to add test cases for dependencies coming from GitHub but rebar3 seemed unable to fetch them during the initialization phase so I gave up. However, I tested them locally using a sandbox app and I can confirm that they are working.