Skip to content

Commit 5d04bd7

Browse files
mbolognaclaude
andcommitted
fix: clear stale Grype DB cache before weekly security scan
The weekly schedule means the cached grype DB is always >5 days old (exceeding grype's max allowed age), causing the scan to fail. Clear the cache dir before each grype run so it always fetches a fresh DB. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent b888ed3 commit 5d04bd7

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/build-scan-push.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,10 @@ jobs:
178178
severity: CRITICAL,HIGH,MEDIUM
179179
timeout: 10m
180180

181+
- name: Clear stale Grype DB cache
182+
if: matrix.scanner == 'grype'
183+
run: rm -rf ~/.cache/grype/db
184+
181185
- name: Run Grype vulnerability scanner
182186
if: matrix.scanner == 'grype'
183187
uses: anchore/scan-action@v4

0 commit comments

Comments
 (0)