diff --git a/.github/workflows/ci-image-scanning-on-schedule.yml b/.github/workflows/ci-image-scanning-on-schedule.yml index 5261657c058e..af5a907334c1 100644 --- a/.github/workflows/ci-image-scanning-on-schedule.yml +++ b/.github/workflows/ci-image-scanning-on-schedule.yml @@ -47,7 +47,10 @@ jobs: export REGISTRY="docker.io/karmada" make image-${{ matrix.target }} - name: Run Trivy vulnerability scanner - uses: aquasecurity/trivy-action@0.24.0 + uses: aquasecurity/trivy-action@0.26.0 + env: + ACTIONS_RUNTIME_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TRIVY_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-db,public.ecr.aws/aquasecurity/trivy-db with: image-ref: 'docker.io/karmada/${{ matrix.target }}:${{ matrix.karmada-version }}' format: 'sarif' @@ -55,7 +58,10 @@ jobs: vuln-type: 'os,library' output: '${{ matrix.target }}:${{ matrix.karmada-version }}.trivy-results.sarif' - name: display scan results - uses: aquasecurity/trivy-action@0.24.0 + uses: aquasecurity/trivy-action@0.26.0 + env: + TRIVY_SKIP_DB_UPDATE: true # avoid repeatedly updating the Vulnerability DB + TRIVY_DISABLE_VEX_NOTICE: true # disable VEX notice with: image-ref: 'docker.io/karmada/${{ matrix.target }}:${{ matrix.karmada-version }}' format: 'table' diff --git a/.github/workflows/ci-image-scanning.yaml b/.github/workflows/ci-image-scanning.yaml index acfece19404f..39739e38e5cf 100644 --- a/.github/workflows/ci-image-scanning.yaml +++ b/.github/workflows/ci-image-scanning.yaml @@ -42,7 +42,10 @@ jobs: export REGISTRY="docker.io/karmada" make image-${{ matrix.target }} - name: Run Trivy vulnerability scanner - uses: aquasecurity/trivy-action@0.24.0 + uses: aquasecurity/trivy-action@0.26.0 + env: + ACTIONS_RUNTIME_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TRIVY_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-db,public.ecr.aws/aquasecurity/trivy-db with: image-ref: 'docker.io/karmada/${{ matrix.target }}:latest' format: 'sarif' @@ -50,7 +53,10 @@ jobs: vuln-type: 'os,library' output: 'trivy-results.sarif' - name: display scan results - uses: aquasecurity/trivy-action@0.24.0 + uses: aquasecurity/trivy-action@0.26.0 + env: + TRIVY_SKIP_DB_UPDATE: true # avoid repeatedly updating the Vulnerability DB + TRIVY_DISABLE_VEX_NOTICE: true # disable VEX notice with: image-ref: 'docker.io/karmada/${{ matrix.target }}:latest' format: 'table'