VulnCheck.CLI (VulnCheck v1.0.1)

Copy Markdown View Source

Command line interface shared by the vulncheck escript and the Mix tasks.

vulncheck [scan] [flags]          audit the project (default command)
vulncheck init [--force]          write a commented .vulncheck.exs
vulncheck explain <ID> [flags]    describe an advisory and its local status
vulncheck feeds sync|status       refresh or inspect the advisory cache
vulncheck feeds bundle -o FILE    export the cache for offline runners
vulncheck feeds import FILE       select a bundle for later offline runs
vulncheck feeds prune             remove unused snapshots and module caches

Exit codes: 0 clean, 1 policy violation (actionable findings, retired releases, expired or forbidden suppressions), 2 execution error.

Summary

Functions

Human-readable description of a scan or command error.

Contents of a generated .vulncheck.exs for the project in dir.

Escript entry point.

Renders a report in the given format.

Runs a command and returns its exit code without halting the VM.

Usage text.

Types

exit_code()

@type exit_code() :: 0 | 1 | 2

Functions

describe_error(message)

@spec describe_error(term()) :: String.t()

Human-readable description of a scan or command error.

init_template(dir)

@spec init_template(Path.t()) :: String.t()

Contents of a generated .vulncheck.exs for the project in dir.

main(argv)

@spec main([String.t()]) :: no_return()

Escript entry point.

render(report, config, format)

Renders a report in the given format.

run(argv, opts \\ [])

@spec run([String.t()], keyword()) :: exit_code()

Runs a command and returns its exit code without halting the VM.

Options:

  • :stdout / :stderr — IO devices (default :stdio / :stderr)
  • :cwd — working directory used to resolve relative paths
  • :scan_opts — options forwarded to VulnCheck.Scanner.run/2 (feed URLs, HTTP client, :today)

usage()

@spec usage() :: String.t()

Usage text.