FIPS Package Dependency Management
SemVer versioning: how we handled it with linear interval arithmetic

SemVer versioning: how we handled it with linear interval arithmetic

9/28/2021 · Julian Thome

What this post added

This post introduces and open-sources `semver_dialects`, a utility designed to process semantic versions in a language-agnostic manner. It addresses the challenge of SemVer versioning fragmentation across different ecosystems (gem, maven, npm, php, pypi, go, nuget, conan) by providing a unified interface, enabling language-agnostic matching, range inversion, handling of scattered ranges, parsing of different version syntaxes, and best-effort matching. The utility normalizes semantic versions into a comparable format by extending prefix and suffix lengths and numerically comparing segments, with lexical matching as a fallback. This is crucial for automating the advisory generation process for GitLab's Dependency Scanning feature by accurately identifying vulnerable and fixed versions of software dependencies.

Read the original post ↗