Parser for rebar3 rebar.lock files (both the legacy bare list format and
the versioned {"1.2.0", [...]}. format with pkg_hash / pkg_hash_ext
checksum sections).
rebar3 only locks the default profile, so every locked package belongs to the production closure.
Summary
Functions
@spec parse(String.t(), keyword()) :: {:ok, %{required(String.t()) => VulnCheck.Types.Package.t()}} | {:error, String.t()}
Parses rebar.lock content into name => Package.
@spec parse_file(Path.t()) :: {:ok, %{required(String.t()) => VulnCheck.Types.Package.t()}} | {:error, String.t()}
Reads and parses a rebar.lock file.
@spec parse_file_with_warnings(Path.t()) :: {:ok, %{required(String.t()) => VulnCheck.Types.Package.t()}, [String.t()]} | {:error, String.t()}
Reads and parses a rebar.lock file, also returning unsupported-entry warnings.
@spec parse_with_warnings(String.t(), keyword()) :: {:ok, %{required(String.t()) => VulnCheck.Types.Package.t()}, [String.t()]} | {:error, String.t()}
Like parse/2, also returning warnings for unsupported lock entries.