From 045f0ba71ef8b5bf7cd6932a2bae24ed0f663b26 Mon Sep 17 00:00:00 2001 From: Krisbiradar Date: Mon, 25 Aug 2025 00:21:33 +0530 Subject: [PATCH 1/3] fix: database time not preserved during file copy --- cve_bin_tool/cvedb.py | 4 ++-- report.json | 1 + requirements.csv | 28 ---------------------------- 3 files changed, 3 insertions(+), 30 deletions(-) create mode 100644 report.json delete mode 100644 requirements.csv diff --git a/cve_bin_tool/cvedb.py b/cve_bin_tool/cvedb.py index ea0d95be5b..774b311d63 100644 --- a/cve_bin_tool/cvedb.py +++ b/cve_bin_tool/cvedb.py @@ -796,9 +796,9 @@ def copy_db(self, filename, export=True): """Copy database file to or from new path.""" self.db_close() if export: - shutil.copy(self.dbpath, filename) + shutil.copy2(self.dbpath, filename) else: - shutil.copy(filename, self.dbpath) + shutil.copy2(filename, self.dbpath) def remove_cache_backup(self) -> None: """Removes the backup if database was successfully loaded.""" diff --git a/report.json b/report.json new file mode 100644 index 0000000000..0637a088a0 --- /dev/null +++ b/report.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/requirements.csv b/requirements.csv deleted file mode 100644 index 3ad34e857e..0000000000 --- a/requirements.csv +++ /dev/null @@ -1,28 +0,0 @@ -vendor,product -plot,plotly -pocoo,jinja2 -aiohttp_project,aiohttp -pyyaml,pyyaml -willmcgugan_not_in_db,rich -crummy_not_in_db,beautifulsoup4 -uiri_not_in_db,toml -jsonschema_not_in_db,jsonschema -srossross_not_in_db,rpmfile -indygreg_not_in_db,zstandard -nir0s_not_in_db,distro -tiran_not_in_db,defusedxml -sissaschool_not_in_db,xmlschema -python_not_in_db,importlib_metadata -python,requests -python,urllib3 -google,gsutil -skontar,cvss -python_not_in_db,packaging -python_not_in_db,importlib_resources -vsajip_not_in_db,python-gnupg -anthonyharrison_not_in_db,lib4sbom -anthonyharrison_not_in_db,lib4vex -the_purl_authors_not_in_db,packageurl-python -h2non,filetype -python,setuptools -jaraco,zipp From 38d1bd469c6755bb5d31f51f620b088c7d7ceae6 Mon Sep 17 00:00:00 2001 From: Krisbiradar Date: Sun, 14 Sep 2025 10:43:01 +0530 Subject: [PATCH 2/3] fix: database time not preserved during file copy ( --- report.json | 1 - requirements.csv | 28 ++++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) delete mode 100644 report.json create mode 100644 requirements.csv diff --git a/report.json b/report.json deleted file mode 100644 index 0637a088a0..0000000000 --- a/report.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/requirements.csv b/requirements.csv new file mode 100644 index 0000000000..4816d972cf --- /dev/null +++ b/requirements.csv @@ -0,0 +1,28 @@ +vendor,product +plot,plotly +pocoo,jinja2 +aiohttp_project,aiohttp +pyyaml,pyyaml +willmcgugan_not_in_db,rich +crummy_not_in_db,beautifulsoup4 +uiri_not_in_db,toml +jsonschema_not_in_db,jsonschema +srossross_not_in_db,rpmfile +indygreg_not_in_db,zstandard +nir0s_not_in_db,distro +tiran_not_in_db,defusedxml +sissaschool_not_in_db,xmlschema +python_not_in_db,importlib_metadata +python,requests +python,urllib3 +google,gsutil +skontar,cvss +python_not_in_db,packaging +python_not_in_db,importlib_resources +vsajip_not_in_db,python-gnupg +anthonyharrison_not_in_db,lib4sbom +anthonyharrison_not_in_db,lib4vex +the_purl_authors_not_in_db,packageurl-python +h2non,filetype +python,setuptools +jaraco,zipp \ No newline at end of file From 44b29fe6e4ba8332b520677e741e15dc6bd5cf43 Mon Sep 17 00:00:00 2001 From: Krisbiradar Date: Sun, 14 Sep 2025 10:45:36 +0530 Subject: [PATCH 3/3] fix: database time not preserved during file copy --- requirements.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.csv b/requirements.csv index 4816d972cf..3ad34e857e 100644 --- a/requirements.csv +++ b/requirements.csv @@ -25,4 +25,4 @@ anthonyharrison_not_in_db,lib4vex the_purl_authors_not_in_db,packageurl-python h2non,filetype python,setuptools -jaraco,zipp \ No newline at end of file +jaraco,zipp