Skip to content

Environment Variables ​

VaultGuard reads environment variables as one layer in the configuration priority chain. Environment variables override config file values but are overridden by CLI flags.

Best for CI/CD

Environment variables are the preferred way to configure VaultGuard in CI pipelines. Set them at the job or workflow level to avoid hardcoding flags in every scan command.

Scan Variables ​

VariableTypeDefaultDescription
VAULTGUARD_VERBOSEu80Verbosity level. 1 = info, 2 = debug, 3 = trace. Equivalent to -v, -vv, -vvv.
VAULTGUARD_FORMAThuman|json|sarifhumanOutput format for scan results.
VAULTGUARD_NO_SECRETSboolfalseDisable secret detection. Set to true, 1, or yes to disable.
VAULTGUARD_NO_CVEboolfalseDisable CVE detection.
VAULTGUARD_NO_MISCONFIGboolfalseDisable misconfiguration detection.
VAULTGUARD_QUALITYboolfalseEnable code quality checks.
VAULTGUARD_INTEGRITYboolfalseEnable integrity verification (lockfile vs installed packages).
VAULTGUARD_TYPOSQUATboolfalseEnable typosquatting detection for dependencies.
VAULTGUARD_ENTROPY_THRESHOLDf645.5Entropy threshold for secret detection. Lower values catch more potential secrets but increase false positives.
VAULTGUARD_BASELINEpathnonePath to a baseline file for differential scanning. Only findings not in the baseline are reported.
VAULTGUARD_MIN_SEVERITYcritical|high|medium|low|infononeMinimum severity threshold. Findings below this level are dropped.
VAULTGUARD_MIN_CONFIDENCEf64 (0.0-1.0)noneMinimum confidence threshold. Findings with a confidence score below this value are dropped.
VAULTGUARD_DISABLE_PROVIDERcomma-separatednoneDisable specific detection providers. Example: aws,github,entropy. See supported providers.

Display Variables ​

VariableTypeDefaultDescription
NO_COLORanyunsetDisable colored terminal output. Any non-empty value activates this. Follows the NO_COLOR convention.

Usage Examples ​

Shell export ​

bash
export VAULTGUARD_MIN_SEVERITY=high
export VAULTGUARD_NO_CVE=true
vaultguard scan

Inline per-command ​

bash
VAULTGUARD_FORMAT=json vaultguard scan ./src

CI/CD environment ​

yaml
# GitHub Actions
env:
  VAULTGUARD_MIN_SEVERITY: high
  VAULTGUARD_DISABLE_PROVIDER: entropy,generic
  VAULTGUARD_FORMAT: sarif

steps:
  - run: vaultguard scan -o results.sarif

Docker ​

bash
docker run --rm \
  -e VAULTGUARD_MIN_SEVERITY=medium \
  -e NO_COLOR=1 \
  -v $(pwd):/workspace \
  vaultguard scan /workspace

Boolean Parsing ​

Boolean environment variables accept the following truthy values (case-insensitive):

  • true, 1, yes

All other values (including empty strings) are treated as false.

Empty strings are falsy

Setting VAULTGUARD_NO_SECRETS="" does not disable secret detection. Use true, 1, or yes as the value.

Precedence ​

Environment variables sit in the middle of the configuration priority chain:

  1. CLI flags (highest)
  2. Environment variables
  3. Project config (.vaultguard.toml)
  4. User config (~/.vaultguard/config.toml)
  5. Built-in defaults (lowest)

A CLI flag always wins. If you set VAULTGUARD_MIN_SEVERITY=high but pass --min-severity medium on the command line, medium is used.

VaultGuard -- Security scanning for AI-generated code