diff --git a/syft/internal/packagemetadata/names.go b/syft/internal/packagemetadata/names.go index b382dceebe75..f24f31bc3fba 100644 --- a/syft/internal/packagemetadata/names.go +++ b/syft/internal/packagemetadata/names.go @@ -109,6 +109,7 @@ var jsonTypes = makeJSONTypes( jsonNamesWithoutLookup(pkg.RustBinaryAuditEntry{}, "rust-cargo-audit-entry", "RustCargoPackageMetadata"), // the legacy value is split into two types, where the other is preferred jsonNames(pkg.WordpressPluginEntry{}, "wordpress-plugin-entry", "WordpressMetadata"), jsonNames(pkg.LuaRocksPackage{}, "luarocks-package"), + jsonNames(pkg.DotnetPackagesLockEntry{}, "dotnet-packages-lock-entry", "DotnetPackagesLockEntry"), ) func expandLegacyNameVariants(names ...string) []string { diff --git a/syft/internal/packagemetadata/names_test.go b/syft/internal/packagemetadata/names_test.go index ee73d843740e..a414285622c5 100644 --- a/syft/internal/packagemetadata/names_test.go +++ b/syft/internal/packagemetadata/names_test.go @@ -317,6 +317,12 @@ func Test_JSONName_JSONLegacyName(t *testing.T) { expectedJSONName: "dotnet-deps-entry", expectedLegacyName: "DotnetDepsMetadata", }, + { + name: "DotnetPackagesLockEntry", + metadata: pkg.DotnetPackagesLockEntry{}, + expectedJSONName: "dotnet-packages-lock-entry", + expectedLegacyName: "DotnetPackagesLockEntry", + }, { name: "DotnetPortableExecutableMetadata", metadata: pkg.DotnetPortableExecutableEntry{},