diff --git a/Makefile b/Makefile index 38555e2..d1a0ddc 100644 --- a/Makefile +++ b/Makefile @@ -161,6 +161,26 @@ dist: rm -rf $(DISTNAME) @echo "built $(DIST)" +distcheck: dist + @set -e; tmp=$$(mktemp -d); \ + trap 'rm -rf "$$tmp"' EXIT; \ + tar -xzf $(DIST) -C "$$tmp"; \ + $(MAKE) -C "$$tmp/$(DISTNAME)"; \ + $(MAKE) -C "$$tmp/$(DISTNAME)" test; \ + echo "distcheck: $(DISTNAME) builds and passes from the tarball" + +# The full release gate, fail-fast. Takes several minutes and needs the network +# for the example.com checks; it is not part of `make test`. +release-check: + $(MAKE) gate-audit + $(MAKE) test + $(MAKE) test-asan + $(MAKE) analyze + $(MAKE) fuzz + $(MAKE) fuzz-proxy + $(MAKE) fuzz-http + $(MAKE) distcheck + install: apex-twin mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(DOCDIR) $(DESTDIR)$(UNITDIR) install -m 0755 apex-twin $(DESTDIR)$(BINDIR)/apex-twin @@ -176,4 +196,4 @@ clean: rm -f *.gcov rm -rf $(DISTNAME) $(DIST) -.PHONY: all test gate-audit asan test-asan fuzz fuzz-selftest fuzz-red fuzz-proxy fuzz-proxy-red fuzz-http fuzz-http-red coverage analyze dist install clean +.PHONY: all test gate-audit asan test-asan fuzz fuzz-selftest fuzz-red fuzz-proxy fuzz-proxy-red fuzz-http fuzz-http-red coverage analyze dist distcheck release-check install clean diff --git a/README.md b/README.md index ba823b8..139be70 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,8 @@ make fuzz-proxy # mutated raw requests against the ASan proxy make fuzz-http # mutated raw HTTP against the ASan MCP HTTP face make install # binary, README and both systemd units (DESTDIR/PREFIX respected) make dist # apex-twin-.tar.gz: source, tests, docs, units +make distcheck # build the tarball, unpack it, build and test it there +make release-check # gate audit, suites, sanitizer, analyzer, fuzzers, distcheck ``` `make install` puts the binary in `$PREFIX/bin`, the README in @@ -433,6 +435,15 @@ record filters that read local state (`asset_list`, `finding_list`, count, so adding a tool forces a review. Renaming the gate call in `portscan` and `finding_add` produced three violations; the audit is part of `make test`. +`make distcheck` builds the tarball, unpacks it into a temporary directory, +runs `make` and `make test` there, and removes the directory. That is the check +that the thing you ship builds without the working tree. + +`make release-check` is the full gate, fail-fast: gate audit, suite, ASan/UBSan +suite, `gcc -fanalyzer`, `fuzz`, `fuzz-proxy`, `fuzz-http`, then `distcheck`. It +takes roughly 5–10 minutes on one core and needs the network for the +example.com checks; `make test` is the fast loop. + `make coverage` builds `apex-twin-cov` with `-O0 --coverage`, runs the suite and prints per-file line coverage (`tests/coverage.py`, gcov only, no extra tools). The first measured pass was 55.9%; the gap tests brought it to **76.7%** — @@ -447,7 +458,7 @@ the copied scope reason is now bounded with a precision, not left to snprintf. ## Status -0.21.0. Built and run: 45 tools, 298 checks, 340 fuzz cases and 76.7% line +0.22.0. Built and run: 45 tools, 298 checks, 340 fuzz cases and 76.7% line coverage. The loop closes: a probe captures the exchange as a pair, a finding points at it, `finding_update` gives it a state, an asset records the host it came from, `cors_check`/`cookie_audit`/`http_options` turn a web answer into a diff --git a/src/apex.h b/src/apex.h index d5a7afd..b71e6e0 100644 --- a/src/apex.h +++ b/src/apex.h @@ -15,7 +15,7 @@ #include "mcp.h" -#define APEX_VERSION "0.21.0" +#define APEX_VERSION "0.22.0" #define APEX_MAX_OUT (1u << 20) #define APEX_PATH_MAX 512 #define APEX_PATH_FULL 1024