* chore(deps): bump github.com/aquasecurity/trivy from 0.27.1 to 0.30.0 Bumps [github.com/aquasecurity/trivy](https://github.com/aquasecurity/trivy) from 0.27.1 to 0.30.0. - [Release notes](https://github.com/aquasecurity/trivy/releases) - [Changelog](https://github.com/aquasecurity/trivy/blob/main/goreleaser.yml) - [Commits](https://github.com/aquasecurity/trivy/compare/v0.27.1...v0.30.0) --- updated-dependencies: - dependency-name: github.com/aquasecurity/trivy dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * chore(deps): bump github.com/aquasecurity/trivy from 0.30.0 to 0.30.2 * fix(library): change fanal to trivy/pkg/fanal * chore: update integration Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: MaineK00n <mainek00n.1229@gmail.com>
		
			
				
	
	
		
			27 lines
		
	
	
		
			637 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			637 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package scanner
 | 
						|
 | 
						|
import (
 | 
						|
	"github.com/aquasecurity/trivy/pkg/fanal/types"
 | 
						|
	"github.com/future-architect/vuls/models"
 | 
						|
)
 | 
						|
 | 
						|
func convertLibWithScanner(apps []types.Application) ([]models.LibraryScanner, error) {
 | 
						|
	scanners := []models.LibraryScanner{}
 | 
						|
	for _, app := range apps {
 | 
						|
		libs := []models.Library{}
 | 
						|
		for _, lib := range app.Libraries {
 | 
						|
			libs = append(libs, models.Library{
 | 
						|
				Name:     lib.Name,
 | 
						|
				Version:  lib.Version,
 | 
						|
				FilePath: lib.FilePath,
 | 
						|
			})
 | 
						|
		}
 | 
						|
		scanners = append(scanners, models.LibraryScanner{
 | 
						|
			Type:         app.Type,
 | 
						|
			LockfilePath: app.FilePath,
 | 
						|
			Libs:         libs,
 | 
						|
		})
 | 
						|
	}
 | 
						|
	return scanners, nil
 | 
						|
}
 |