mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-12 10:55:20 +02:00
fix(codeqlExecuteScan): check for compliance for Audit All (#4796)
Co-authored-by: sumeet patil <sumeet.patil@sap.com>
This commit is contained in:
parent
33b8c489f9
commit
4be7b99f95
@ -399,10 +399,12 @@ func runCodeqlExecuteScan(config *codeqlExecuteScanOptions, telemetryData *telem
|
||||
|
||||
if config.CheckForCompliance {
|
||||
for _, scanResult := range scanResults {
|
||||
unaudited := scanResult.Total - scanResult.Audited
|
||||
if unaudited > config.VulnerabilityThresholdTotal {
|
||||
msg := fmt.Sprintf("Your repository %v with ref %v is not compliant. Total unaudited issues are %v which is greater than the VulnerabilityThresholdTotal count %v", repoUrl, repoInfo.Ref, unaudited, config.VulnerabilityThresholdTotal)
|
||||
return reports, errors.Errorf(msg)
|
||||
if scanResult.ClassificationName == codeql.AuditAll {
|
||||
unaudited := scanResult.Total - scanResult.Audited
|
||||
if unaudited > config.VulnerabilityThresholdTotal {
|
||||
msg := fmt.Sprintf("Your repository %v with ref %v is not compliant. Total unaudited issues are %v which is greater than the VulnerabilityThresholdTotal count %v", repoUrl, repoInfo.Ref, unaudited, config.VulnerabilityThresholdTotal)
|
||||
return reports, errors.Errorf(msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user