mirror of
https://github.com/anchore/syft.git
synced 2026-11-05 00:46:38 +01:00
feat: add support for conan packages (C/C++) (#1083)
This commit is contained in:
@@ -23,6 +23,7 @@ const (
|
||||
KbPkg Type = "msrc-kb"
|
||||
DartPubPkg Type = "dart-pub"
|
||||
DotnetPkg Type = "dotnet"
|
||||
ConanPkg Type = "conan"
|
||||
)
|
||||
|
||||
// AllPkgs represents all supported package types
|
||||
@@ -42,6 +43,7 @@ var AllPkgs = []Type{
|
||||
KbPkg,
|
||||
DartPubPkg,
|
||||
DotnetPkg,
|
||||
ConanPkg,
|
||||
}
|
||||
|
||||
// PackageURLType returns the PURL package type for the current package.
|
||||
@@ -73,6 +75,8 @@ func (t Type) PackageURLType() string {
|
||||
return packageurl.TypePub
|
||||
case DotnetPkg:
|
||||
return packageurl.TypeDotnet
|
||||
case ConanPkg:
|
||||
return packageurl.TypeConan
|
||||
default:
|
||||
// TODO: should this be a "generic" purl type instead?
|
||||
return ""
|
||||
@@ -116,6 +120,8 @@ func TypeByName(name string) Type {
|
||||
return DartPubPkg
|
||||
case packageurl.TypeDotnet:
|
||||
return DotnetPkg
|
||||
case packageurl.TypeConan:
|
||||
return ConanPkg
|
||||
default:
|
||||
return UnknownPkg
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user