Scanr uses a project-local cache for OSV responses.
Cache root:
.scanr/cache
Cache file naming:
{ecosystem}_{package}_{version}.json
Examples:
node_minimatch_10.2.2.jsonnode_rollup_4.57.1.jsonpython_requests_2.31.0.json
Each file stores:
{
"fetched_at": "2026-03-03T12:00:00Z",
"ecosystem": "node",
"package": "minimatch",
"version": "10.2.2",
"osv_response": { "vulns": [] }
}osv_response keeps the full OSV payload used by Scanr.
Default TTL:
24hours
Behavior:
- cache missing -> fetch and store
- cache fresh -> use cache
- cache expired -> refresh
--refresh-> force refresh--offline-> never refresh (cache only)
Offline mode:
scanr scan . --offlineForce refresh:
scanr scan . --refreshcache_enabled = true
cache_ttl_hours = 24Defaults:
cache_enabled = truecache_ttl_hours = 24
When cache is used:
Using cached OSV data for minimatch@10.2.2
When cache is refreshed:
Refreshing OSV data for minimatch@10.2.2
When offline cache is missing:
Offline cache miss for minimatch@10.2.2; vulnerability status unknown (offline)