From 10b18a4d62fb96becb7cd1eb02638ab2e23a19e1 Mon Sep 17 00:00:00 2001 From: Silje Enge Kristensen Date: Wed, 14 Jun 2023 08:29:43 +0200 Subject: [PATCH] feat: output the entire scan result to the github summary --- .github/workflows/workflow.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index d827e75..980488d 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -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/trivy-action@0.11.2 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