syft/syft/pkg/cataloger/dotnet/cataloger.go
Alex Goodman e5711e9b42
Update CPE processing to use NVD API (#4332)
* update NVD CPE dictionary processor to use API

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* pass linting with exceptions

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

---------

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
2025-11-06 16:02:26 -05:00

34 lines
1.3 KiB
Go

package dotnet
import (
"github.com/anchore/syft/syft/pkg"
"github.com/anchore/syft/syft/pkg/cataloger/generic"
)
// NewDotnetDepsBinaryCataloger returns a cataloger based on PE and deps.json file contents.
func NewDotnetDepsBinaryCataloger(config CatalogerConfig) pkg.Cataloger {
return &depsBinaryCataloger{
config: config,
}
}
// NewDotnetDepsCataloger returns a cataloger based on deps.json file contents.
//
// Deprecated: use NewDotnetDepsBinaryCataloger instead which combines the PE and deps.json data which yields more accurate results (will be removed in syft v2.0).
func NewDotnetDepsCataloger() pkg.Cataloger {
return &depsCataloger{}
}
// NewDotnetPortableExecutableCataloger returns a cataloger based on PE file contents.
//
// Deprecated: use NewDotnetDepsBinaryCataloger instead which combines the PE and deps.json data which yields more accurate results (will be removed in syft v2.0).
func NewDotnetPortableExecutableCataloger() pkg.Cataloger {
return &binaryCataloger{}
}
// NewDotnetPackagesLockCataloger returns a cataloger based on packages.lock.json files.
func NewDotnetPackagesLockCataloger() pkg.Cataloger {
return generic.NewCataloger("dotnet-packages-lock-cataloger").
WithParserByGlobs(parseDotnetPackagesLock, "**/packages.lock.json")
}