scripts/import-korg-vulns: Ignore issues in unsupported architectures
For Debian security branches, we can ignore issues that don't affect any release architecture (or any LTS architecture, after ~3 years). For unstable we can ignore issues that don't affect any architecture in the main archive or debian-ports.
Mapping filenames to architectures is hard, and the mapping can vary between kernel versions as drivers move or add support for new hardware. But we can conservatively map many directories that are architecture-specific.
-
Add a source-arches key to each releases in
debian-versions.json, listing the currently supported Debian architectures mapped to kernel source architectures. -
Add a
files-arch-specific.jsonconfiguration file that lists (for now) directory regexes and the architectures they map to. -
In
korg_vulns.py, readfiles-arch-specific.json. For issues that include the affected source filenames, map those to a set of affected architectures (orNone, if any filenames are not arch-specific). When a Debian branch is found to be broken but there is no intersection between affected and supported architectures, set the status to 'ignored' with an appropriate comment. -
Reprocess upstream information to mark some issues as ignored based on these changes.