# Vulnetix CLI

The vulnetix binary runs every Vulnetix scanner, signs in to your organisation, publishes results from CI, and is the entry point for most Vulnetix products.

The Vulnetix CLI is for developers and CI pipelines that need to scan code, dependencies and infrastructure where the code lives, and gate a build on the result. It is the way in to most Vulnetix products: the scanners, SBOMs, VEX, signing and the firewalls all start from a `vulnetix` command. Read this segment for what every command shares, and the product's own segment for one scanner's behaviour.

`vulnetix` is one Go binary for Linux, macOS and Windows. It parses your manifests and source locally, asks the Vulnetix VDB about the packages it found, writes its results under `.vulnetix/` in the project, and, when you are signed in, publishes those results to your organisation. Files are not uploaded. What is published is the SBOM and the SARIF, and a SARIF result carries a few lines of source around each finding (`--snippet-context`, `0` turns it off).

These pages cover what every command shares: installing it, signing in, running it in CI, the orchestrating `scan` command, `report`, `analyze`, the GitHub posture commands, and the global flags, environment variables and exit codes. Each scanner and product has its own segment, linked from the map below.

```sh
curl -fsSL https://cli.vulnetix.com/install.sh | sh
vulnetix auth login
vulnetix scan
```

Without signing in, VDB lookups use the shared community credential at community rate limits, and nothing is stored in Vulnetix. See [Credential methods](/cli/authentication/methods.md#community-fallback).

## Product map

Every top-level command in `vulnetix --help`, and the docs segment that owns it.

| Command | What it does | Documented in |
|---|---|---|
| `agent` | Wires AI coding agents to Vulnetix and answers their lifecycle hooks | [Pix](/pix.md) |
| `ai-firewall` | Points AI clients at the Vulnetix AI Firewall and manages its policy | [AI Firewall](/ai-firewall.md) |
| `aibom` | Discovers AI agents, SDKs and models; writes a CycloneDX AIBOM | [SBOM](/sbom.md) |
| `analyze` | Builds the repository's tech-stack graph and evidence-backed metrics | [CLI: analyze](/cli/commands/analyze.md) |
| `api` | Finds OpenAPI and Swagger descriptions in a repository and uploads them | [CLI: api](/cli/commands/api.md) |
| `attest` | Verifies signatures and in-toto provenance on artefacts | [Attestation](/attestation.md) |
| `auth` | Signs in, shows and verifies credentials, signs out | [CLI: authentication](/cli/authentication/overview.md) |
| `bom` | Reads, validates, diffs and inspects SBOM documents | [SBOM](/sbom.md) |
| `cbom` | Discovers cryptographic usage; writes a CycloneDX CBOM with post-quantum posture | [SBOM](/sbom.md) |
| `cdx` | Writes a standalone CycloneDX SBOM with no VDB lookup or upload | [SBOM](/sbom.md) |
| `completion` | Prints shell completion scripts | [CLI: completion](/cli/commands/completion.md) |
| `config` | Validates `vulnetix.com/v1` documents; sets and reads org policy | [Platform IaC](/platform-iac.md) |
| `containers` | Runs only the container file analysis | [SCA](/sca.md) |
| `defend` | Shows, saves and records block rules and detections for a finding with no fix | [Virtual patching](/virtual-patching.md) |
| `env` | Prints platform, git, package manager and memory context | [CLI: utilities](/cli/commands/utilities.md) |
| `fix` | Applies validated dependency fixes, then rescans | [SCA](/sca.md) |
| `gha` | Publishes a workflow run's scanner reports; audits GitHub posture | [CLI: gha upload](/cli/ci-cd/gha-command.md), [CLI: GitHub posture](/cli/commands/gha.md) |
| `help` | Prints help for any command | This page |
| `iac` | Runs only Infrastructure as Code analysis | [IaC scanning](/iac-scanning.md) |
| `ignore` | Manages suppression rules for scanner findings | [Vulnerability management](/vulnerability-management.md) |
| `image` | Inventories a container image for container curation | [SCA](/sca.md) |
| `jail` | Gates the pipeline on the organisation's jail policy | [Quality gates](/quality-gates.md) |
| `license` | Checks package licences for conflicts and policy | [SCA](/sca.md) |
| `lsp` | Runs the Vulnetix language server over stdio | [VS Code](/vscode.md) |
| `malscan` | Scans installed dependency directories for malware | [Malware](/malware.md) |
| `package-firewall` | Configures package managers to use the Vulnetix Package Firewall | [Package Firewall](/package-firewall.md) |
| `pix` | Installs the Pix plugin's skills (`vulnetix pix install`, with `--agent` and `--skill`) | [Pix](/pix.md) |
| `report` | Renders the stored results of the last scan without rescanning | [CLI: report](/cli/commands/replay.md) |
| `sast` | Runs only static analysis | [SAST](/sast.md) |
| `sca` | Runs only dependency (software composition) analysis | [SCA](/sca.md) |
| `scan` | Runs every scanner in one pass and applies one set of gates | [CLI: scan](/cli/commands/scan.md) |
| `secrets` | Runs only secret detection | [Secrets](/secrets.md) |
| `skills` | Installs, checks, updates and removes Vulnetix agent skills | [Pix](/pix.md) |
| `surface` | Checks from inside your network that registered routes and hosts still answer | [CLI: surface](/cli/commands/surface.md) |
| `tea` | Publishes to and reads from the Transparency Exchange API | [TEA](/tea.md) |
| `triage` | Triages GitHub alerts or Vulnetix findings against the VDB and writes VEX | [CLI: triage](/cli/commands/triage.md) |
| `update` | Replaces the binary with the latest release | [CLI: utilities](/cli/commands/utilities.md) |
| `upload` | Publishes a third-party SARIF, CycloneDX or SPDX report | [CLI: upload](/cli/commands/upload.md) |
| `vdb` | Queries the Vulnetix Vulnerability Database API | [VDB API](/vdb-api.md) |
| `version` | Prints the version, commit and build details | [CLI: utilities](/cli/commands/utilities.md) |
| `vex` | Reads, validates and applies VEX statements | [VEX](/vex.md) |

`vulnetix` with no command runs an authentication health check over every credential source. See [Utilities](/cli/commands/utilities.md#vulnetix-with-no-command).

## Find the page for your task

| I want to | Read |
|---|---|
| Install on a laptop or a runner | [Install](/cli/get-started/install.md) |
| Scan a project for the first time | [Quickstart](/cli/get-started/quickstart.md) |
| Sign in without a browser | [Credential methods](/cli/authentication/methods.md#apikey) |
| Find out which credential the CLI is using | [Credential precedence](/cli/authentication/precedence.md) |
| Fail a build on high-severity or exploited findings | [scan: when to fail](/cli/commands/scan.md#when-to-fail) |
| Run Vulnetix in GitHub Actions | [GitHub Actions](/cli/ci-cd/github-actions.md) |
| Send gosec, Trivy or Semgrep results to Vulnetix | [Third-party scanners](/cli/ci-cd/third-party-scanners.md) |
| Check a repository's workflows for injection flaws | [GitHub posture commands](/cli/commands/gha.md) |
| Look up a VNX-GH rule the posture commands report | [GitHub posture rules](/cli/github-rules/overview.md) |
| Tell a pipeline failure from a gate that could not decide | [Exit codes](/cli/reference/exit-codes.md) |
| Know what is in `.vulnetix/` | [Files](/cli/reference/files.md) |

## GitHub Actions

The per-command actions are listed on [GitHub Actions](/cli/ci-cd/github-actions.md#an-action-for-each-command). The CLI-level ones are [setup](/cli/github-actions/setup.md), [analyze](/cli/github-actions/analyze.md), [upload](/cli/github-actions/upload.md), [gha-upload](/cli/github-actions/gha-upload.md) and [github-publish](/cli/github-actions/github-publish.md). Results can also be published straight into GitHub with [gha publish](/cli/commands/gha-publish.md).

## Platform IaC

The CLI is where config-as-code runs from. `vulnetix config validate`, `config kinds` and `config schema` check `apiVersion: vulnetix.com/v1` documents offline against the schemas built into the CLI, which are a release of [Vulnetix/config-schemas](https://github.com/Vulnetix/config-schemas). `config plan`, `apply` and `export` send documents to the config engine; `config set|get` are the imperative forms. `ai-firewall apply|export` and the policy form of `config set package-firewall` became aliases of the engine in CLI v4.0.0, as `config set quality-gate|eol-policy` already were. A file is a Platform IaC document if its `apiVersion` is `vulnetix.com/v1` and its `kind` is one `vulnetix config kinds` lists. The CLI reads `.vulnetix/config` and three well-known files: `.vulnetix/ai-firewall.yaml`, `.vulnetix/license-policy.yaml` and `.vulnetix/license-exceptions.yaml`.

The CLI embeds one release of the schemas, so `vulnetix config kinds` lists the kinds your binary knows. It refuses a kind added in a later release as unknown before it sends anything. The [kind catalogue](/platform-iac/kinds/catalogue.md) and each kind's page say from which CLI release a kind is known. The CLI evaluates no CEL expression; see [CEL rule expressions](/platform-iac/reference/cel.md). The CLI's own settings (credentials, output and gate flags) are flags and environment variables, not documents. See [Platform IaC](/platform-iac.md).
