Revert "scripts/support/cve.py: avoid a complete clone of the CVE git repository"
This reverts commit e0ed05cc00.
Since this commit has been applied, the update of the NVD data fails:
Checking packages CVEs
Updating from https://github.com/fkie-cad/nvd-json-data-feeds/
Traceback (most recent call last):
File "/home/buildroot/buildroot-stats/./support/scripts/pkg-stats", line 1346, in <module>
__main__()
File "/home/buildroot/buildroot-stats/./support/scripts/pkg-stats", line 1335, in __main__
check_package_cves(args.nvd_path, packages)
File "/home/buildroot/buildroot-stats/./support/scripts/pkg-stats", line 660, in check_package_cves
for cve in cvecheck.CVE.read_nvd_dir(nvd_path):
File "/home/buildroot/buildroot-stats/support/scripts/cve.py", line 105, in read_nvd_dir
CVE.download_nvd(nvd_git_dir)
File "/home/buildroot/buildroot-stats/support/scripts/cve.py", line 74, in download_nvd
subprocess.check_call(
File "/usr/lib/python3.11/subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['git', 'pull', '--depth', '1']' returned non-zero exit status 128.
Since we couldn't immediately figure out what's going on, let's revert
for now until this get investigated and fixed.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
@@ -72,7 +72,7 @@ class CVE:
|
||||
print(f"Updating from {NVD_BASE_URL}")
|
||||
if os.path.exists(nvd_git_dir):
|
||||
subprocess.check_call(
|
||||
["git", "pull", "--depth", "1"],
|
||||
["git", "pull"],
|
||||
cwd=nvd_git_dir,
|
||||
stdout=subprocess.DEVNULL,
|
||||
stderr=subprocess.DEVNULL,
|
||||
@@ -82,7 +82,7 @@ class CVE:
|
||||
# happily clones into an empty directory.
|
||||
os.makedirs(nvd_git_dir)
|
||||
subprocess.check_call(
|
||||
["git", "clone", "--depth", "1", NVD_BASE_URL, nvd_git_dir],
|
||||
["git", "clone", NVD_BASE_URL, nvd_git_dir],
|
||||
stdout=subprocess.DEVNULL,
|
||||
stderr=subprocess.DEVNULL,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user