Skip to content

fix(ci): point Grype at shared RO node cache instead of copying - #39

Merged
miragecentury merged 1 commit into
mainfrom
fix/grype-shared-cache
Aug 21, 2026
Merged

fix(ci): point Grype at shared RO node cache instead of copying#39
miragecentury merged 1 commit into
mainfrom
fix/grype-shared-cache

Conversation

@miragecentury

Copy link
Copy Markdown
Contributor

Summary

  • Drop Grype DB copies from mandatory-only and dependency-scan.
  • Point GRYPE_DB_CACHE_DIR at /var/cache/grype-db with GRYPE_DB_AUTO_UPDATE=false.

Depends on Laelidona/velmios-infrastructure#15 for a valid shared DB + expanded PVC.

Test plan

  • mandatory-only and dependency-scan complete without ENOSPC after infra merge

Made with Cursor

Stop copying the DB into $RUNNER_TEMP / $HOME/.cache. Point
GRYPE_DB_CACHE_DIR at the RO /var/cache/grype-db mount with
auto-update off so mandatory-only and dependency-scan no longer
ENOSPC or waste ~2GiB RAM per job.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI lite review requested due to automatic review settings August 21, 2026 18:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates CI vulnerability scanning to avoid copying the Grype database into runner-local caches by directly using a shared (read-only) Grype DB mount, aiming to eliminate ENOSPC failures on limited tmpfs-backed cache locations.

Changes:

  • Removes the “seed Grype DB from node cache” copy steps from mandatory-only and dependency-scan.
  • Sets GRYPE_DB_CACHE_DIR=/var/cache/grype-db and disables auto-updates via GRYPE_DB_AUTO_UPDATE=false for Grype runs.
  • Documents the CI change in the Unreleased changelog.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
CHANGELOG.md Notes the CI Grype DB behavior change and motivation (avoid ENOSPC / wasted RAM).
.github/workflows/ci.yml Stops copying the Grype DB into $HOME and points Grype to the shared node cache mount with auto-update disabled.
Suppressed comments (1)

.github/workflows/ci.yml:149

  • This step assumes the shared Grype DB mount is always present and disables auto-update. If the cache is missing/cold (or the mount isn’t available on some runners), Grype will error out rather than downloading a DB. Consider gating the shared-cache settings on /var/cache/grype-db/6 existing and falling back to a writable cache under $RUNNER_TEMP with auto-update enabled.
        env:
          REPO_NAME: ${{ github.event.repository.name }}
          # Shared RO Grype DB on the runner mount (no copy into 2Gi tmpfs).
          GRYPE_DB_CACHE_DIR: /var/cache/grype-db
          GRYPE_DB_AUTO_UPDATE: "false"

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/ci.yml
Comment on lines 72 to +76
env:
REPO_NAME: ${{ github.event.repository.name }}
# Shared RO Grype DB on the runner mount (no copy into 2Gi tmpfs).
GRYPE_DB_CACHE_DIR: /var/cache/grype-db
GRYPE_DB_AUTO_UPDATE: "false"
@miragecentury
miragecentury merged commit 1d9e950 into main Aug 21, 2026
12 of 14 checks passed
@miragecentury
miragecentury deleted the fix/grype-shared-cache branch August 21, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants