From 14d3df2f32fabb58a1678acf6997b780a8a895fd Mon Sep 17 00:00:00 2001 From: Sylvain Beucler Date: Thu, 14 Apr 2022 16:15:54 +0200 Subject: lts-cve-triage: support debian-security-support patterns e.g. better analysis for "node-moment" and "golang-github-prometheus-client-golang" --- bin/lts-cve-triage.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/lts-cve-triage.py b/bin/lts-cve-triage.py index da7b5fbf57..8da8984b1d 100755 --- a/bin/lts-cve-triage.py +++ b/bin/lts-cve-triage.py @@ -20,6 +20,7 @@ import setup_paths import sys import argparse import collections +import re from tracker_data import TrackerData from unsupported_packages import UnsupportedPackages, LimitedSupportPackages @@ -96,6 +97,9 @@ tracker = TrackerData(update_cache=not args.skip_cache_update) unsupported = UnsupportedPackages(debian_version=9, update_cache=not args.skip_cache_update) limited = LimitedSupportPackages(update_cache=not args.skip_cache_update) +# unsupport/limited package names can be regexps +unsupported_re = re.compile('|'.join(unsupported)) +limited_re = re.compile('|'.join(limited)) def add_to_list(key, pkg, issue): @@ -115,7 +119,7 @@ for pkg in tracker.iterate_packages(): continue if status_in_lts.status == 'open': - if pkg in unsupported: + if re.fullmatch(unsupported_re, pkg): add_to_list('triage_end_of_life', pkg, issue) continue @@ -123,7 +127,7 @@ for pkg in tracker.iterate_packages(): # package issues in LTS that still need being triaged - if pkg in limited: + if re.fullmatch(limited_re, pkg): add_to_list('triage_limited_support', pkg, issue) continue -- cgit v1.2.3