(fix) Exclude dev dependencies from npm's package-lock.json and Fix Java DB download endpoint (#1893)
* (fix) Exclude dev dependencies from npm's package-lock.json * chore(integration) update * choir(integration) add lib scan names to makefile * fix(javadb) add schema version only once
This commit is contained in:
committed by
GitHub
parent
cfbe47bd99
commit
8f4025120d
@@ -4,12 +4,19 @@ import (
|
||||
ftypes "github.com/aquasecurity/trivy/pkg/fanal/types"
|
||||
"github.com/aquasecurity/trivy/pkg/purl"
|
||||
"github.com/aquasecurity/trivy/pkg/types"
|
||||
"github.com/samber/lo"
|
||||
|
||||
"github.com/future-architect/vuls/logging"
|
||||
"github.com/future-architect/vuls/models"
|
||||
)
|
||||
|
||||
func convertLibWithScanner(apps []ftypes.Application) ([]models.LibraryScanner, error) {
|
||||
for i := range apps {
|
||||
apps[i].Libraries = lo.Filter(apps[i].Libraries, func(lib ftypes.Package, index int) bool {
|
||||
return !lib.Dev
|
||||
})
|
||||
}
|
||||
|
||||
scanners := make([]models.LibraryScanner, 0, len(apps))
|
||||
for _, app := range apps {
|
||||
libs := make([]models.Library, 0, len(app.Libraries))
|
||||
|
||||
Reference in New Issue
Block a user