Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (32 loc) · 1.99 KB
/
Copy pathMakefile
File metadata and controls
44 lines (32 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
SHELL := /bin/bash
.PHONY: all engine engine-http3 engine-test platform-install python-check viz-test smoke docker clean help
all: engine ## Build the execution engine (default)
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-16s\033[0m %s\n", $$1, $$2}'
engine: ## Build the Rust execution engine (HTTP/1.1+2, WebSocket, gRPC) -> engine-rs/target/release/offat-engine
cd engine-rs && cargo build --release
engine-http3: ## Build the engine with the HTTP/3 + QUIC transport enabled
cd engine-rs && RUSTFLAGS="--cfg reqwest_unstable" cargo build --release --features http3
engine-test: ## Run the engine's unit tests
cd engine-rs && cargo test
platform-install: ## Install the platform + its libraries (with the code-graph extra)
pip install ./bundle ./triager "./whitebox[graph]" ./graybox ./platform ./reporter
python-check: ## Byte-compile the Python packages
python3 -m compileall -q bundle/offat_bundle triager/offat_triage whitebox/offat_wb \
graybox/offat_gb platform/offat_platform reporter/offat_report
viz-test: ## Smoke-test the visualizer render logic
node viz/tests/dom_smoke.js
smoke: ## Offline end-to-end check (map -> prg -> threat-model -> test-gen)
PYTHONPATH=platform:graybox:whitebox:triager:bundle:reporter \
python3 -m offat_platform map graybox/tests/fixtures/app --no-graft --threat-model \
-o /tmp/offat-smoke.offat.json
PYTHONPATH=platform:graybox:whitebox:triager:bundle:reporter \
python3 -m offat_platform test-gen /tmp/offat-smoke.offat.json
PYTHONPATH=platform:graybox:whitebox:triager:bundle:reporter \
python3 -m offat_platform validate /tmp/offat-smoke.offat.json && echo "platform smoke OK"
docker: ## Build the platform image (Rust engine + Python platform)
docker build -t offat:latest -f docker/Dockerfile .
clean: ## Remove build artifacts and reports
rm -rf engine-rs/target offat-report /tmp/offat-smoke*.json
find . -name __pycache__ -type d -prune -exec rm -rf {} +