Repository navigation
Conversation
trivy-action saved a 1 GB cache-trivy-<date> entry for every pull request and every day. Nine of them filled the 10 GB Actions cache and evicted the BuildKit layers of the DEV image build (7 of 142 steps cached, "blob not found"). - Every trivy-action step restores the newest entry with actions/cache/restore and runs with cache: "false" - New "Trivy database cache" workflow downloads both databases daily through the three mirrors and saves them on main - Cache cleanup keeps only the newest Trivy entry
nvuillam
requested review from
Kurt-von-Laven,
bdovaz and
echoix
as code owners
December 4, 2026 08:39
Contributor
✅
|
This was referenced Dec 4, 2026
- Remove the temporary diagnostic step merged with #9674 - @salesforce/plugin-code-analyzer 5.16.0 -> 5.17.0 (websocket-driver 0.8.2) and npm-package-json-lint 11.0.1 -> 11.4.0 (minimatch 11.0.9) - Ignore, with the reason, the advisories without a reachable fix: cross-spawn and ws locked by the Code Analyzer shrinkwrap (Windows-only injection, client-side pong DoS) and tar bundled in npm 11 (build-time extraction of registry tarballs only)
…n-only # Conflicts: # CHANGELOG.md
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Problem
The Docker layer cache of the DEV image build is evicted: the build of PR #8813 restored 7 of 142 steps from cache and logged
ERROR: blob sha256:...: not found, so it rebuilt the image almost from scratch (7.8 min of build).The Actions cache of the repository is at 9.84 GB of 10 GB. 8 of its 9 biggest entries are
cache-trivy-<date>(about 1 GB each) onrefs/pull/<n>/merge:aquasecurity/trivy-actioncaches the Trivy databases by default, with a key that changes every day, so every pull request saves its own copy every day. GitHub then evicts the BuildKit blobs to stay under 10 GB.Fix
trivy-actionstep (8 workflows) restores the newest Trivy cache withactions/cache/restoreand runs withcache: "false": it uses the restored databases (the action always setsTRIVY_CACHE_DIRtocache-dir) and downloads fresh ones only when they are stale, without saving them.Trivy database cacheworkflow (daily 02:30 UTC + manual): downloads the vulnerability and Java databases through the three mirrors used byREPOSITORY_TRIVY(with retries) and saves them on main, where every branch and pull request can read them.actions/cache/savesaves them even when no scan runs, unlike the action's post step, which skips the save when the job fails (main only had an entry from 2026-11-26).cache-trivy-*entry.Dry run of the new cleanup pass on today's cache list (read-only): it keeps the main entry and would delete the 8 pull request copies, about 8.4 GB.
Side effect
With
cache: false,setup-trivyno longer caches the 46 MB Trivy binary either: each job downloads it from the GitHub release (a few seconds).Verification
cache: "false"(checked by parsing every workflow).zizmor(offline, medium+): no findings on the changed workflows.After merge
Aftercell of the CHANGELOG table. If the build still restores less than about 80% of its steps, the next step is a registry cache on ghcr.io for the main image (no 10 GB limit there).This is the first of three CI speed changes (then: linter matrix selection, per-job disk preparation).
Also: fix Trivy scan - DEV (required check failing on every pull request)
#9674 was merged with Trivy errors and its temporary diagnostic step. This PR removes the step and fixes the 12 advisories it located in the image:
@salesforce/plugin-code-analyzer)npm-package-json-lint)@salesforce/clithroughnpm ^11.21.0)The Dockerfiles are regenerated by
build.py; the native locks of the two linters are left to the Native locks workflow.