Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ func addSimpleJsonLicenseViolation(licenseViolationsRows *[]formats.LicenseRow,
return func(violation services.Violation, cves []formats.CveRow, applicabilityStatus jasutils.ApplicabilityStatus, severity severityutils.Severity, impactedPackagesName, impactedPackagesVersion, impactedPackagesType string, fixedVersion []string, directComponents []formats.ComponentRow, impactPaths [][]formats.ComponentRow) error {
*licenseViolationsRows = append(*licenseViolationsRows,
formats.LicenseRow{
LicenseKey: violation.LicenseKey,
LicenseKey: getLicenseKey(violation.LicenseKey, violation.IssueId),
ImpactedDependencyDetails: formats.ImpactedDependencyDetails{
SeverityDetails: severityutils.GetAsDetails(severity, applicabilityStatus, pretty),
ImpactedDependencyName: impactedPackagesName,
Expand All @@ -246,6 +246,13 @@ func addSimpleJsonLicenseViolation(licenseViolationsRows *[]formats.LicenseRow,
}
}

func getLicenseKey(licenseKey, issueId string) string {
if licenseKey == "" {
return issueId
}
return licenseKey
}

func addSimpleJsonOperationalRiskViolation(operationalRiskViolationsRows *[]formats.OperationalRiskViolationRow, pretty bool) results.ParseScaViolationFunc {
return func(violation services.Violation, cves []formats.CveRow, applicabilityStatus jasutils.ApplicabilityStatus, severity severityutils.Severity, impactedPackagesName, impactedPackagesVersion, impactedPackagesType string, fixedVersion []string, directComponents []formats.ComponentRow, impactPaths [][]formats.ComponentRow) error {
violationOpRiskData := getOperationalRiskViolationReadableData(violation)
Expand Down
Loading