Scan configuration resolved from command-line flags, .vulncheck.exs and
built-in defaults (in that order of precedence).
.vulncheck.exs is a declarative keyword list. It is parsed with
VulnCheck.Literal, which never evaluates code and never creates atoms:
only literals, whitelisted option values and module aliases are accepted.
[
env: :prod,
fail_on: :potentially_reachable,
min_severity: :low,
fail_on_retired: true,
configured_adapters: [tesla: Tesla.Adapter.Mint],
extra_entrypoints: [{MyApp.ReleaseTasks, :migrate, 0}],
ignore_file: ".vulncheck.ignore",
require_ignore_reason: true,
require_ignore_expiry: true,
cache_dir: nil,
cache_ttl_seconds: 3600
]
Summary
Functions
Supported adapter families for configured_adapters.
The OptionParser aliases understood by every scanning command.
Supported --fail-on tiers.
Supported output formats.
Builds a configuration from CLI arguments and the project's .vulncheck.exs.
Absolute path of the ignore file.
Loads a .vulncheck.exs file (or any declarative config file) and merges it
into the given configuration.
Parses a declarative configuration file without evaluating it.
Absolute path of the scanned project.
Returns the severity rank used for threshold comparisons (critical = 4).
Unknown severities rank as :critical (fail-safe).
The OptionParser switches understood by every scanning command.
Types
@type fail_on() :: :reachable | :potentially_reachable | :any | :none
@type format() ::
:terminal
| :json
| :markdown
| :sarif
| :github
| :gitlab
| :cyclonedx
| :openvex
@type min_severity() :: :low | :medium | :high | :critical
@type t() :: %VulnCheck.Config{ args: [String.t()], baseline: String.t() | nil, beam_timeout: pos_integer(), bundle: String.t() | nil, cache_dir: String.t() | nil, cache_ttl_seconds: non_neg_integer(), check_retired: boolean(), color: boolean(), config_file: String.t() | nil, configured_adapters: %{required(atom()) => [String.t()]}, diff: String.t() | nil, env: :prod | :dev | :test, extra_entrypoints: [VulnCheck.Types.MFA.t()], fail_on: fail_on(), fail_on_retired: boolean(), feed_selection: map() | nil, feed_snapshot: String.t() | nil, forbid_new_suppressions: boolean(), force: boolean(), format: format(), ignore_file: String.t(), max_beam_bytes: pos_integer(), max_beam_files: pos_integer(), max_beam_heap_bytes: pos_integer(), max_feed_age_seconds: non_neg_integer() | nil, min_severity: min_severity(), offline: boolean(), otp_version: String.t() | nil, output: String.t() | nil, project_dir: String.t(), quiet: boolean(), require_ignore_expiry: boolean(), require_ignore_reason: boolean(), sarif: String.t() | nil, sbom: String.t() | nil, show_unreachable: boolean(), vex: String.t() | nil, write_baseline: String.t() | nil }
Functions
@spec adapter_families() :: [atom()]
Supported adapter families for configured_adapters.
@spec aliases() :: keyword()
The OptionParser aliases understood by every scanning command.
@spec fail_on_values() :: [fail_on()]
Supported --fail-on tiers.
@spec formats() :: [format()]
Supported output formats.
Builds a configuration from CLI arguments and the project's .vulncheck.exs.
Precedence: CLI flags > .vulncheck.exs > defaults.
Options:
:cwd— directory used to resolve a relative--project-dir(default:File.cwd!/0):extra_switches— additional OptionParser switches accepted by a subcommand:allow_args— whentrue, positional arguments are kept inconfig.argsinstead of being rejected
Absolute path of the ignore file.
Loads a .vulncheck.exs file (or any declarative config file) and merges it
into the given configuration.
@spec parse_config_file(Path.t()) :: {:ok, VulnCheck.Literal.lterm()} | {:error, String.t()}
Parses a declarative configuration file without evaluating it.
Absolute path of the scanned project.
@spec severity_rank(atom()) :: non_neg_integer()
Returns the severity rank used for threshold comparisons (critical = 4).
Unknown severities rank as :critical (fail-safe).
@spec switches() :: keyword()
The OptionParser switches understood by every scanning command.