Skip to content

Commit 6883d76

Browse files
authored
Manage 'remote' value of exploit_type in Aqua in case of several values (#1247)
1 parent 20b2e70 commit 6883d76

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Added
66

77
### Changed
8+
* Manage 'remote' value of exploit_type in Aqua in case of several values ([#1247](https://github.com/opendevstack/ods-jenkins-shared-library/pull/1247))
89

910
### Fixed
1011
* Log correct error message for wrong preview-branch value ([#1249](https://github.com/opendevstack/ods-jenkins-shared-library/pull/1249))

src/org/ods/component/ScanWithAquaStage.groovy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,8 @@ class ScanWithAquaStage extends Stage {
423423
aquaJsonMap.resources.each { it ->
424424
(it as Map).vulnerabilities.each { vul ->
425425
Map vulnerability = vul as Map
426-
if ((vulnerability?.exploit_type as String)?.equalsIgnoreCase(REMOTE_EXPLOIT_TYPE)
426+
if ((vulnerability?.exploit_type as String)?.split(',')*.trim()
427+
.any { it.equalsIgnoreCase(REMOTE_EXPLOIT_TYPE) }
427428
&& (vulnerability?.aqua_severity as String)?.equalsIgnoreCase(CRITICAL_AQUA_SEVERITY)
428429
&& !StringUtils.isEmpty((vulnerability?.solution as String).trim())) {
429430
if (Boolean.parseBoolean(vulnerability?.already_acknowledged as String)) {

test/resources/org/ods/component/aqua-test-result.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1114,7 +1114,7 @@
11141114
"aqua_severity_classification": "NVD CVSS V3 Score: 10.0",
11151115
"aqua_score_classification": "NVD CVSS V3 Score: 10.0",
11161116
"exploitability": "http://www.exploit-db.com/exploits/50592",
1117-
"exploit_type": "remote",
1117+
"exploit_type": "remote,CISA",
11181118
"cwe_info": [
11191119
{
11201120
"Id": "CWE-20",

0 commit comments

Comments
 (0)