Appearance
Build commands
These targets build, benchmark and package Spalto from a source checkout, and three waap commands read the license and component inventory from a built binary.
make bench-inspect
Run from the repository root with the native RE2 build prerequisites. It measures BenchmarkShapes/{get,form4k,json4k,form16k44,form64k173,form64k41} in internal/modules/signatures, five 10-second samples per shape. Every request must return an allow verdict. Stdout is Go benchmark text suitable for benchstat.
sh
make bench-inspect > /tmp/inspect-before.txtThe target writes medians for ns/op, B/op, allocs/op and rule-evals/op to test/perf/baseline.json, replacing only the current OS entry. Failed or incomplete runs leave the baseline unchanged. Rule entries are counted on separate untimed requests using Coraza's debug hook, with debug logging off during measurement.
See docs/benchmarks.md. This is separate from the end-to-end budget check.
make sbom
Run from the repository root; make build runs it automatically. It writes dist/sbom.cdx.json (CycloneDX 1.6), THIRD_PARTY_NOTICES.md (components, full license texts and NOTICE files of bundled components) and the embedded catalog internal/sbom/catalog/.
- Needs Go and the checked-in lockfiles.
- Node.js and an installed
web/node_modulesare optional: reviewed texts missing on the host come from the tracked catalog. - A cold Go module cache can need network access.
GO_TAGSdoes not change the inventory (alwaysre2_cgo).- It fails, writing nothing, when a reviewed component's license files changed or a bundled text is unavailable. The error names the component.
make sbom-check
Regenerates in memory and fails when THIRD_PARTY_NOTICES.md or a catalog file differs from the tracked copy, is missing, or is stale. Part of make lint.
Fix: run make sbom and commit the result.
make sbom-review
Prints JSON entries (grouped by review file) for every bundled component without a review: the license files found and their SHA-256, with an empty license.
Read the files, fill in the SPDX expression, add the entries to the named file, then run make sbom. The underlying command is:
sh
go run -tags re2_cgo ./tools/sbom [-check | -review] [-root dir]waap version
Shows the product version, commit, exact Go version, tags and expected Envoy version. It reads the local binary, without a running server or source checkout.
sh
waap versionA development binary with no stamped version can still show version, but cannot claim a release SBOM.
The same inventory is available under System → About and licenses.
waap sbom
Writes the software bill of materials for the local binary. -format defaults to cyclonedx; the other supported value is spdx.
sh
waap sbom -format cyclonedx -o sbom.cdx.json
waap sbom -format spdx -o sbom.spdx.json-o atomically writes an owner-only file, replacing an existing output file. Without it, output goes to stdout. Redirected output preserves exact bundle bytes. Terminal output escapes control characters and bidirectional controls while keeping line breaks.
Concurrent CLI and API generation preserves the inventory and produces the same bytes. For a bundle comparison, invoke the unpacked bin/waap, so build flags and release metadata come from the same binary as the downloaded documents.
The command refuses missing or unreviewed linked components.
waap licenses
Writes the license texts and notices of the bundled components. Without -component it covers all components. -component matches the exact component name.
sh
waap licenses -component github.com/corazawaf/coraza/v3 -o coraza-notices.txt
waap licenses -o THIRD_PARTY_NOTICES.txt-o atomically writes an owner-only file, replacing an existing output file. Without it, output goes to stdout. The command refuses missing or unreviewed linked components.
make release
Builds the UI and a -trimpath, re2_cgo binary, then packages the linked-only inventory and notices in dist/waap-<version>-<goos>-<goarch>.tar.gz, with a sibling .sha256.
- Requires Node.js, pkg-config, native RE2 and the normal build prerequisites.
- A dirty checkout is refused. Use
ALLOW_DIRTY=1 make releaseonly for local trials. - Go stamps the tag or VCS pseudo-version, adding
+dirtyfor modified builds. There is no version override. - RE2 records the release host's pkg-config version, not an upstream source revision.
- Release documents are also written to
dist/release-sbom.cdx.json,dist/release-sbom.spdx.jsonanddist/release-THIRD_PARTY_NOTICES.txt.make sbomkeeps its separate source view.
Reproducible builds:
sh
SOURCE_DATE_EPOCH=1700000000 make releaseSOURCE_DATE_EPOCH fixes archive modification times and the SBOM creation time. Otherwise archive times use the commit time, SPDX uses the binary's vcs.time, and CycloneDX omits its optional timestamp.
To check reproducibility, run the build twice on the same commit, host and toolchain and compare the .sha256 files.
make packages
Alias: make package.
Builds the arm64 .deb in the VM waap-ha (Ubuntu 26.04) and the arm64 .rpm in the VM waap-rocky9 (Rocky Linux 9, scripts/lima-el9.yaml, created on first use) into dist/packages/. scripts/pkg-build.sh runs tools/release and then tools/packages, offline with the host's module cache.
tools/packages accepts these flags:
| Flag | What it does | Default |
|---|---|---|
-bundle | Accepted by tools/packages; the source does not describe it further. | |
-envoy | Accepted by tools/packages; the source does not describe it further. | |
-arch | Accepted by tools/packages; the source does not describe it further. | |
-version | Accepted by tools/packages; the source does not describe it further. | |
-out | Accepted by tools/packages; the source does not describe it further. | |
-guide | Accepted by tools/packages; the source does not describe it further. | |
-formats deb|rpm|deb,rpm | Package formats to build. | both |
-deb-re2-min VERSION | Lowest libre2 the .deb accepts. pkg-build.sh passes the build host's libre2-dev version. |
pkg-build.sh reads these variables: PKG_FORMATS (default rpm on RHEL-family hosts, else deb), ENVOY_BIN, WORK_DIR, PACKAGE_VERSION (default 0.2.0) and SOURCE_DATE_EPOCH.
The requirements are read from the binaries (shared libraries, newest glibc symbol version) and printed. Each package is built twice and must be byte-identical. Build the UI first with cd web && npm run build. tools/release also accepts WAAP_SKIP_UI=1 (the UI is already built; no npm ci).
Details: docs/install-guide.md.
make pkg-test and make pkg-test-rpm
make pkg-testinstalls, starts, sets up, sends a benign request and an attack, reinstalls, uninstalls and purges the.debinwaap-ha.make pkg-test-rpmdoes the same with the.rpminwaap-rocky9.scripts/pkg-test.shpicks the format from the host.
make pkg-upgrade-test-rpm
The upgrade test through the .rpm.
amd64 targets
These run in the VM waap-x86 under Rosetta, through scripts/amd64/run.sh build|test|upgrade.
make packages-amd64: both formats, in Ubuntu 26.04 and Rocky Linux 9 amd64 containers.make pkg-test-amd64: install tests in amd64 systemd containers of both.make pkg-upgrade-test-amd64: the.rpmupgrade test.make images-amd64andmake image-test-amd64.
scripts/image-build.sh and image-test.sh take IMAGE_ARCH and NERDCTL (for example sudo nerdctl).