mirror of
https://github.com/anchore/syft.git
synced 2026-11-01 06:56:40 +01:00
add cataloger for rust crates from Cargo.lock files
Signed-off-by: Weston Steimel <weston.steimel@gmail.com>
This commit is contained in:
@@ -17,6 +17,7 @@ const (
|
||||
JavaPkg Type = "java-archive"
|
||||
JenkinsPluginPkg Type = "jenkins-plugin"
|
||||
GoModulePkg Type = "go-module"
|
||||
RustPkg Type = "rust-crate"
|
||||
)
|
||||
|
||||
// AllPkgs represents all supported package types
|
||||
@@ -30,6 +31,7 @@ var AllPkgs = []Type{
|
||||
JavaPkg,
|
||||
JenkinsPluginPkg,
|
||||
GoModulePkg,
|
||||
RustPkg,
|
||||
}
|
||||
|
||||
// PackageURLType returns the PURL package type for the current package.
|
||||
@@ -51,6 +53,8 @@ func (t Type) PackageURLType() string {
|
||||
return packageurl.TypeRPM
|
||||
case GoModulePkg:
|
||||
return packageurl.TypeGolang
|
||||
case RustPkg:
|
||||
return "cargo"
|
||||
default:
|
||||
// TODO: should this be a "generic" purl type instead?
|
||||
return ""
|
||||
|
||||
Reference in New Issue
Block a user