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
commit8dfb008c0fd1283a92b37c940f4cb5b0d2344548 (patch)
tree7a5be8bbe4772a7999080f15e7266365c021739b /bin
parent12efaa6c17af5fea7a85dde041cb877934c6d42d (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