Skip to content

Commit 660c14a

Browse files
committed
fix(ci): use ghcr.io for Trivy DB instead of mirror.gcr.io
mirror.gcr.io returns 404 when downloading the Trivy vulnerability DB, causing CI scans to fail with: FATAL: failed to download artifact from mirror.gcr.io/aquasec/trivy-db:2 Set TRIVY_DB_REPOSITORY and TRIVY_JAVA_DB_REPOSITORY env vars to use the official ghcr.io registry (ghcr.io/aquasecurity/trivy-db:2) in all workflows: security-scan.yml, release.yml, test.yml.
1 parent 391dd18 commit 660c14a

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,9 @@ jobs:
258258

259259
- name: Run Trivy vulnerability scanner
260260
uses: aquasecurity/trivy-action@master
261+
env:
262+
TRIVY_DB_REPOSITORY: 'ghcr.io/aquasecurity/trivy-db:2'
263+
TRIVY_JAVA_DB_REPOSITORY: 'ghcr.io/aquasecurity/trivy-java-db:1'
261264
with:
262265
image-ref: ${{ steps.image_name.outputs.full_ref }}
263266
format: 'sarif'

.github/workflows/security-scan.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ jobs:
185185
- name: Run Trivy vulnerability scanner (SARIF)
186186
if: steps.docker-build.outcome == 'success'
187187
uses: aquasecurity/trivy-action@master
188+
env:
189+
TRIVY_DB_REPOSITORY: 'ghcr.io/aquasecurity/trivy-db:2'
190+
TRIVY_JAVA_DB_REPOSITORY: 'ghcr.io/aquasecurity/trivy-java-db:1'
188191
with:
189192
image-ref: 'streamvault:scan'
190193
format: 'sarif'
@@ -203,6 +206,9 @@ jobs:
203206
- name: Run Trivy (table output for logs)
204207
if: steps.docker-build.outcome == 'success'
205208
uses: aquasecurity/trivy-action@master
209+
env:
210+
TRIVY_DB_REPOSITORY: 'ghcr.io/aquasecurity/trivy-db:2'
211+
TRIVY_JAVA_DB_REPOSITORY: 'ghcr.io/aquasecurity/trivy-java-db:1'
206212
with:
207213
image-ref: 'streamvault:scan'
208214
format: 'table'

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,9 @@ jobs:
230230

231231
- name: Run Trivy filesystem scanner
232232
uses: aquasecurity/trivy-action@master
233+
env:
234+
TRIVY_DB_REPOSITORY: 'ghcr.io/aquasecurity/trivy-db:2'
235+
TRIVY_JAVA_DB_REPOSITORY: 'ghcr.io/aquasecurity/trivy-java-db:1'
233236
with:
234237
scan-type: 'fs'
235238
scan-ref: '.'

0 commit comments

Comments
 (0)