github.com/anchore/syft@v1.38.2/syft/pkg/cataloger/dotnet/cataloger.go (about) 1 package dotnet 2 3 import ( 4 "github.com/anchore/syft/syft/pkg" 5 "github.com/anchore/syft/syft/pkg/cataloger/generic" 6 ) 7 8 // NewDotnetDepsBinaryCataloger returns a cataloger based on PE and deps.json file contents. 9 func NewDotnetDepsBinaryCataloger(config CatalogerConfig) pkg.Cataloger { 10 return &depsBinaryCataloger{ 11 config: config, 12 } 13 } 14 15 // NewDotnetDepsCataloger returns a cataloger based on deps.json file contents. 16 // 17 // Deprecated: use NewDotnetDepsBinaryCataloger instead which combines the PE and deps.json data which yields more accurate results (will be removed in syft v2.0). 18 func NewDotnetDepsCataloger() pkg.Cataloger { 19 return &depsCataloger{} 20 } 21 22 // NewDotnetPortableExecutableCataloger returns a cataloger based on PE file contents. 23 // 24 // Deprecated: use NewDotnetDepsBinaryCataloger instead which combines the PE and deps.json data which yields more accurate results (will be removed in syft v2.0). 25 func NewDotnetPortableExecutableCataloger() pkg.Cataloger { 26 return &binaryCataloger{} 27 } 28 29 // NewDotnetPackagesLockCataloger returns a cataloger based on packages.lock.json files. 30 func NewDotnetPackagesLockCataloger() pkg.Cataloger { 31 return generic.NewCataloger("dotnet-packages-lock-cataloger"). 32 WithParserByGlobs(parseDotnetPackagesLock, "**/packages.lock.json") 33 }