mise audit
- Usage:
mise audit [FLAGS] [TOOL@VERSION]… - Effect: read-only
- Source code:
src/cli/audit.rs
Check tool versions for known vulnerabilities
Looks up each tool version the current config uses in the OSV.dev vulnerability database and lists the advisories that affect it. Exits with status 1 when it finds any. Run mise upgrade --vulnerable to upgrade only the affected tools.
Package registry tools (npm, pipx, cargo, gem, go, dotnet) are looked up by package name. Tools released from GitHub (github, aqua, packslip) are looked up by repository and release tag, and Go programs also as Go modules. Of the core tools, go, node, python, deno, bun and erlang are covered. Other tools are listed as not checked.
Severity is the rating the advisory database gives, or else the one the advisory's CVSS vector (v4, v3 or v2) scores. --json also gives that vector and its base score.
--monorepo checks the monorepo root and every directory in [monorepo].config_roots in one run, each with the configs it would see if mise ran there. The table and --json list a tool version once however many of them ask for it, while SARIF has a result for each line that asks for it, so projects that include the same file share one. A [tool_alias] that gives a tool another backend has to be the same in all of these directories and in the current one, or the audit fails.
--no-global leaves out the tools that only global and system configs or MISE_<TOOL>_VERSION environment variables ask for, so that the result depends on the project alone.
--json prints an object with two lists. Each entry of vulnerabilities has tool, version, id, aliases, severity, cvss, summary, fixed, url and source, and each entry of unchecked has tool, version and source. source says what asked for the version: its type, and the path of the file when it is one.
--format sarif prints a SARIF 2.1.0 log, which GitHub code scanning accepts. Each result points at the line of the config file that asks for the tool, relative to the root of the git repository. For a tool a config gets from a local file in its include, that is the line of the included file. An advisory for a version that no file asks for, such as one named on the command line, has no location to report, so it is listed as a notification instead of a result. Nothing is printed when a version does not resolve, so a partial report cannot close alerts.
Arguments
[TOOL@VERSION]…— Tools to check, such asnodeornode@20Checks every tool in the current config when omitted.
Flags
-J --json— Output in JSON format, the same as--format json--format <FORMAT>— Output format [default: table]Choices:
table,json,sarif--monorepo— Also check the tools of every config root in[monorepo].config_rootsRequires
monorepo_root = trueand an explicitconfig_rootslist in the monorepo root's config. Uses the active MISE_ENV.Environment Variable:
MISE_MONOREPO--no-global— Skip tools from global and system configs andMISE_<TOOL>_VERSIONenvironment variables--no-header— Do not print the table header-h --help— Print help
Examples
Check every tool in the current config
mise audit
Tool Version ID Severity Fixed Summary
npm:lodash 4.17.15 GHSA-35jh-r3h4-6jhm high 4.17.21 Command Injection in lodash
go 1.22.0 GO-2024-2887 - 1.22.4 Unexpected behavior from Is methods for IPv4-mapped IPv6 addresses in net/netipCheck only some tools
mise audit node pythonPrint the advisories as JSON
mise audit --jsonCheck every project of a monorepo, without your global tools
mise audit --monorepo --no-globalWrite a report for GitHub code scanning
mise audit --format sarif > mise-audit.sarif