From 727f009711f7bfe049474b2c2bc8da5702a1ee57 Mon Sep 17 00:00:00 2001 From: Ruud Senden <8635138+rsenden@users.noreply.github.com> Date: Mon, 15 Apr 2024 15:00:55 +0200 Subject: [PATCH] chore: Action & resource bundle updates --- .../ssc/actions/zip/appversion-summary.yaml | 49 +++++++++---------- .../cli/ssc/i18n/SSCMessages.properties | 2 +- 2 files changed, 25 insertions(+), 26 deletions(-) diff --git a/fcli-core/fcli-ssc/src/main/resources/com/fortify/cli/ssc/actions/zip/appversion-summary.yaml b/fcli-core/fcli-ssc/src/main/resources/com/fortify/cli/ssc/actions/zip/appversion-summary.yaml index 2d470db2ba..fd4153a332 100644 --- a/fcli-core/fcli-ssc/src/main/resources/com/fortify/cli/ssc/actions/zip/appversion-summary.yaml +++ b/fcli-core/fcli-ssc/src/main/resources/com/fortify/cli/ssc/actions/zip/appversion-summary.yaml @@ -38,33 +38,32 @@ steps: - requests: - name: issueSelectorSet uri: /api/v1/projectVersions/${parameters.appversion.id}/issueSelectorSet?fields=filterBySet - - # Collect analysis types from SSC issue selector filter by sets, - # and collect latest scan for each analysis type - - forEach: - values: ${issueSelectorSet.filterBySet.^[displayName=='Analysis Type'].selectorOptions} - name: analysisType - do: - # Collect analysis types - - append: - - name: analysisTypes - value: ${analysisType} - # Load latest scan for current analysis type - - progress: Loading ${analysisType.displayName} scan data - - requests: - - name: artifactsResponse - uri: /api/v1/projectVersions/${parameters.appversion.id}/artifacts - type: paged - query: - embed: scans - forEach: - name: artifact - breakIf: ${lastScans!=null && lastScans[analysisType.guid]!=null} + - set: + - name: analysisTypes + value: ${issueSelectorSet.filterBySet.^[displayName=='Analysis Type'].selectorOptions} + - requests: + - if: ${analysisTypes!=null && analysisTypes.size()>0} + name: artifactsResponse + uri: /api/v1/projectVersions/${parameters.appversion.id}/artifacts + type: paged + query: + embed: scans + forEach: + name: artifact + breakIf: ${analysizedScans?.![type]?.containsAll(analysisTypes.![displayName])?:false} + do: + - forEach: + values: ${artifact._embed.scans} + name: scan do: - append: - - name: lastScans - property: ${analysisType.displayName} - value: ${artifact._embed.scans?.^[type==#root.analysisType.guid]} + - name: lastScans + if: ${lastScans==null || lastScans[scan.type]==null} + property: ${analysisTypes?.^[guid==#root.scan.type].displayName} + value: ${scan} + - name: analyzedScans + value: ${scan} + # Collect SSC filter set data, together with issue counts by analysis type & folder - requests: diff --git a/fcli-core/fcli-ssc/src/main/resources/com/fortify/cli/ssc/i18n/SSCMessages.properties b/fcli-core/fcli-ssc/src/main/resources/com/fortify/cli/ssc/i18n/SSCMessages.properties index 166f7eb240..61dfcc6609 100644 --- a/fcli-core/fcli-ssc/src/main/resources/com/fortify/cli/ssc/i18n/SSCMessages.properties +++ b/fcli-core/fcli-ssc/src/main/resources/com/fortify/cli/ssc/i18n/SSCMessages.properties @@ -1,7 +1,7 @@ # Used to 'productize' some descriptions defined in FortifyCLIMessages.properties product=SSC default-connect-timeout = 10 seconds -default-socket-timeout = 60 seconds +default-socket-timeout = 5 minutes # Make sure none of the commands inherit usage header or description of the top-level fcli command # Note that we define these as usage.* whereas our parent bundle defines fcli.usage.* (with fcli prefix).