mirror of
https://github.com/anchore/syft.git
synced 2026-10-11 21:57:22 +02:00
SPDX license list 3.29.0 rewrote every opensource.org seeAlso URL from opensource.org/licenses/<ID> to opensource.org/license/<ID> (and e.g. opensource.org/license/mit/ to opensource.org/license/MIT). Package metadata in the wild (Maven POM <license><url>, npm, etc.) still uses the older forms, so regenerating the list would stop LicenseByURL from resolving them. Fall back to a normalized index of the opensource.org entries that ignores the www. prefix, /licenses/ vs /license/, case, and a trailing slash. The index is built from the generated urlToLicense map, so it works with both the current and the updated license list without changes to the generator. URL forms that would normalize to different licenses are left out rather than guessed. Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com>