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
commit7999cb56ae27e463b2516ff8e9e432f1f2bd2c78 (patch)
tree3493787d03c497a53f7e1bf530374e12a414ca23 /bin
parentd97a01363a336c3c44ade97ec33dc99b128d2bfb (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