Extract language and package type from pURLs on SBOM decode (#777)

* add language detection from pURLs

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>

* add package type detection from pURLs

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>

* add cargo and npm pURL support

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>

* fix npm tests and linting

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
Alex Goodman
2022-01-27 09:35:16 -05:00
committed by GitHub
parent 9f7104d4f1
commit d7a23e4bb2
10 changed files with 287 additions and 21 deletions
+3
View File
@@ -18,6 +18,9 @@ const (
// this qualifier is not in the pURL spec, but is used by grype to perform indirect matching based on source information
purlUpstreamQualifier = "upstream"
purlCargoPkgType = "cargo"
purlGradlePkgType = "gradle"
)
type urlIdentifier interface {