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 Nov 30, 2020
1 parent 7bd75b0 commit f872458
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 f872458

Please sign in to comment.