-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
333 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
fcli-core/fcli-fod/src/main/resources/com/fortify/cli/fod/actions/zip/release-summary.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
usage: | ||
header: Generate release summary. | ||
description: | | ||
This action generates a short summary listing issue counts and other statistics | ||
for a given release. | ||
defaults: | ||
requestTarget: fod | ||
|
||
parameters: | ||
- name: file | ||
cliAliases: f | ||
description: "Optional output file name (or 'stdout' / 'stderr'). Default value: stdout" | ||
required: false | ||
defaultValue: stdout | ||
- name: release | ||
cliAliases: rel | ||
description: "Required release id or <appName>:[<microserviceName>:]<releaseName>" | ||
type: release_single | ||
|
||
steps: | ||
- set: | ||
# Add short alias for release object, as we reference it a lot | ||
- name: r | ||
value: ${parameters.release} | ||
# Define output date format | ||
- name: dateFmt | ||
value: YYYY-MM-dd HH:mm | ||
- write: | ||
- to: ${parameters.file} | ||
valueTemplate: summary-md | ||
- if: parameters.file!='stdout' | ||
to: stdout | ||
value: | | ||
Output written to ${parameters.file} | ||
valueTemplates: | ||
- name: summary-md | ||
contents: | | ||
# Fortify on Demand Release Summary | ||
## [${r.applicationName}${#isNotBlank(r.microserviceNae)?'- '+r.microserviceName:''} - ${r.releaseName}](${#fod.releaseBrowserUrl(r)}) | ||
Summary generated on: ${#formatDateTime(dateFmt)} | ||
### Security Policy | ||
**Rating:** ${#repeat("★", r.rating)}${#repeat("☆", 5-r.rating)} | ||
**Status:** ${r.isPassed?'Pass':'Fail'} | ||
### Issue Counts | ||
| Type | Last Scan Date | Critical | High | Medium | Low | | ||
| ----------- | ---------------- | -------- | -------- | -------- | -------- | | ||
${ | ||
#isNotBlank(r.staticScanDate)? '| **Static** | '+#formatDateTime(dateFmt, r.staticScanDate) +' | '+#fmt('%8s', r.staticCritical) +' | '+#fmt('%8s', r.staticHigh) +' | '+#fmt('%8s', r.staticMedium) +' | '+#fmt('%8s', r.staticLow) +' |\n':'' | ||
+#isNotBlank(r.dynamicScanDate)?'| **Dynamic** | '+#formatDateTime(dateFmt, r.dynamicScanDate)+' | '+#fmt('%8s', r.dynamicCritical)+' | '+#fmt('%8s', r.dynamicHigh)+' | '+#fmt('%8s', r.dynamicMedium)+' | '+#fmt('%8s', r.dynamicLow)+' |\n':'' | ||
+#isNotBlank(r.mobileScanDate)? '| **Mobile** | '+#formatDateTime(dateFmt, r.mobileScanDate) +' | '+#fmt('%8s', r.mobileCritical) +' | '+#fmt('%8s', r.mobileHigh) +' | '+#fmt('%8s', r.mobileMedium) +' | '+#fmt('%8s', r.mobileLow) +' |\n':'' | ||
} | ||
Oops, something went wrong.