Skip to content
This repository was archived by the owner on Jan 6, 2023. It is now read-only.

Commit c4f6e94

Browse files
author
Ikey Doherty
committed
update: Do not treat sha256 failure as fatal if requested
The NVD database is known to have issues during early morning whereby the meta files don't actually match the sha256 of the target xml feed. This has caused problems for some users of cve-check-tool, so in this case we will now continue as if nothing fatal had happened if we find the CVE_SKIP_VERIFY variable in the environment. Signed-off-by: Ikey Doherty <[email protected]>
1 parent dde1eb4 commit c4f6e94

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/update.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,10 @@ static int do_fetch_update(int year, const char *db_dir, CveDB *cve_db, bool db_
364364
goto refetch;
365365
}
366366
fprintf(stderr, "Unpacked data %s is not consistent\n", nvdcve_data->str);
367-
return -1;
367+
/* If CVE_SKIP_VERIFY is set in the environment, don't bail here */
368+
if (!getenv("CVE_SKIP_VERIFY")) {
369+
return -1;
370+
}
368371
}
369372
}
370373

0 commit comments

Comments
 (0)