mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 08:23:15 +01:00
* 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>
33 lines
866 B
Go
33 lines
866 B
Go
package dotnet
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/anchore/syft/syft/artifact"
|
|
"github.com/anchore/syft/syft/file"
|
|
"github.com/anchore/syft/syft/pkg"
|
|
)
|
|
|
|
// depsCataloger will search for deps.json file contents.
|
|
//
|
|
// Deprecated: use depsBinaryCataloger instead which combines the PE and deps.json data which yields more accurate results (will be removed in syft v2.0).
|
|
type depsCataloger struct {
|
|
}
|
|
|
|
func (c depsCataloger) Name() string {
|
|
return "dotnet-deps-cataloger"
|
|
}
|
|
|
|
func (c depsCataloger) Catalog(_ context.Context, resolver file.Resolver) ([]pkg.Package, []artifact.Relationship, error) {
|
|
depJSONDocs, unknowns, err := findDepsJSON(resolver)
|
|
if err != nil {
|
|
return nil, nil, err
|
|
}
|
|
|
|
pkgs, rels := packagesFromDepsJSON(depJSONDocs, CatalogerConfig{
|
|
DepPackagesMustHaveDLL: false,
|
|
DepPackagesMustClaimDLL: false,
|
|
})
|
|
return pkgs, rels, unknowns
|
|
}
|