swh.vulns.osv.parser.utils module#
- swh.vulns.osv.parser.utils.find_release_from_version(version: str, snapshot: Snapshot, branch_prefix=b'refs/tags/') CoreSWHID | None[source]#
Try to find branch in a snapshot corresponding to a specific software origin version using a set of heuristics.
- Parameters:
version – Version number for a release of a software origin
snapshot – Snapshot of a software origin
branch_prefix – Only consider branches whose name starts with that prefix
- Returns:
the SWHID of a release or revision related to the version number if found,
Noneotherwise