Skip to content

Commit

Permalink
Updated nuget driver to use correct name and to initialize with the n…
Browse files Browse the repository at this point in the history
…ew generic scanner.

Signed-off-by: Johannes Tegnér <[email protected]>
  • Loading branch information
Johannestegner committed Dec 4, 2020
1 parent 4d2c479 commit 12806e7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/detector/library/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (d DriverFactory) NewDriver(filename string) (Driver, error) {
case "Pipfile.lock", "poetry.lock":
driver = newPipDriver()
case "packages.lock.json":
driver = newCSharpDriver()
driver = newNugetDriver()
default:
return Driver{}, xerrors.New(fmt.Sprintf("unsupport filename %s", filename))
}
Expand Down Expand Up @@ -117,6 +117,7 @@ func newPipDriver() Driver {
NewAdvisory(vulnerability.Pip, c))
}

func newCSharpDriver() Driver {
return NewDriver(vulnerability.CSharp, ghsa.NewAdvisory(ecosystem.Nuget))
func newNugetDriver() Driver {
c := comparer.GenericComparer{}
return NewDriver(ghsa.NewAdvisory(ecosystem.Nuget, c))
}

0 comments on commit 12806e7

Please sign in to comment.