From 6aa465188c86a35b80cdfda6d6cdeff2942c95cb Mon Sep 17 00:00:00 2001 From: lorenzodagostinoradicalbit Date: Wed, 26 Jun 2024 10:41:02 +0200 Subject: [PATCH] fix(ci): removed default running directory, fix template name --- .github/workflows/trivy-fs-scan.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/trivy-fs-scan.yaml b/.github/workflows/trivy-fs-scan.yaml index 5394216..ba62752 100644 --- a/.github/workflows/trivy-fs-scan.yaml +++ b/.github/workflows/trivy-fs-scan.yaml @@ -39,9 +39,6 @@ jobs: run-scan: name: Run Trivy vulnerability scanner runs-on: ubuntu-22.04 - defaults: - run: - working-directory: ${{ inputs.directory }} steps: - name: Checkout code uses: actions/checkout@v4 @@ -56,11 +53,12 @@ jobs: scan-type: 'fs' ignore-unfixed: true format: 'template' - template: 'trivy-pr-comment.tpl' + template: '@trivy-pr-comment.tpl' output: 'trivy.json' severity: ${{ inputs.severity }} skip-dirs: ${{ inputs.skip_dirs }} exit-code: ${{ inputs.prcomment && '1' || '0' }} + scan-ref: '${{ inputs.directory }}' - name: Report vulnerabilities in PR if: ${{ inputs.prcomment && failure() && steps.scan.outcome == 'failure' }}