/
githubmirror
/
trivy
Обзор
Документация
Войти
/
githubmirror
/
trivy
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
pkg/types/license.go
36 строк
998 B
Nikita Pivkin
feat: allow ignoring findings by type in Rego (#9578)
06 окт 2025, 21:17
Не верифицирован
06 окт 2025, 21:17
c638fc6
Код
Авторство
О чём код?
package types import ( "github.com/aquasecurity/trivy/pkg/fanal/types" ) type DetectedLicense struct { // Severity is the consistent parameter indicating how severe the issue is Severity string // Category holds the license category such as "forbidden" Category types.LicenseCategory // PkgName holds a package name of the license. // It will be empty if FilePath is filled. PkgName string // PkgName holds a file path of the license. // It will be empty if PkgName is filled. FilePath string // for file license // Name holds a detected license name Name string // Text holds a long license text if Trivy detects a license name as a license text Text string // Confidence is level of the match. The confidence level is between 0.0 and 1.0, with 1.0 indicating an // exact match and 0.0 indicating a complete mismatch Confidence float64 // Link is a SPDX link of the license Link string } func (DetectedLicense) FindingType() FindingType { return FindingTypeLicense }