summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <pochu@debian.org>2022-01-27 18:36:55 +0100
committerEmilio Pozuelo Monfort <pochu@debian.org>2022-02-01 16:16:50 +0100
commita81067329d81882d0b8feff1eee1f48c85aa1cf4 (patch)
tree0ccbddd5c84be39e5f72767f1a4c613fceac68d4 /bin
parentd18f65e690cc218bcda4fc715d57a61082664af7 (diff)
remove-cve-dist-tags: remove empty CVE entries
This can happen in ExtendFiles if they only contain dist tags that are being removed.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/remove-cve-dist-tags6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/remove-cve-dist-tags b/bin/remove-cve-dist-tags
index 6e8d7214eb..18db2a0257 100755
--- a/bin/remove-cve-dist-tags
+++ b/bin/remove-cve-dist-tags
@@ -56,6 +56,12 @@ for cve in data:
if keep_annotation(cve, annotation)
)
cve = cve._replace(annotations=annotations)
+ if not cve.annotations:
+ # this shouldn't happen on a normal CVE file as we're only removing
+ # the dist specific tags, but it may happen in an ExtendFile, in
+ # which case we don't want to keep an empty CVE entry
+ continue
+
new_data.append(cve)
with open(main_list, 'w') as f:

© 2014-2024 Faster IT GmbH | imprint | privacy policy