Security audit for npm packages.
Checks installed packages against known vulnerabilities. This module provides the data structures and analysis logic; the actual advisory data would come from the npm audit API.
Summary
Functions
Checks a lockfile against a list of advisories.
Compares two severity levels. Returns :gt, :lt, or :eq.
Filters findings by minimum severity level.
Checks if a finding has a patch available.
Formats a finding as a human-readable string.
Returns a summary of audit findings.
Types
@type severity() :: :critical | :high | :moderate | :low | :info
Functions
Checks a lockfile against a list of advisories.
Returns findings — packages that match vulnerable version ranges.
Compares two severity levels. Returns :gt, :lt, or :eq.
Filters findings by minimum severity level.
Checks if a finding has a patch available.
Formats a finding as a human-readable string.
@spec summary([finding()]) :: %{ total: non_neg_integer(), critical: non_neg_integer(), high: non_neg_integer(), moderate: non_neg_integer(), low: non_neg_integer(), fixable: non_neg_integer() }
Returns a summary of audit findings.