
witnyx
io.github.witnyx/witnyx
Check an SBOM for actively exploited vulnerabilities, end-of-life components and SBOM quality
Documentation
Witnyx
Release security check for software sold in the EU: actively exploited vulnerabilities, end-of-life components, SBOM quality and vulnerability-disclosure readiness. It runs locally in your CI. No account needed.
Status: early development. The design is in docs/specs/.
Licensed under the Apache License 2.0.
Documentation
The documentation for people who use the tool is a site in docs/site/ (Astro Starlight), to be published at docs.witnyx.dev at launch. To read it locally, run pnpm install and then pnpm dev in docs/site/ (Node 26 and pnpm 12). docs/site/README.md explains how its reference pages are generated and checked.
Try it (development build)
Requires Java 25.
mvn -q verify
java -jar witnyx-cli/target/witnyx-cli-0.1.0-SNAPSHOT.jar check path/to/bom.json --output json=report.json
--output html=report.html also writes a one-page HTML report to hand to a customer or an auditor; print it from a browser to get a PDF. The other formats are text, Markdown and SARIF (report formats).
Exit codes: 0 the failure rule did not trigger (the report says when the check was incomplete), 1 a --fail-on rule triggered (by default: an actively exploited vulnerability or a known malicious package), 2 the check could not run, or was incomplete with --strict.
witnyx vex export writes the approved "not affected" assessments of .witnyx.yml as an OpenVEX document to publish with a release, and witnyx vex import turns a supplier's OpenVEX or CycloneDX VEX statements into entries that a person approves (Export and import VEX). Both work offline.
check sends only package IDs (package URLs) and versions to OSV. The SBOM file leaves your machine only when you run witnyx upload (below), and there is no telemetry.
Comparing two releases
witnyx diff compares the SBOM and the JSON report of the last release with those of the new one: the components added, removed and updated, licence changes, the findings new and gone, and the change in SBOM quality. It reads only the files and exits 0 whatever changed.
witnyx diff --old last-release/bom.json --old last-release/witnyx-report.json --new bom.json --new witnyx-report.json
Keep bom.json and the report that check writes with --output json=witnyx-report.json with each release (compare two releases).
Uploading to the hosted service
The hosted service is in development: it is not online yet, and its address may change before it is.
witnyx upload sends an SBOM, and optionally the report that check wrote for it, to the hosted Witnyx service, which records the deploy. It needs a key in WITNYX_API_KEY; without one, nothing is sent. By default it never blocks a deploy: an upload that is not recorded prints a warning and exits 0, and once the key and the options were accepted, the failure is remembered and reported with the next upload that succeeds. --require-upload makes it exit 2 instead.
witnyx upload --sbom "bom.json" --report "report.json" --env "$DEPLOY_ENV"
docs/upload-contract-v1.md lists exactly what is sent, and how failed uploads are remembered.
For AI coding agents
Witnyx detects coding agents. In agent mode it prints exactly one JSON document on standard output:
witnyx check --agent
witnyx mcp serves the same check as an MCP server over standard input and output, with four tools: check_sbom, explain_finding, propose_not_affected and get_report_schema. AGENTS.md shows how to register it with an MCP client.
witnyx mcp
- AGENTS.md explains how an agent runs Witnyx and reads its result, and how to work on this repository.
- skills/witnyx-release-check/SKILL.md is a ready-made agent skill: it runs the check after dependency changes and before a release.
Building from source
Requires Java 25 and Maven 3.9 or later.
mvn -q verify
java -jar witnyx-cli/target/witnyx-cli-0.1.0-SNAPSHOT.jar version
mvn -q verify builds and tests both modules. It writes the CLI as one JAR, witnyx-cli/target/witnyx-cli-0.1.0-SNAPSHOT.jar, and Witnyx's own CycloneDX SBOM, target/witnyx-sbom.cdx.json. The CycloneDX plugin needs Maven online, so an offline build (mvn -o) does not write the SBOM. CI checks the SBOM with Witnyx itself:
java -jar witnyx-cli/target/witnyx-cli-0.1.0-SNAPSHOT.jar check target/witnyx-sbom.cdx.json --fail-on exploited --no-agent
Native binary
The native profile builds a native executable with GraalVM Community for JDK 25. Point GRAALVM_HOME or JAVA_HOME at GraalVM for this build.
mvn -Pnative -pl witnyx-cli -am package -DskipTests
witnyx-cli/target/witnyx version
On Windows the binary is witnyx.exe in the same folder. The native smoke tests run the binary as a process. On a fresh clone, -am installs the parent POM along with the core module:
mvn -q install -pl witnyx-core -am -DskipTests
mvn -q test -pl witnyx-cli -Dtest=NativeSmokeTest -Dsurefire.failIfNoSpecifiedTests=false -Dwitnyx.native=$PWD/witnyx-cli/target/witnyx
Docker image
The Dockerfile builds the native binary from the JAR inside the GraalVM build image, then copies it into a minimal runtime image. It builds for this machine's architecture only.
mvn -o -q package -DskipTests
docker build -t witnyx:dev .
docker run --rm witnyx:dev version
Releases
.github/workflows/release.yml makes a release from a tag (spec section 7). For a tag vX.Y.Z it builds and smoke-tests the native binaries for Linux (x64 and ARM64), macOS (Apple silicon) and Windows (x64), the JAR, our SBOM, LICENSE, NOTICE and SHA256SUMS, and the image ghcr.io/witnyx/witnyx:X.Y.Z for linux/amd64 and linux/arm64. It signs SHA256SUMS with Sigstore (keyless), records the build provenance of every asset and of the image, and creates a draft release. Publishing the draft starts the workflow again, and that run bumps the formula in witnyx/homebrew-tap.
A tag with a pre-release part, such as v0.1.0-rc.1, and a run started by hand with dry-run ticked (the default) are rehearsals: they build and test everything and publish nothing. A run started by hand on a plain version tag with dry-run unticked publishes like a pushed tag. The bundle is kept as the workflow artifact witnyx-release for 7 days. scripts/release-plan.sh holds the rule and scripts/release-plan.test.sh tests it.
A publishing run also puts com.witnyx:witnyx-parent, witnyx-core and witnyx-cli on Maven Central (the central job, plan M8). The job builds them from the tagged commit at the commit's time, refuses a CLI JAR that is not byte for byte the release JAR, signs every file with the release key and uploads the bundle to the Central Portal, where it waits until the owner presses Publish. Rehearsal tags keep the signed bundle as the workflow artifact central-bundle and upload nothing. The signing key and the Portal token are secrets of the environment maven-central, which admits only v* tags, so a manual run from a branch builds no Central bundle. mvn -Pcentral -DskipTests -Dgpg.skip verify builds the sources and Javadoc JARs locally.
gh workflow run release.yml # a rehearsal from main
gh run list --workflow release.yml
gh run download <run-id> --name witnyx-release --dir rehearsal
The artifacts' zip files drop the executable bit, so run chmod +x on a binary before you start it.
ghcr.io/witnyx/witnyx:0.3.0@sha256:f602b817dc0128cade64d57b1916dd3566aae00190c459740d98def270235260docker pull ghcr.io/witnyx/witnyx:0.3.0@sha256:f602b817dc0128cade64d57b1916dd3566aae00190c459740d98def270235260:undefined