chore(deps): bump github.com/aquasecurity/trivy from 0.51.1 to 0.51.2 (#1928)
* --- updated-dependencies: - dependency-name: github.com/aquasecurity/trivy dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * chore(deps): go mod tidy * chore(deps): follow type name change --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Shunichi Shinohara <shino.shun@gmail.com>
This commit is contained in:
		@@ -12,15 +12,15 @@ import (
 | 
			
		||||
 | 
			
		||||
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 {
 | 
			
		||||
		apps[i].Packages = lo.Filter(apps[i].Packages, 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))
 | 
			
		||||
		for _, lib := range app.Libraries {
 | 
			
		||||
		libs := make([]models.Library, 0, len(app.Packages))
 | 
			
		||||
		for _, lib := range app.Packages {
 | 
			
		||||
			libs = append(libs, models.Library{
 | 
			
		||||
				Name:     lib.Name,
 | 
			
		||||
				Version:  lib.Version,
 | 
			
		||||
 
 | 
			
		||||
@@ -90,9 +90,9 @@ func toApplication(rootFilePath string, libs []jarLibrary) *types.Application {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return &types.Application{
 | 
			
		||||
		Type:      types.Jar,
 | 
			
		||||
		FilePath:  rootFilePath,
 | 
			
		||||
		Libraries: pkgs,
 | 
			
		||||
		Type:     types.Jar,
 | 
			
		||||
		FilePath: rootFilePath,
 | 
			
		||||
		Packages: pkgs,
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user