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,6 +399,7 @@ func runCodeqlExecuteScan(config *codeqlExecuteScanOptions, telemetryData *telem
|
||||
|
||||
if config.CheckForCompliance {
|
||||
for _, scanResult := range scanResults {
|
||||
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)
|
||||
@ -407,6 +408,7 @@ func runCodeqlExecuteScan(config *codeqlExecuteScanOptions, telemetryData *telem
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
addDataToInfluxDB(repoUrl, repoReference, repoCodeqlScanUrl, config.QuerySuite, scanResults, influx)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user