Skip to content

Commit

Permalink
feat: output the entire scan result to the github summary
Browse files Browse the repository at this point in the history
  • Loading branch information
siljekristensen committed Jun 15, 2023
1 parent 3f3fa35 commit 10b18a4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit 10b18a4

Please sign in to comment.