Configuration
relgap reads its settings in layers, and a later layer wins: the defaults, the user file ($XDG_CONFIG_HOME/relgap/config.yaml), the project file (.relgap.yaml, found by walking up from the working directory), environment variables and flags. relgap config show --sources prints each value and its layer, and relgap config init writes the commented template at the end of this page. Files are checked against config-v1.json.
A key's environment variable is RELGAP_ followed by the key in upper case, with dots and dashes as underscores. Only scalars and string lists (comma-separated) can be set this way. See environment variables.
schema_version
| Type | Default | Allowed | Environment | Flag |
|---|---|---|---|---|
integer | 1 | 1 | RELGAP_SCHEMA_VERSION |
Config file format version.
github
github.host
| Type | Default | Allowed | Environment | Flag |
|---|---|---|---|---|
string | github.com | RELGAP_GITHUB_HOST |
Reserved for GitHub Enterprise Server. relgap doesn't read it yet and always calls github.com.
github.concurrency
| Type | Default | Allowed | Environment | Flag |
|---|---|---|---|---|
integer | 8 | at least 1 | RELGAP_GITHUB_CONCURRENCY | --concurrency |
Maximum concurrent requests per tool.
cache
cache.dir
| Type | Default | Allowed | Environment | Flag |
|---|---|---|---|---|
string | "" | RELGAP_CACHE_DIR |
Cache directory. Empty means $XDG_CACHE_HOME/relgap.
cache.ttl_override
| Type | Default | Allowed | Environment | Flag |
|---|---|---|---|---|
map of string | {} |
Per-source TTL overrides as Go durations, e.g. {endoflife: 24h}.
scan
scan.roots
| Type | Default | Allowed | Environment | Flag |
|---|---|---|---|---|
list of string | [] | RELGAP_SCAN_ROOTS |
Directories scanned by drift and pins when no roots are given.
scan.exclude
| Type | Default | Allowed | Environment | Flag |
|---|---|---|---|---|
list of string | ["**/node_modules/**","**/.terragrunt-cache/**"] | RELGAP_SCAN_EXCLUDE |
Glob patterns excluded from scanning.
scan.detectors.ci_actions
| Type | Default | Allowed | Environment | Flag |
|---|---|---|---|---|
boolean | false | RELGAP_SCAN_DETECTORS_CI_ACTIONS |
Also report the uses: pins of GitHub Actions in workflow files. Tool versions in CI files are read either way.
scan.detectors.generic
| Type | Default | Allowed | Environment | Flag |
|---|---|---|---|---|
boolean | false | RELGAP_SCAN_DETECTORS_GENERIC |
Detect NAME_VERSION=x.y.z assignments in extra_files.
scan.extra_files
| Type | Default | Allowed | Environment | Flag |
|---|---|---|---|---|
list of string | [] | RELGAP_SCAN_EXTRA_FILES |
Extra glob patterns read by the renovate-comment detector, and by the generic detector when it is on.
tools
| Type | Default | Allowed | Environment | Flag |
|---|---|---|---|---|
map of object | {} |
Local tool overrides and additions, keyed by tool name.
Each entry has these fields:
| Field | Type | Description |
|---|---|---|
repo | string | owner/repo on GitHub, workspace/repo on Bitbucket Cloud, or the project path on GitLab. |
host | string | Host of repo: github.com (the default), bitbucket.org, gitlab.com or a host in gitlab.hosts. |
aliases
| Type | Default | Allowed | Environment | Flag |
|---|---|---|---|---|
map of string | {} |
Maps a raw pin name (e.g. TG_VERSION) to a tool name.
ignore
| Type | Default | Allowed | Environment | Flag |
|---|---|---|---|---|
list of object | [] |
Pins that are never reported: by tool, by raw name or by path, alone or together.
Each entry has these fields:
| Field | Type | Description |
|---|---|---|
tool | string | Tool name, as pins and digests show it, to leave out of reports. |
name | string | Glob on the pin's raw name, as relgap pins shows it; * matches any characters. Matches unresolved pins too. |
path | string | Glob on the file path; with tool or name, the rule applies only under matching paths. |
policy
policy.fail_on
| Type | Default | Allowed | Environment | Flag |
|---|---|---|---|---|
list of string | [] | breaking, deprecation, eol, vuln, drift, outdated, unchecked, kev | RELGAP_POLICY_FAIL_ON | --fail-on |
--fail-on values each command uses when the flag is not given; a command ignores the values it doesn't check. audit always gates vuln, and its values here add to it. kev needs vulns.kev.
policy.max_behind
| Type | Default | Allowed | Environment | Flag |
|---|---|---|---|---|
string | "" | pattern ^((major|minor|patch|releases|days):[0-9]+)?$ | RELGAP_POLICY_MAX_BEHIND | --max-behind |
e.g. minor:2, releases:10, days:90.
policy.min_confidence
| Type | Default | Allowed | Environment | Flag |
|---|---|---|---|---|
number | 0.5 | at least 0 | RELGAP_POLICY_MIN_CONFIDENCE | --min-confidence |
Entries below this confidence are hidden.
policy.vuln_severity
| Type | Default | Allowed | Environment | Flag |
|---|---|---|---|---|
string | "" | ``, low, medium, high, critical | RELGAP_POLICY_VULN_SEVERITY | --vuln-severity |
Lowest OSV rating --fail-on vuln counts; an advisory without a rating always counts, and empty counts every advisory.
policy.vuln_fixable
| Type | Default | Allowed | Environment | Flag |
|---|---|---|---|---|
boolean | false | RELGAP_POLICY_VULN_FIXABLE | --vuln-fixable |
--fail-on vuln counts only advisories with a fixed version above the pinned one. Advisories without one still show in the report.
vulns
vulns.ignore
| Type | Default | Allowed | Environment | Flag |
|---|---|---|---|---|
list of object | [] |
Advisories to suppress, by ID or any alias. A suppressed advisory stays in the report with its reason and doesn't count for --fail-on.
Each entry has these fields:
| Field | Type | Description |
|---|---|---|
id | string | Advisory ID or any of its aliases, such as GHSA-cxww-7g56-2vh6, GO-2024-3080 or CVE-2024-42471. |
reason | string | Why the advisory is accepted. Reports show it next to the advisory. |
until | string | Last day (YYYY-MM-DD, UTC) the entry applies. After it the entry suppresses nothing and relgap warns. |
tools | list of string | Tool names as pins show them, where * matches any characters: kubectl, npm:*, action:actions/*. Empty means every tool. |
vulns.vex
| Type | Default | Allowed | Environment | Flag |
|---|---|---|---|---|
list of string | [] | RELGAP_VULNS_VEX | --vex |
OpenVEX v0.2.0 documents whose not_affected and fixed statements suppress advisories, like --vex. A relative path resolves against the directory of the config file that lists it.
vulns.kev
| Type | Default | Allowed | Environment | Flag |
|---|---|---|---|---|
boolean | false | RELGAP_VULNS_KEV | --kev |
Mark advisories in the CISA Known Exploited Vulnerabilities catalog, like --kev. relgap then fetches the catalog from www.cisa.gov once a day.
vulns.epss
| Type | Default | Allowed | Environment | Flag |
|---|---|---|---|---|
boolean | false | RELGAP_VULNS_EPSS | --epss |
Add the FIRST EPSS score of each advisory's CVE, like --epss. relgap then sends the CVE IDs to api.first.org.
llm
llm.provider
| Type | Default | Allowed | Environment | Flag |
|---|---|---|---|---|
string | "" | ``, openai-compatible, anthropic, bedrock, bedrock-mantle | RELGAP_LLM_PROVIDER |
Empty disables the summarizer.
llm.model
| Type | Default | Allowed | Environment | Flag |
|---|---|---|---|---|
string | "" | RELGAP_LLM_MODEL |
Model ID the provider runs. Required when provider is set.
llm.base_url
| Type | Default | Allowed | Environment | Flag |
|---|---|---|---|---|
string | "" | RELGAP_LLM_BASE_URL |
API base URL. Required for openai-compatible; anthropic and bedrock-mantle have a default.
llm.api_key_env
| Type | Default | Allowed | Environment | Flag |
|---|---|---|---|---|
string | "" | RELGAP_LLM_API_KEY_ENV |
Name of the env var holding the API key. Keys are never read from files.
llm.api
| Type | Default | Allowed | Environment | Flag |
|---|---|---|---|---|
string | "" | ``, messages, chat-completions | RELGAP_LLM_API |
bedrock-mantle only. Empty means messages for anthropic.* model IDs and chat-completions otherwise.
llm.aws_profile
| Type | Default | Allowed | Environment | Flag |
|---|---|---|---|---|
string | "" | RELGAP_LLM_AWS_PROFILE |
AWS profile for bedrock and bedrock-mantle. Empty means the default credentials.
llm.max_input_tokens
| Type | Default | Allowed | Environment | Flag |
|---|---|---|---|---|
integer | 30000 | at least 1 | RELGAP_LLM_MAX_INPUT_TOKENS |
Largest prompt, in estimated tokens. Lower-confidence entries are dropped first to fit.
llm.timeout
| Type | Default | Allowed | Environment | Flag |
|---|---|---|---|---|
string | 120s | pattern ^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$ | RELGAP_LLM_TIMEOUT |
Hard limit on the model call, as a Go duration. A timeout is a warning.
gitlab
gitlab.hosts
| Type | Default | Allowed | Environment | Flag |
|---|---|---|---|---|
list of object | [] |
Self-managed GitLab hosts. A git source on a host that isn't listed stays unresolved.
Each entry has these fields:
| Field | Type | Description |
|---|---|---|
host | string | Host name, such as gitlab.example.com. |
token_env | string | Env var with this host's token, sent in PRIVATE-TOKEN to this host only. Empty means GITLAB_TOKEN when GITLAB_HOST names this host. |
images
images.registries
| Type | Default | Allowed | Environment | Flag |
|---|---|---|---|---|
list of string | [] | RELGAP_IMAGES_REGISTRIES |
Registries to read images and oci:// charts from besides Docker Hub, ghcr.io, registry.k8s.io, quay.io, public.ecr.aws and mcr.microsoft.com. relgap asks every registry for anonymous tokens only.
Template
relgap config init writes this file:
# relgap configuration, written by 'relgap config init'.
# Each key below is commented out and shows its default. Uncomment a key to change it.
# Later layers win: defaults < user file < project file < env (RELGAP_*) < flags.
# 'relgap config show --sources' prints every effective value and where it came from, and
# 'relgap config validate' checks this file. Unknown keys are errors. Every key is described
# at https://relgap.sasskovacs.dev/reference/config.
schema_version: 1
#
# github:
# host: github.com # reserved; relgap always calls github.com for now
# concurrency: 8 # GitHub requests in flight, 1 to 64; 2 at most without a token
#
# cache:
# dir: "" # empty means $XDG_CACHE_HOME/relgap
# ttl_override: {} # per-source TTLs as Go durations, for example {endoflife: 24h}
#
# scan:
# roots: [] # what drift and pins scan when you name no directory
# exclude: # globs that are never scanned
# - '**/node_modules/**'
# - '**/.terragrunt-cache/**'
# detectors:
# ci_actions: false # also report GitHub Actions uses: pins in workflow files
# generic: false # read NAME_VERSION=x.y.z lines in extra_files
# extra_files: [] # globs the renovate-comment and generic detectors read, e.g. ["Makefile"]
#
# tools: {} # local registry entries, for example {hk: {repo: jdx/hk}} or {mod: {repo: ws/mod, host: bitbucket.org}}
# aliases: {} # raw pin name to tool, for example {TG_VERSION: terragrunt}
# ignore: [] # pins never reported, for example [{tool: terraform, path: "**/legacy/**"}, {name: "git::*bitbucket.org*"}]
#
# policy: # defaults for the CI flags
# fail_on: [] # breaking, deprecation, eol, vuln, drift, outdated, unchecked, kev
# max_behind: "" # for example minor:2, releases:10 or days:90; empty allows any lag
# min_confidence: 0.5 # hide entries below this confidence, 0 to 1
# vuln_severity: "" # low, medium, high or critical; empty counts every advisory
# vuln_fixable: false # count only advisories with a fixed version above the pin
#
# vulns: # advisories audit and outdated suppress and prioritize
# ignore: [] # entries: id (or an alias), reason, until (YYYY-MM-DD), tools (globs)
# vex: [] # OpenVEX v0.2.0 files, relative to this file
# kev: false # CISA KEV catalog from www.cisa.gov, like --kev
# epss: false # FIRST EPSS scores from api.first.org, like --epss
#
# llm: # only for 'relgap digest --summarize'
# provider: "" # empty is off; openai-compatible, anthropic, bedrock or bedrock-mantle
# model: "" # required with a provider
# base_url: "" # required for openai-compatible; empty means the provider default
# api_key_env: "" # env var with the API key (anthropic: ANTHROPIC_API_KEY); never a key
# api: "" # bedrock-mantle: messages or chat-completions; empty picks by model ID
# aws_profile: "" # bedrock and bedrock-mantle; empty means the AWS default chain
# max_input_tokens: 30000
# timeout: 120s # Go duration, at most 2m
#
# gitlab:
# hosts: [] # self-managed GitLab hosts, for example [{host: gitlab.example.com, token_env: MY_GITLAB_TOKEN}]
#
# images:
# registries: [] # image registries besides Docker Hub, ghcr.io, registry.k8s.io, quay.io, public.ecr.aws and mcr.microsoft.com