Skip to content

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 ​

TypeDefaultAllowedEnvironmentFlag
integer11RELGAP_SCHEMA_VERSION

Config file format version.

github ​

github.host ​

TypeDefaultAllowedEnvironmentFlag
stringgithub.comRELGAP_GITHUB_HOST

Reserved for GitHub Enterprise Server. relgap doesn't read it yet and always calls github.com.

github.concurrency ​

TypeDefaultAllowedEnvironmentFlag
integer8at least 1RELGAP_GITHUB_CONCURRENCY--concurrency

Maximum concurrent requests per tool.

cache ​

cache.dir ​

TypeDefaultAllowedEnvironmentFlag
string""RELGAP_CACHE_DIR

Cache directory. Empty means $XDG_CACHE_HOME/relgap.

cache.ttl_override ​

TypeDefaultAllowedEnvironmentFlag
map of string{}

Per-source TTL overrides as Go durations, e.g. {endoflife: 24h}.

scan ​

scan.roots ​

TypeDefaultAllowedEnvironmentFlag
list of string[]RELGAP_SCAN_ROOTS

Directories scanned by drift and pins when no roots are given.

scan.exclude ​

TypeDefaultAllowedEnvironmentFlag
list of string["**/node_modules/**","**/.terragrunt-cache/**"]RELGAP_SCAN_EXCLUDE

Glob patterns excluded from scanning.

scan.detectors.ci_actions ​

TypeDefaultAllowedEnvironmentFlag
booleanfalseRELGAP_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 ​

TypeDefaultAllowedEnvironmentFlag
booleanfalseRELGAP_SCAN_DETECTORS_GENERIC

Detect NAME_VERSION=x.y.z assignments in extra_files.

scan.extra_files ​

TypeDefaultAllowedEnvironmentFlag
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 ​

TypeDefaultAllowedEnvironmentFlag
map of object{}

Local tool overrides and additions, keyed by tool name.

Each entry has these fields:

FieldTypeDescription
repostringowner/repo on GitHub, workspace/repo on Bitbucket Cloud, or the project path on GitLab.
hoststringHost of repo: github.com (the default), bitbucket.org, gitlab.com or a host in gitlab.hosts.

aliases ​

TypeDefaultAllowedEnvironmentFlag
map of string{}

Maps a raw pin name (e.g. TG_VERSION) to a tool name.

ignore ​

TypeDefaultAllowedEnvironmentFlag
list of object[]

Pins that are never reported: by tool, by raw name or by path, alone or together.

Each entry has these fields:

FieldTypeDescription
toolstringTool name, as pins and digests show it, to leave out of reports.
namestringGlob on the pin's raw name, as relgap pins shows it; * matches any characters. Matches unresolved pins too.
pathstringGlob on the file path; with tool or name, the rule applies only under matching paths.

policy ​

policy.fail_on ​

TypeDefaultAllowedEnvironmentFlag
list of string[]breaking, deprecation, eol, vuln, drift, outdated, unchecked, kevRELGAP_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 ​

TypeDefaultAllowedEnvironmentFlag
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 ​

TypeDefaultAllowedEnvironmentFlag
number0.5at least 0RELGAP_POLICY_MIN_CONFIDENCE--min-confidence

Entries below this confidence are hidden.

policy.vuln_severity ​

TypeDefaultAllowedEnvironmentFlag
string""``, low, medium, high, criticalRELGAP_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 ​

TypeDefaultAllowedEnvironmentFlag
booleanfalseRELGAP_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 ​

TypeDefaultAllowedEnvironmentFlag
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:

FieldTypeDescription
idstringAdvisory ID or any of its aliases, such as GHSA-cxww-7g56-2vh6, GO-2024-3080 or CVE-2024-42471.
reasonstringWhy the advisory is accepted. Reports show it next to the advisory.
untilstringLast day (YYYY-MM-DD, UTC) the entry applies. After it the entry suppresses nothing and relgap warns.
toolslist of stringTool names as pins show them, where * matches any characters: kubectl, npm:*, action:actions/*. Empty means every tool.

vulns.vex ​

TypeDefaultAllowedEnvironmentFlag
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 ​

TypeDefaultAllowedEnvironmentFlag
booleanfalseRELGAP_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 ​

TypeDefaultAllowedEnvironmentFlag
booleanfalseRELGAP_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 ​

TypeDefaultAllowedEnvironmentFlag
string""``, openai-compatible, anthropic, bedrock, bedrock-mantleRELGAP_LLM_PROVIDER

Empty disables the summarizer.

llm.model ​

TypeDefaultAllowedEnvironmentFlag
string""RELGAP_LLM_MODEL

Model ID the provider runs. Required when provider is set.

llm.base_url ​

TypeDefaultAllowedEnvironmentFlag
string""RELGAP_LLM_BASE_URL

API base URL. Required for openai-compatible; anthropic and bedrock-mantle have a default.

llm.api_key_env ​

TypeDefaultAllowedEnvironmentFlag
string""RELGAP_LLM_API_KEY_ENV

Name of the env var holding the API key. Keys are never read from files.

llm.api ​

TypeDefaultAllowedEnvironmentFlag
string""``, messages, chat-completionsRELGAP_LLM_API

bedrock-mantle only. Empty means messages for anthropic.* model IDs and chat-completions otherwise.

llm.aws_profile ​

TypeDefaultAllowedEnvironmentFlag
string""RELGAP_LLM_AWS_PROFILE

AWS profile for bedrock and bedrock-mantle. Empty means the default credentials.

llm.max_input_tokens ​

TypeDefaultAllowedEnvironmentFlag
integer30000at least 1RELGAP_LLM_MAX_INPUT_TOKENS

Largest prompt, in estimated tokens. Lower-confidence entries are dropped first to fit.

llm.timeout ​

TypeDefaultAllowedEnvironmentFlag
string120spattern ^([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 ​

TypeDefaultAllowedEnvironmentFlag
list of object[]

Self-managed GitLab hosts. A git source on a host that isn't listed stays unresolved.

Each entry has these fields:

FieldTypeDescription
hoststringHost name, such as gitlab.example.com.
token_envstringEnv 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 ​

TypeDefaultAllowedEnvironmentFlag
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:

yaml
# 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