Harbor Scanner Cache Refresh on Updated Vulnerability Database
0 reputation · 02 Jan 2026, 22:21 UTC
Harbor Scanner Cache Refresh on Updated Vulnerability Database
When the underlying vulnerability scanner (e.g., Trivy) updates its CVE database, Harbor may continue to serve scan results from its internal cache, leading to stale or incomplete vulnerability information. The goal is to understand how to trigger a cache refresh or override the cached data so that subsequent scans reflect the latest vulnerability data while respecting Harbor’s configuration constraints.
Key constraints include:
- Harbor stores scan results in PostgreSQL and does not automatically invalidate the cache when the scanner’s database changes.
- The UI and API provide a
force=truequery parameter for new scans, but this feature is only available in Harbor 2.2 and later. - Clearing scan data via the API removes audit history, which may conflict with compliance requirements.
- Enabling
scan_overwrite=truein Harbor’s scanner configuration replaces cached results automatically on subsequent scans.
Given these constraints, the following questions arise:
- What is the recommended sequence of API calls to force a fresh scan after the scanner’s database has been updated, without disrupting audit trails?
- How does Harbor’s
scan_overwriteflag interact with theforce=trueparameter when both are enabled? - In a compliance‑heavy environment, what best practices exist for clearing or overwriting cached scan results while preserving necessary audit information?