summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <pochu@debian.org>2023-04-28 13:39:53 +0200
committerEmilio Pozuelo Monfort <pochu@debian.org>2023-04-28 13:39:53 +0200
commit48a11b1e5e4fc0489d8079fb3e3a09290068a1b2 (patch)
treeae4763d2fd6b07c6f72ff8ccb712864267bb9908 /bin
parent5865cc7a265b7fb110c2e3c2ef121562662846df (diff)
process-cve-records: update descriptions
Don't only add them when we don't have one, but always update them in case the description has changed.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/process-cve-records5
1 files changed, 2 insertions, 3 deletions
diff --git a/bin/process-cve-records b/bin/process-cve-records
index cf6ce184ad..39b7ca3f25 100755
--- a/bin/process-cve-records
+++ b/bin/process-cve-records
@@ -59,15 +59,14 @@ def parse_record(record, cve):
ann = parsers.FlagAnnotation(0, 'REJECTED')
cve.annotations.insert(0, ann)
- if len(cve.header.description) == 0 \
- and not is_rejected(record) and not is_reserved(record):
+ if not is_rejected(record) and not is_reserved(record):
desc = [desc['value']
for desc in record['containers']['cna']['descriptions']
if desc['lang'].startswith('en')]
if desc:
desc = desc[0]
if desc and len(desc) > 70:
- # for some reason descriptions contain new lines
+ # for some reason descriptions may contain new lines
desc = desc.replace('\n', ' ')
desc = desc[:70] + ' ...'
cve.header.description = f"({desc})"

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