feat(doos): add container runtime, audit cases, example demo and tests

- New rootless doos container runtime: sandbox, cgroup, network, images, hardening, davmount, CLI plus molo integration
- 18 CVE audit reproductions with READMEs and Makefiles
- Example DoosDemo routes, IndexCatalog, static assets, spec update
- CLI serve on 0.0.0.0:8000, arg parser, dev server improvements
- Runtime HTTP fixes, supervisor isolation backend
- Tests for doos, example doos routes, CLI serve; suite count 261 to 265
This commit is contained in:
2026-11-06 04:36:00 +01:00
parent a2a737e21d
commit 0595284fe3
170 changed files with 12212 additions and 145 deletions
+11 -5
View File
@@ -42,12 +42,14 @@ EXAMPLE_SRCS = \
$(EXAMPLE_DIR)/app/Templates.cpp \
$(EXAMPLE_DIR)/app/Embedded.cpp \
$(EXAMPLE_DIR)/app/Index.cpp \
$(EXAMPLE_DIR)/app/IndexCatalog.cpp \
$(EXAMPLE_DIR)/app/RoutingDemo.cpp \
$(EXAMPLE_DIR)/app/DataDemo.cpp \
$(EXAMPLE_DIR)/app/SecurityDemo.cpp \
$(EXAMPLE_DIR)/app/FormatsDemo.cpp \
$(EXAMPLE_DIR)/app/RealtimeDemo.cpp \
$(EXAMPLE_DIR)/app/OpsDemo.cpp \
$(EXAMPLE_DIR)/app/DoosDemo.cpp \
$(EXAMPLE_DIR)/app/StatsDemo.cpp \
$(EXAMPLE_DIR)/app/SecurityExtraDemo.cpp \
$(EXAMPLE_DIR)/app/PlatformDemo.cpp \
@@ -74,7 +76,7 @@ EXAMPLE_INC = -I$(EXAMPLE_DIR) -I$(EXAMPLE_BUILD) -Isrc
# Real framework parts the example links: Google Cloud (src/google) over the
# HTTP client (src/clients, wolfSSL TLS) and the operability breaker.
EXAMPLE_REAL_LIBS = build/ai/libai.a build/google/libgoogle.a build/clients/libclients.a \
build/liboperability.a
build/liboperability.a build/doos/libdoos.a
.PHONY: example-deploy example-verify deploy verify example example-real-libs example-assets example-test example-clean example-locust
@@ -113,14 +115,14 @@ example: example-assets example-real-libs
example-test: example
rm -rf $(EXAMPLE_BUILD)/tests
mkdir -p $(EXAMPLE_BUILD)/tests
mkdir -p $(EXAMPLE_BUILD)/tests $(EXAMPLE_BUILD)/tmp
find $(EXAMPLE_TESTDIR) -name '*_test.cpp' | sort > $(EXAMPLE_BUILD)/tests/list.txt
xargs -P $(EXAMPLE_TEST_JOBS) -I{} sh -c ' \
t={}; n=`echo $$t | sed "s|$(EXAMPLE_TESTDIR)/||; s|/|_|g; s|\\.cpp$$||"`; \
b=$(EXAMPLE_BUILD)/tests/$$n; \
if $(CXX) $(EXAMPLE_CXXFLAGS) -I$(EXAMPLE_DIR) -I$(EXAMPLE_TESTDIR) -Isrc \
$$t $(EXAMPLE_BUILD)/libexample.a $(EXAMPLE_REAL_LIBS) -lwolfssl -o $$b > $$b.log 2>&1; \
then MOLO_ENV_FILES=off $$b >> $$b.log 2>&1; else echo "COMPILE FAILED: $$t" >> $$b.log; false; fi; \
then MOLO_ENV_FILES=off TMPDIR=$${TMPDIR:-$(EXAMPLE_BUILD)/tmp} $$b >> $$b.log 2>&1; else echo "COMPILE FAILED: $$t" >> $$b.log; false; fi; \
echo $$? > $$b.rc' < $(EXAMPLE_BUILD)/tests/list.txt
pass=0; fail=0; \
for l in `ls $(EXAMPLE_BUILD)/tests/*.log | sort`; do \
@@ -149,8 +151,12 @@ example-deploy: example
kill `cat $(EXAMPLE_RUN)/server.pid`; \
for i in 1 2 3 4 5 6 7 8 9 10; do kill -0 `cat $(EXAMPLE_RUN)/server.pid` 2>/dev/null || break; sleep 0.5; done; \
fi
setsid nohup $(EXAMPLE_BUILD)/living-server $(EXAMPLE_PORT) --no-locust \
> $(EXAMPLE_RUN)/server.log 2>&1 < /dev/null & echo $$! > $(EXAMPLE_RUN)/server.pid
rm -f $(EXAMPLE_RUN)/server.pid
setsid sh -c 'echo $$$$ > $(EXAMPLE_RUN)/server.pid; exec $(EXAMPLE_BUILD)/living-server $(EXAMPLE_PORT) --no-locust > $(EXAMPLE_RUN)/server.log 2>&1 < /dev/null' &
for i in `seq 1 20`; do \
[ -f $(EXAMPLE_RUN)/server.pid ] && kill -0 `cat $(EXAMPLE_RUN)/server.pid` 2>/dev/null && break; sleep 0.25; \
done; \
if [ ! -f $(EXAMPLE_RUN)/server.pid ] || ! kill -0 `cat $(EXAMPLE_RUN)/server.pid` 2>/dev/null; then echo "deploy: server died on start"; cat $(EXAMPLE_RUN)/server.log; exit 1; fi
ok=0; for i in `seq 1 30`; do \
if curl -fsS http://127.0.0.1:$(EXAMPLE_PORT)/health > /dev/null 2>&1; then ok=1; break; fi; sleep 0.5; \
done; \