Manage the CVE Database¶
This guide covers keeping CVE scanning fast and reliable in a meta-tolomeo build.
Prerequisites¶
- An integration project with its own distro configuration; see Build Your Own BSP Layer
- A GitLab project with access to pipeline schedules, for the scheduled refresh
Enable CVE Scanning¶
Require the CVE-check include in your distro configuration:
This inherits cve-check, so every recipe's do_cve_check runs against the local NVD database.
Use an NVD API Key¶
An NVD API key raises the request rate limit and reduces throttling. Provide it through the environment (for example, a masked GitLab CI/CD variable) — it is picked up automatically:
Seed a Fresh Build from a Backup¶
A from-scratch NVD download is slow and can fail. To avoid it, CVE_DB_BACKUP_URL points at a
pre-populated database that is downloaded into the downloads directory before the fetch, but only
when no database is present yet. The default points at the shared cache mirror; the server's
Last-Modified time is preserved so the stock recipe can still do a small incremental top-up.
Point CVE_DB_BACKUP_URL at your own mirror to seed from it, or leave it unset to accept the
one-time full NVD download.
Refresh the Shared Database on a Schedule¶
meta-tolomeo ships a refresh-cve-db CI job (ci/branch-workflow.yml) that updates the shared database in place.
Activate it by creating a GitLab pipeline schedule with:
- Branch: your stable branch (e.g.
scarthgap) — required so the job uses the shared cache. - Cadence: once or twice a day.
- Variable:
SCHEDULE_TYPE=cve-db.
Skip the Update on Feature Builds¶
Feature builds seed from the shared database and skip the network update entirely by setting:
meta-tolomeo already sets this on build:devel.
Troubleshooting¶
Full NVD download on every build¶
CVE_DB_BACKUP_URL is unset or unreachable. Check the CVE database seed: warnings in the log and confirm the URL serves
the database; run the scheduled refresh to populate it.
Fetch still slow on feature branches¶
A stale backup forces a large incremental update. Confirm the scheduled refresh runs and NVDCVE_API_KEY is set.
CVE database ... not present ... skipped¶
CVE_DB_UPDATE_INTERVAL=-1 is set and no database is available. Ensure the seed succeeds, or allow an update (0 or the
default) to populate it.
See also
- CVE Database — variables, paths, and CI refresh job
- CVE Database Freshness — the seed and refresh strategy
- Export SBOM and VEX — SBOM/VEX generation and kernel CVE enrichment