diff --git a/.github/workflows/trivy.yml b/.github/workflows/trivy.yml index 1d5d573..9aad808 100644 --- a/.github/workflows/trivy.yml +++ b/.github/workflows/trivy.yml @@ -7,17 +7,14 @@ jobs: trivy: name: Security check runs-on: ubuntu-latest - env: - IMAGE_NAME: docker.io/pranc1ngpegasus/go-template steps: - name: Checkout code uses: actions/checkout@v3 - - name: Build an image from Dockerfile - run: docker build -t ${{ env.IMAGE_NAME }}:${{ github.sha }} . - name: Run Trivy vulnerability scanner uses: aquasecurity/trivy-action@master with: - image-ref: '${{ env.IMAGE_NAME }}:${{ github.sha }}' + scan-type: 'fs' + scan-ref: '.' format: 'sarif' output: 'trivy-results.sarif' - name: Upload Trivy scan results to GitHub Security tab