diff --git a/.github/workflows/nightly-vuln-scanning.yml b/.github/workflows/nightly-vuln-scanning.yml index bdb13a53..6c7617b9 100644 --- a/.github/workflows/nightly-vuln-scanning.yml +++ b/.github/workflows/nightly-vuln-scanning.yml @@ -20,7 +20,6 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: Run Trivy vulnerability scanner - id: scanner uses: aquasecurity/trivy-action@0.20.0 with: image-ref: 'ghcr.io/pulibrary/dpul-collections:main' @@ -31,15 +30,15 @@ jobs: severity: 'CRITICAL,HIGH' output: 'vulnerabilities.table' - name: Set variables - run: | - VULN=$(cat vulnerabilities.table) - echo "SCANNER_OUTPUT=$VULN" >> $GITHUB_ENV + id: scanner + run: echo "results=$(cat vulnerabilities.table)" >> $GITHUB_OUTPUT - name: Create issue if: failure() uses: JasonEtco/create-an-issue@v2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} WORKFLOW_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + SCANNER_OUTPUTS: ${{ steps.scanner.outputs.results }} with: filename: .github/failed-vuln-check.md update_existing: true