github.com/devseccon/trivy@v0.47.1-0.20231123133102-bd902a0bd996/pkg/types/license.go (about) 1 package types 2 3 import ( 4 "github.com/devseccon/trivy/pkg/fanal/types" 5 ) 6 7 type DetectedLicense struct { 8 // Severity is the consistent parameter indicating how severe the issue is 9 Severity string 10 11 // Category holds the license category such as "forbidden" 12 Category types.LicenseCategory 13 14 // PkgName holds a package name of the license. 15 // It will be empty if FilePath is filled. 16 PkgName string 17 18 // PkgName holds a file path of the license. 19 // It will be empty if PkgName is filled. 20 FilePath string // for file license 21 22 // Name holds a detected license name 23 Name string 24 25 // Confidence is level of the match. The confidence level is between 0.0 and 1.0, with 1.0 indicating an 26 // exact match and 0.0 indicating a complete mismatch 27 Confidence float64 28 29 // Link is a SPDX link of the license 30 Link string 31 }