[Git][security-tracker-team/security-tracker][master] lts-cve-triage: don't use the release number
Emilio Pozuelo Monfort (@pochu)
pochu at debian.org
Mon Aug 8 09:31:49 BST 2022
Emilio Pozuelo Monfort pushed to branch master at Debian Security Tracker / security-tracker
Commits:
4a3851d0 by Emilio Pozuelo Monfort at 2022-08-08T10:27:02+02:00
lts-cve-triage: don't use the release number
This is much harder to catch when a release becomes EOL, as we
grep for e.g. stretch.
- - - - -
2 changed files:
- bin/lts-cve-triage.py
- bin/unsupported_packages.py
Changes:
=====================================
bin/lts-cve-triage.py
=====================================
@@ -97,7 +97,7 @@ parser.add_argument('--exclude', nargs='+', choices=[x[0] for x in LIST_NAMES],
args = parser.parse_args()
tracker = TrackerData(update_cache=not args.skip_cache_update)
-unsupported = UnsupportedPackages(debian_version=10,
+unsupported = UnsupportedPackages(codename=RELEASES['lts'],
update_cache=not args.skip_cache_update)
limited = LimitedSupportPackages(update_cache=not args.skip_cache_update)
# unsupport/limited package names can be regexps
=====================================
bin/unsupported_packages.py
=====================================
@@ -13,6 +13,9 @@
# You should have received a copy of the GNU General Public License
# along with this file. If not, see <https://www.gnu.org/licenses/>.
+import setup_paths # noqa # pylint: disable=unused-import
+
+import config
import os
import re
import requests
@@ -49,8 +52,11 @@ class UnsupportedPackages(DebSecSupport):
URL = "https://salsa.debian.org/debian/debian-security-support/raw/master/security-support-ended.deb{}"
CACHED_DATA_PATH = "~/.cache/security-support-ended.deb{}"
- def __init__(self, debian_version, update_cache=True):
- self.debian_version = debian_version
+ def __init__(self, codename, update_cache=True):
+ # codename to version number
+ dists = list(config.get_config().keys())
+ self.debian_version = dists.index(codename) + 1
+
self.url = self.URL.format(self.debian_version)
self.cache = os.path.expanduser(self.CACHED_DATA_PATH).format(
View it on GitLab: https://salsa.debian.org/security-tracker-team/security-tracker/-/commit/4a3851d06b53b4ee02282ca221ea71b827b780b0
--
View it on GitLab: https://salsa.debian.org/security-tracker-team/security-tracker/-/commit/4a3851d06b53b4ee02282ca221ea71b827b780b0
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-security-tracker-commits/attachments/20220808/4fc6fd55/attachment-0001.htm>
More information about the debian-security-tracker-commits
mailing list