Skip to content

Commit

Permalink
fix: SSC: Fix application version link in appversion-summary & `bit…
Browse files Browse the repository at this point in the history
…bucket-sast-report` actions
  • Loading branch information
rsenden committed Aug 21, 2024
1 parent f44fe37 commit 4f40a04
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,12 @@ public String issueBrowserUrl(ObjectNode issue, ObjectNode filterset) {
}
return templateRunner.getSpelEvaluator().evaluate(SpelHelper.parseTemplateExpression(deepLinkExpression), issue, String.class);
}
public String appversionBrowserUrl(ObjectNode appversion) {
public String appversionBrowserUrl(ObjectNode appversion, ObjectNode filterset) {
var deepLinkExpression = baseUrl()
+"/html/ssc/index.jsp#!/version/${id}/fix";
+"/html/ssc/version/${id}/audit";
if ( filterset!=null ) {
deepLinkExpression+="?filterSet="+filterset.get("guid").asText();
}
return templateRunner.getSpelEvaluator().evaluate(SpelHelper.parseTemplateExpression(deepLinkExpression), appversion, String.class);
}
private String baseUrl() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ valueTemplates:
contents: |
# SSC Application Version Summary
## [${parameters.appversion.project.name} - ${parameters.appversion.name}](${#ssc.appversionBrowserUrl(parameters.appversion)})
## [${parameters.appversion.project.name} - ${parameters.appversion.name}](${#ssc.appversionBrowserUrl(parameters.appversion,null)})
Summary generated on: ${#formatDateTime(dateFmt)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ valueTemplates:
details: Fortify detected ${annotations?.size()?:0} static ${annotations?.size()==1 ? 'vulnerability':'vulnerabilities'}
#external_id:
reporter: Fortify Static Code Analyzer ${lastStaticScan?.engineVersion?:''}
link: ${#ssc.appversionBrowserUrl(parameters.appversion)}
link: ${#ssc.appversionBrowserUrl(parameters.appversion,parameters.filterset)}
# remote_link_enabled:
logo_url: https://bitbucket.org/workspaces/fortifysoftware/avatar
report_type: SECURITY
Expand Down

0 comments on commit 4f40a04

Please sign in to comment.