Skip to content

Configuration file

.witnyx.yml holds a repository’s Witnyx settings: when witnyx check fails the build, the product name and version in the report, which otherwise come from the software bill of materials (SBOM), where the product’s security.txt is published, and the vulnerabilities assessed as not affecting the product. witnyx init creates one, with a comment on each field. Every field but version is optional, and an option on the command line wins over the same setting in the file.

A file that sets every field:

version: 1
failOn:
- exploited
- eol
product:
name: my-app
version: 2.4.1
securityTxtUrl: https://example.com/.well-known/security.txt
notAffected:
- id: CVE-2025-12345
component: pkg:maven/org.example/lib
justification: vulnerable_code_not_in_execute_path
note: We never call the affected parser.
assessedBy: Sam Example
approvedBy: Jane Doe <[email protected]>
approvedOn: 2026-11-02
expires: 2027-05-01

Its JSON Schema is https://witnyx.dev/schemas/config/v1.json. witnyx schema config prints it, and the configuration file schema page shows it, with the points where the loader and the schema differ.

  • check reads .witnyx.yml at the root of --repo-dir, which is the current folder by default. Without the file, the defaults apply, and the build fails only on an actively exploited vulnerability.
  • --config names another file. check then reads that file, and not the one in the repository.
  • The repository’s file is read only when it is a regular file inside the repository. A symbolic link that stays inside the repository is followed. A link that leads outside, a link to a missing file, or a folder with that name is an error, not a missing file, so a pull request cannot make the check read a file elsewhere on the build machine. A file that --config names is your own choice, so its links are followed.
  • The file may hold at most 256 KiB.
  • The MCP server’s check_sbom tool reads the file in its repoDir the same way.

A mistake in the file stops the check with exit code 2 and WX-CONFIG. The message names the file and the line, or the field, such as notAffected[0].approvedBy. Unknown fields are errors too, so a misspelt approvedBy cannot drop an approval unnoticed.

See also: Configure .witnyx.yml, Choose when the build fails and Mark a finding “not affected”.

The table is generated from the schema. A field with a dot is inside the field before it: product.name is name inside product, and notAffected[].id is id in each entry of notAffected.

Field Type Description
version integer Required. The format version; always 1.
failOn string, array of string or null When to fail the build, as with --fail-on. The --fail-on flag wins over this. none cannot be combined with other values, and at most one quality: value is allowed (the loader checks the second rule).
product object or null Replaces the product name and version taken from the SBOM; --product-name and --product-version win over this.
product.name string or null
product.version string, number, boolean or null
securityTxtUrl string or null Where security.txt is published. It is fetched only from a public https host; plain http is accepted only for localhost, 127.0.0.1 or [::1].
notAffected array of object or null Vulnerabilities assessed as not affecting the product. An entry counts only when a person approved it. Two entries with the same id (in any letter case) and component are refused by the loader, not by this schema.
notAffected[].id string Required. The vulnerability ID or one of its aliases, e.g. a CVE ID.
notAffected[].component string Required. A package URL; without a version it covers every version.
notAffected[].justification string Required. One of component_not_present, vulnerable_code_not_present, vulnerable_code_not_in_execute_path, vulnerable_code_cannot_be_controlled_by_adversary, inline_mitigations_already_exist.
notAffected[].note string or null
notAffected[].assessedBy string or null Who assessed it; an agent writes its own name here.
notAffected[].approvedBy string or null The person who approved the entry. Agents leave it empty.
notAffected[].approvedOn string or null Required when approvedBy is set.
notAffected[].expires string Required. After approvedOn, and at most 12 months after it.

The format version of the file. It is required, and it is always 1. A file without it is refused, and so is a file with another value, such as version: 2.

version: 1

When check fails the build, with exit code 1. The values are those of --fail-on, and --fail-on wins over this field. Without either, the build fails only on an actively exploited vulnerability, as with failOn: [exploited].

Value The build fails when
exploited a component has an actively exploited vulnerability
critical a component has a vulnerability of critical severity, actively exploited or not
high a component has a vulnerability of high or critical severity
eol a component is past its end of life
quality:<min %> the SBOM fails the EU legal minimum, or its completeness score is below the minimum, a whole number from 0 to 100
none never; none cannot be combined with other values

A vulnerability that a person assessed as not affecting the product never fails the build; one whose entry is still pending review counts as before (see notAffected). Write several values as a list. One value may stand alone, as in failOn: exploited, but a text with commas is one value, and it is refused. The loader accepts the values in any letter case, and at most one quality: value.

version: 1
failOn:
- exploited
- high
- quality:80

The product name and version that the report shows. Without them, the report takes the name and version from the SBOM. --product-name and --product-version win over this field, and an empty value counts as not set.

version: 1
product:
name: my-app
version: 2.4.1

Where the product’s security.txt is published, when it is not .well-known/security.txt in the repository. The disclosure check reads it from there, and --security-txt-url wins over this field.

  • It must be an absolute https URL. Plain http is accepted only for localhost, 127.0.0.1 and [::1].
  • The file is repository content, which a pull request can change. So check fetches this URL only when it uses https, every address that its host resolves to is public, and no proxy stands in the way. Otherwise the report notes that the URL was not fetched. A URL given with --security-txt-url is your own choice and skips that test.
  • With --offline, the URL is never fetched.
version: 1
securityTxtUrl: https://example.com/.well-known/security.txt

Vulnerabilities assessed as not affecting the product, for example because the product never calls the affected code. Only actively exploited and other known vulnerabilities can be assessed. An entry matches a finding by the vulnerability’s ID or any of its aliases, in any letter case, and by the component’s package URL. A package URL without a version covers every version, and the first entry that matches wins.

Field Rule
id Required. The vulnerability’s ID, such as a CVE ID, or one of its aliases.
component Required. A package URL, pkg:type/namespace/name, with or without a version.
justification Required. One of component_not_present, vulnerable_code_not_present, vulnerable_code_not_in_execute_path, vulnerable_code_cannot_be_controlled_by_adversary and inline_mitigations_already_exist.
note Optional. Why the product is not affected.
assessedBy Optional. Who assessed it. An agent writes its own name here.
approvedBy The person who approved the entry, with an email address, such as Jane Doe <[email protected]>. Only a person fills it in.
approvedOn The day of the approval, YYYY-MM-DD. Required when approvedBy is set, and empty when it is not.
expires Required. The last day on which the entry counts, YYYY-MM-DD: after approvedOn, and at most 12 months after it.

An entry without approvedBy is pending human review. The finding then shows as pending and still counts for failOn. Agents, the MCP server’s propose_not_affected tool among them, write entries like this one and leave approvedBy and approvedOn empty:

version: 1
notAffected:
- id: CVE-2025-12345
component: pkg:maven/org.example/lib
justification: vulnerable_code_not_in_execute_path
note: We never call the affected parser.
assessedBy: Coding agent
approvedBy:
approvedOn:
expires: 2027-05-20

A person approves the entry by filling in approvedBy and approvedOn, as in the file at the top of this page. The finding is then assessed as not affected and no longer fails the build. An approval dated in the future counts from that day on. After expires, the finding is active again, and the report says that its assessment expired. Two entries with the same ID, in any letter case, and the same component are refused.

Witnyx is a record-keeping and workflow tool. It does not certify compliance. Nothing on this site is legal advice.