fix(eol): add VC++ Redistributable slugs + reject sub-component matches

- _PRODUCT_SLUGS extended with visual-cpp aliases (vcredist,
  microsoftvisualc..., msvcr, msvcp) so 2005/2008/2010 etc. flow
  through to endoflife.date's visual-cpp product.
- _WRAPPER_TOKENS adds nativeclient, setupsupportfiles, setup,
  premium, clicktorun, subscription — these name a tracked product
  but have a different lifecycle, so they were producing false EOL
  matches (e.g. SQL Server 2008 R2 Native Client inheriting SQL
  Server's EOL date).

Fixes feedback 2026-06-02 #6 (Coverage Gap missing EOL entries).
This commit is contained in:
2026-06-02 13:47:13 +02:00
parent 0d51457a10
commit 9385ca4e0d
+18
View File
@@ -108,6 +108,20 @@ _PRODUCT_SLUGS: dict[str, str] = {
"postgres": "postgresql",
"mongodb": "mongodb",
"redis": "redis",
# Microsoft Visual C++ Redistributable (all flavours — 2005/2008/2010/2012/2013/2015-2022).
# endoflife.date exposes the product as `visual-cpp`; map any sane
# spelling here. Versions are matched by endoflife.date.
"visualc": "visual-cpp",
"visualcppredistributable": "visual-cpp",
"microsoftvisualc": "visual-cpp",
"microsoftvisualcp": "visual-cpp",
"microsoftvisualcppr": "visual-cpp",
"microsoftvisualcpprdistributable": "visual-cpp",
"microsoftvisualcplusplus": "visual-cpp",
"vcredist": "visual-cpp",
"vcruntime": "visual-cpp",
"msvcr": "visual-cpp",
"msvcp": "visual-cpp",
# Adobe
"adobeacrobat": "adobe-acrobat",
"adobeacrobatreader": "adobe-acrobat",
@@ -139,6 +153,10 @@ _WRAPPER_TOKENS = (
"veeam", "explorerfor", "backup", "connector", "odbc", "jdbc",
"driver", "clientfor", "agentfor", "pluginfor", "extensionfor",
"providerfor", "managementpack", "monitoringfor",
# Sub-components of a tracked product that have their own (different)
# lifecycle — matching the parent would give a false EOL signal.
"nativeclient", "setupsupportfiles", "setupsql", "setup",
"premium", "clicktorun", "subscription",
)