Skip to content

How a check works

witnyx check reads a software bill of materials (SBOM), looks up its components in public data sources, runs five checks and writes a report. Everything except the lookups happens on your machine. The exit code tells your CI whether to stop the build.

  1. Find the SBOM. Pass its path, or - to read it from standard input. Without either, check looks in --repo-dir (the current folder by default) for bom.json, bom.xml, *.cdx.json, *.cdx.xml, *.spdx.json, target/bom.json and build/reports/bom.json, in that order, and takes the first match. A pattern with two matches stops the run with WX-SBOM-AMBIGUOUS, and a symbolic link is never picked. The file it found is named on standard error:
Terminal window
$ witnyx check
witnyx: no SBOM given, using bom.json
  1. Read the settings. The settings come from .witnyx.yml in --repo-dir, or from the file that --config names, and options on the command line win over the file. The rules that fail the build come from --fail-on, else from the file’s failOn, else the default, exploited.
  2. Parse the SBOM. Witnyx reads CycloneDX 1.4 to 1.6 (JSON or XML) and SPDX 2.2 or 2.3 (JSON). It tells the formats apart by their content, not by the file name. Another format or SPDX version stops the run with WX-SBOM-UNSUPPORTED, a file that is not valid JSON or XML with WX-SBOM-PARSE, and an SBOM without components with WX-SBOM-EMPTY. The report keeps the file’s SHA-256 in sbom.sha256, so you can match a report to the exact file it checked.
  3. List the components. A component whose package URL includes a version, such as pkg:maven/org.apache.logging.log4j/[email protected], can be looked up. A component without one is counted as not checked, and the text report says so: (1 not checked: no package ID or version). Up to this step nothing has left your machine, so a bad config file, rule or SBOM stops the run before any request is made.
  4. Ask the data sources. OSV, CISA KEV, ENISA and endoflife.date, described under Data sources, load at the same time, within one --timeout budget (120 seconds by default).
  5. Run the five checks in the table below. Then the notAffected entries of your config file mark the findings they cover as “Assessed as not affected”.
  6. Apply the rules. A finding that matches a --fail-on rule fails the build, and the exit code says so: 0 when no rule triggered, 1 when one did, 2 when the check could not run or was incomplete with --strict.
  7. Write the report. The terminal gets the text report, or one JSON document in agent mode. --output also writes the report to files, in any of the four formats:
Terminal window
witnyx check bom.json --output json=witnyx-report.json --output sarif=witnyx.sarif
Check What it reports What it needs
Actively exploited Vulnerabilities in your components that CISA lists as exploited, tagged when ENISA lists them too OSV and CISA KEV; ENISA for the tag
End of life Components whose release is past its end of life, or within 90 days of it endoflife.date
Other known vulnerabilities The other vulnerabilities OSV knows, the most severe first OSV
SBOM quality “EU legal minimum” and “Completeness” against BSI TR-03183-2 The SBOM alone
Disclosure A SECURITY.md with a contact, and a security.txt as RFC 9116 describes it The repository, or the security.txt URL you give
Source Name in dataSources Used for What Witnyx sends Kept in the cache Required
OSV osv The known vulnerabilities of each package The package URL and version of each component that has one No: asked on every run yes
CISA’s Known Exploited Vulnerabilities catalogue cisa-kev Which vulnerabilities are actively exploited Nothing: the whole list is downloaded Yes yes
ENISA’s list of exploited vulnerabilities, from the EU Vulnerability Database enisa-euvd The ENISA tag on actively exploited findings Nothing: the whole list is downloaded Yes no
endoflife.date endoflife-date End of life Nothing: every product is downloaded Yes no
The security.txt URL you give security-txt Disclosure A request for that one file No no

SBOM quality needs no network, and neither does a SECURITY.md or .well-known/security.txt read from the repository. Privacy lists the exact addresses and what each request carries.

Every report lists its sources in dataSources, each with its status: ok (downloaded or asked now), cached (a copy from the cache, with its age in ageHours), error or skipped, and a message that says why when it was not ok. The report schema describes each field.

The three downloaded lists are kept on disk, so most runs download nothing:

  • A copy less than 24 hours old is used as it is.
  • An older copy is downloaded again. When that download fails, a copy up to 7 days old is used instead: dataSources shows cached, its age, and why the download failed. With no copy that young, the source fails.
  • With --offline, a copy of any age is used and nothing is downloaded. A source without a copy fails.
  • A download is stored only when Witnyx can read it. ENISA’s list, for example, is accepted only when every entry is well formed, no vulnerability appears twice and it has at least 1,000 entries, so a cut-off download never replaces a good copy. A copy that can no longer be read counts as missing.

witnyx cache update downloads the three lists whatever the age of their copies, and witnyx version shows how old each copy is:

Terminal window
witnyx cache update
witnyx version

--cache-dir sets the cache folder. Where Witnyx keeps files gives the default for each system.

A check is complete when both required sources answered: OSV and CISA KEV. Without them, Witnyx cannot tell whether a component has an actively exploited vulnerability, so when either one fails, no component counts as checked:

  • result.complete is false, and sbom.notChecked equals the number of components;
  • result.status is incomplete, unless a --fail-on rule triggered, which makes it fail: a check can fail and be incomplete at once;
  • the text report says [INCOMPLETE], with the source that failed and why.

OSV fails when it cannot be reached within --timeout or answers with an error, and with --offline it is skipped. CISA KEV fails the same way when the cache has no usable copy either. OSV is also skipped, and the check incomplete, when no component has a package URL with a version. Components without a versioned package URL count as not checked, but on their own they do not make the check incomplete.

An optional source (ENISA, endoflife.date, security.txt) that fails adds a note and leaves the check complete. A --fail-on rule that needs it, such as eol without end-of-life data, is then not evaluated.

OSV has no offline copy, so a check with --offline is always incomplete. Here is one in a folder with an empty cache. The notes on enisa-euvd and endoflife-date come from optional sources, which do not make it incomplete:

Terminal window
$ witnyx check bom.json --offline
Witnyx release security check — my-app 2.4.1
[INCOMPLETE] 3 components not checked (osv: offline mode; cisa-kev: No cached CISA KEV data available for offline use)
SBOM quality
EU legal minimum: pass
Completeness: 21% against [email protected] (9 of 42 required values filled)
SBOM creator: missing · Timestamp: present
Biggest gaps: Component creator (0 of 4) · Filename (0 of 4) · Dependencies (0 of 4)
Note: 2 components have licences without acknowledgement; BSI TR-03183-2 counts only licences marked "concluded" (distribution licences) or "declared" (original licences).
Our reading of the EU Cyber Resilience Act; not legal advice.
Disclosure: SECURITY.md missing · security.txt missing
[WARN] SECURITY.md missing -> add one with a security contact (email address or URL)
[WARN] security.txt missing -> publish .well-known/security.txt with Contact and Expires (RFC 9116)
Note: enisa-euvd: No cached ENISA data available for offline use; exploited findings are shown without the ENISA tag
Note: endoflife-date: No cached end-of-life data available for offline use; end-of-life check skipped
Checked 2026-11-18T09:12:03Z · 3 components
Continuous monitoring and 24-hour reporting alerts → witnyx.dev

An incomplete check exits 0, because no --fail-on rule triggered. Add --strict to make it exit 2 instead. The report is still written, with result.exitCode 2:

Terminal window
$ witnyx check bom.json --offline --strict
[INCOMPLETE] 3 components not checked (osv: offline mode; cisa-kev: No cached CISA KEV data available for offline use)

So --offline --strict never exits 0: it exits 2, or 1 when a --fail-on rule triggers. Exit code 2 lists every case.

See also: Your first check, Configure .witnyx.yml, Mark a finding “not affected”, Choose when the build fails, Use from an AI agent, GitHub Actions for the SARIF upload, and Work offline.

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