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 adds code that derives the package folder from a given purl. Scanning will then take place in the package folder only.
The package folder is detected by traversing the repo's directory tree and inspecting all build files. The name of the build file and the method of parsing its content depends on the build environment used for the package. Build file inspection is currently implemented for
pom.xml
files (forpkg:maven
purls) andpyproject.toml
files (forpkg:pypi
purls). The package folder is the directory hat contains the build file which builds the package with the same name as the purl's name part. If found the package folder overrides the subfolder that can be specified in the UI.As a result of this PR the key for uniquely identifying a CBOM has changed. It is either the combination of [giturl, commit, subfolder] or [purl, commit].
Still to be implemented: inspection of gradle build files for maven purls. and setup.cfg (.py) files for pypi purls.