Skip to content

Commit

Permalink
Fix message comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
zxBCN Valeriu_Tuguran,Constantin (IT EDP) EXTERNAL committed Sep 12, 2024
1 parent f10ce33 commit db4c7a3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/org/ods/component/ScanWithAquaStage.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ class ScanWithAquaStage extends Stage {
context.addArtifactURI('jiraComponentId', context.getComponentId())
context.addArtifactURI('gitUrl', context.getGitUrl())
context.addArtifactURI('gitBranch', context.getGitBranch())
context.addArtifactURI('repoName', context.getRepoName())
context.addArtifactURI('nexusReportLink', nexusReportLink)
String response = openShift.deleteImage(context.getComponentId() + ":" + context.getShortGitCommit())
logger.debug("Delete image response: " + response)
Expand Down
10 changes: 6 additions & 4 deletions src/org/ods/orchestration/BuildStage.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ class BuildStage extends Stage {
vulerabilityMap,
repo.data.openshift.gitUrl,
repo.data.openshift.gitBranch,
repo.data.openshift.repoName,
repo.data.openshift.nexusReportLink))
securityVulnerabilityIssueKeys.add(issueKey)
}
Expand Down Expand Up @@ -217,15 +218,16 @@ class BuildStage extends Stage {
}

String buildSecurityVulnerabilityIssueDescription(Map vulnerability, String gitUrl, String gitBranch,
String nexusReportLink) {
String repoName, String nexusReportLink) {
StringBuilder message = new StringBuilder()
message.append("\nh3.Aqua security scan detected the remotely exploitable critical " +
"vulnerability with name '${vulnerability.name as String}' in ${gitUrl} in branch ${gitBranch}." )
message.append("\nAqua security scan detected the remotely exploitable critical " +
"vulnerability with name *${vulnerability.name as String}* in repository *[${repoName}:${gitUrl}]* " +
"in branch *${gitBranch}*." )
message.append("\n*Description:* " + vulnerability.description as String)
message.append("\n\n*Solution:* " + vulnerability.solution as String)

if (nexusReportLink != null) {
message.append("\n\n*You can find the complete security scan report here:* " + nexusReportLink)
message.append("\n\nYou can find the complete security scan report *[here:${nexusReportLink}]*.")
}

return message.toString()
Expand Down

0 comments on commit db4c7a3

Please sign in to comment.