You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LOGGER.critical("Database does not have the latest schema.")
911
+
LOGGER.info("Please update database, by using --update 'now'")
912
+
ifargs["offline"]:
913
+
LOGGER.info(
914
+
"Consult the documentation at https://cve-bin-tool.readthedocs.io/en/latest/how_to_guides/offline.html to find out how to setup offline operation."
915
+
)
916
+
returnERROR_CODES[CVEDBOutdatedSchema]
899
917
900
-
# update db if needed
901
-
ifdb_update!="never":
902
-
cvedb_orig.get_cvelist_if_stale()
903
-
else:
904
-
LOGGER.warning("Not verifying CVE DB cache")
918
+
# CVE Database validation
905
919
ifnotcvedb_orig.check_cve_entries():
906
920
withErrorHandler(mode=error_mode, logger=LOGGER):
907
-
raiseEmptyCache(cvedb_orig.cachedir)
908
-
ifnotcvedb_orig.latest_schema():
909
-
LOGGER.critical("Database does not have the latest schema.")
910
-
LOGGER.info("Please update database, by using --update 'now'")
911
-
ifargs["offline"]:
912
-
LOGGER.info(
913
-
"Consult the documentation at https://cve-bin-tool.readthedocs.io/en/latest/how_to_guides/offline.html to find out how to setup offline operation."
914
-
)
915
-
returnERROR_CODES[CVEDBOutdatedSchema]
921
+
raiseCVEDataMissing("No data in CVE Database")
916
922
917
-
# CVE Database validation
918
-
ifnotcvedb_orig.check_cve_entries():
919
-
withErrorHandler(mode=error_mode, logger=LOGGER):
920
-
raiseCVEDataMissing("No data in CVE Database")
921
-
922
-
# Report time of last database update
923
-
db_date=time.strftime(
924
-
"%d %B %Y at %H:%M:%S", time.localtime(cvedb_orig.get_db_update_date())
925
-
)
926
-
LOGGER.info(
927
-
"CVE database contains CVEs from National Vulnerability Database (NVD), Open Source Vulnerability Database (OSV), Gitlab Advisory Database (GAD) and RedHat"
928
-
)
929
-
LOGGER.info(f"CVE database last updated on {db_date}")
923
+
# Report time of last database update
924
+
db_date=time.strftime(
925
+
"%d %B %Y at %H:%M:%S", time.localtime(cvedb_orig.get_db_update_date())
926
+
)
927
+
LOGGER.info(
928
+
"CVE database contains CVEs from National Vulnerability Database (NVD), Open Source Vulnerability Database (OSV), Gitlab Advisory Database (GAD) and RedHat"
929
+
)
930
+
LOGGER.info(f"CVE database last updated on {db_date}")
0 commit comments