diff --git a/syft/pkg/type.go b/syft/pkg/type.go index b9ee19357..d4abe75a6 100644 --- a/syft/pkg/type.go +++ b/syft/pkg/type.go @@ -220,7 +220,7 @@ func TypeByName(name string) Type { return CondaPkg case packageurl.TypePub: return DartPubPkg - case "dotnet": // here to support legacy use cases + case "dotnet", packageurl.TypeNuget: // "dotnet" is here to support legacy use cases; "nuget" is the canonical purl type return DotnetPkg case packageurl.TypeCocoapods: return CocoapodsPkg diff --git a/syft/pkg/type_test.go b/syft/pkg/type_test.go index b58e4ecd5..580ea5c79 100644 --- a/syft/pkg/type_test.go +++ b/syft/pkg/type_test.go @@ -58,6 +58,11 @@ func TestTypeFromPURL(t *testing.T) { purl: "pkg:dotnet/Microsoft.CodeAnalysis.Razor@2.2.0", expected: DotnetPkg, }, + { + name: "nuget purl maps to dotnet", + purl: "pkg:nuget/Minio@7.0.0", + expected: DotnetPkg, + }, { purl: "pkg:composer/laravel/laravel@5.5.0", expected: PhpComposerPkg,