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
+29
View File
@@ -0,0 +1,29 @@
// Route: POST /doos/delete (dry run unless confirm=yes)
#include "support/Assert.hpp"
#include "support/DoosHome.hpp"
using namespace molo::example::test;
int main() {
ScratchDoosHome home("delete");
Fixture f;
auto made = f.client->post("/doos/create", "name=temp1", "application/x-www-form-urlencoded");
check(made.status == 200, "create 200");
auto dry = f.client->post("/doos/delete", "name=temp1", "application/x-www-form-urlencoded");
check(dry.status == 200, "dry run 200");
check(contains(dry.body, "\"dry_run\":true"), "dry run without confirm");
check(contains(dry.body, "dry run"), "report text");
auto still = f.client->get("/doos/status");
check(contains(still.body, "\"name\":\"temp1\""), "dry run deletes nothing");
auto gone = f.client->post("/doos/delete", "name=temp1&confirm=yes",
"application/x-www-form-urlencoded");
check(contains(gone.body, "\"dry_run\":false"), "confirm deletes");
auto after = f.client->get("/doos/status");
check(!contains(after.body, "\"name\":\"temp1\""), "container gone after confirm");
auto missing = f.client->post("/doos/delete", "name=temp1&confirm=yes",
"application/x-www-form-urlencoded");
check(missing.status == 404, "missing container is 404");
auto noname = f.client->post("/doos/delete", "confirm=yes", "application/x-www-form-urlencoded");
check(noname.status == 422, "missing name rejected");
return finish("doos/delete");
}