-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: output the entire scan result to the github summary
- Loading branch information
1 parent
3f3fa35
commit 10b18a4
Showing
1 changed file
with
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,10 +61,10 @@ on: | |
type: string | ||
default: MEDIUM,HIGH,CRITICAL | ||
description: Comma-separated list of severities to consider an error. | ||
summary-enabled: | ||
trivy-summary-enabled: | ||
type: boolean | ||
default: false | ||
description: Render a table of all the Trivy findings in the Github summary for the workflow | ||
description: Render a table of all the Trivy findings in the GitHub summary for the workflow. | ||
secrets: | ||
registry-username: | ||
description: Username for the container registry. | ||
|
@@ -148,7 +148,7 @@ jobs: | |
with: | ||
python-version: '3.11' | ||
- | ||
if: inputs.trivy-enabled && inputs.summary-enabled | ||
if: inputs.trivy-enabled && inputs.trivy-summary-enabled | ||
name: Scan for vulnerabilities (table format) | ||
uses: aquasecurity/[email protected] | ||
with: | ||
|
@@ -164,14 +164,14 @@ jobs: | |
- | ||
if: inputs.trivy-enabled && inputs.summary-enabled | ||
name: Post all scan results to Github Summary as a table | ||
env: | ||
CODE_BLOCK: "```" | ||
run: | | ||
echo "# Trivy scan results" >> $GITHUB_STEP_SUMMARY | ||
echo $CODE_BLOCK >> $GITHUB_STEP_SUMMARY | ||
cat ${{ steps.setup.outputs.unique-id }}-trivy-scan-result.txt >> $GITHUB_STEP_SUMMARY | ||
echo $CODE_BLOCK >> $GITHUB_STEP_SUMMARY | ||
env: | ||
CODE_BLOCK: "```" | ||
- | ||
if: inputs.trivy-enabled | ||
name: Scan for vulnerabilities | ||
|