Skip to content

Commit

Permalink
Merge pull request nrkno#1267 from nrkno/ci/trivy-db-image-rate-limiting
Browse files Browse the repository at this point in the history
ci: use custom trivy database image
  • Loading branch information
jstarpl authored Sep 26, 2024
2 parents 56a5a6c + ccaeedb commit fcea309
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ jobs:
if: steps.check-build-and-push.outputs.enable == 'true' && steps.check-ghcr.outputs.enable == 'true' && steps.ghcr-tag.outputs.tags != 0
uses: aquasecurity/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db
with:
image-ref: "${{ steps.trivy-image.outputs.image }}"
format: "table"
Expand Down Expand Up @@ -383,6 +383,8 @@ jobs:
- name: Trivy scanning
if: steps.check-build-and-push.outputs.enable == 'true' && steps.check-ghcr.outputs.enable == 'true' && steps.ghcr-tag.outputs.tags != 0
uses: aquasecurity/[email protected]
env:
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db
with:
image-ref: "${{ steps.trivy-image.outputs.image }}"
format: "table"
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,17 @@ jobs:
steps:
- name: Run Trivy vulnerability scanner (json)
uses: aquasecurity/[email protected]
env:
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db
with:
image-ref: ghcr.io/nrkno/sofie-core-${{ matrix.image }}:latest
format: json
output: '${{ matrix.image }}-trivy-scan-results.json'

- name: Run Trivy vulnerability scanner (table)
uses: aquasecurity/[email protected]
env:
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db
with:
image-ref: ghcr.io/nrkno/sofie-core-${{ matrix.image }}:latest
output: '${{ matrix.image }}-trivy-scan-results.txt'
Expand All @@ -37,6 +41,8 @@ jobs:
- name: Run Trivy in GitHub SBOM mode and submit results to Dependency Graph
uses: aquasecurity/[email protected]
env:
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db
with:
format: 'github'
output: 'dependency-results-${{ matrix.image }}.sbom.json'
Expand Down

0 comments on commit fcea309

Please sign in to comment.