Commit Graph
139 Commits
Author SHA1 Message Date
retoor f49b480587 feat(workflow): add scan_pushed tool and bring README up to date
- tools/scan_pushed.py: pre-push secret scan of a commit range, docs in README
- README: document molo doos and version commands, fix scaffold listing, add specs and docs map lines, 18 plans, drop installed AppArmor gap
- Verified: example suite 265 passed 0 failed, CLI rows against --help, all referenced files exist
2026-11-06 04:58:05 +01:00
retoor 0595284fe3 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
2026-11-06 04:36:00 +01:00
retoorandClaude Haiku 5.5 a2a737e21d fix: bind living example on all interfaces, default port 8000
The example server bound 127.0.0.1 only, so it was unreachable from
other hosts, and defaulted to 8080. It now binds 0.0.0.0 on 8000
(README, Makefile deploy and locust targets updated to match).

Also: a leading --flag no longer gets parsed as the port, so
'living-server --no-locust' starts instead of exiting with 'bad port'.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-26 04:15:09 +01:00
retoor 9c4a4ac7e4 sync 2026-10-26 01:31:48 +01:00
retoor 144c95c166 Merge branch 'worktree-agent-ab278294783503ae4' 2026-10-25 20:28:07 +01:00
retoor b080a19741 Merge branch 'worktree-agent-ab5c5cafd8f6ff470' 2026-10-25 20:28:07 +01:00
retoor 44a97e6630 Merge branch 'worktree-agent-a12c20b7597e0869e' 2026-10-25 20:28:07 +01:00
retoor 3fa809a452 Merge branch 'worktree-agent-a3f8b59ec38ed4034' 2026-10-25 20:28:07 +01:00
retoor 086093df6a Merge branch 'worktree-agent-a8ca0a146d4c559f4' 2026-10-25 20:28:07 +01:00
retoor a9288ff2a9 Merge branch 'worktree-agent-a05bb30b35711bbf4' 2026-10-25 20:28:07 +01:00
retoor 0572e1c14a Merge branch 'worktree-agent-a9652d841d44d83e5' 2026-10-25 20:28:07 +01:00
retoor 78ee66dc30 Merge branch 'worktree-agent-ae037686b230375ca' 2026-10-25 20:28:07 +01:00
retoor 64663c09c1 Merge branch 'worktree-agent-adb496df0ab914a35' 2026-10-25 20:28:07 +01:00
retoorandClaude Sonnet 5 c20078dd79 fix(runtime): cap H2 control-frame output to stop PING-flood DoS/crash
MOLO-H2-004 (CVE-2019-9511/9512/9515/9518 class): a client that floods
PING frames without draining its socket crashed runtime_interop_server
after ~100-150k frames. Root cause, confirmed with an ASan build, is a
stack overflow, not heap growth: EventLoop::post()/the Task<T>
continuation resume synchronously when work is already buffered, so
H2Connection::ReadLoop's frame loop never returns to
EventLoop::run_once()'s flat dispatch while a burst of already-read
frames remains; each frame nests the native stack one level deeper
(ReadLoop -> Ensure -> ReadLoop -> ...) until it overflows.

ReadLoop now forces a co_await loop().yield() every
caps::kH2FramesPerYield frames, unwinding the stack back to
run_once() regardless of burst size.

Separately, EnqueueControl/EnqueueData/CompleteResponse had no ceiling
on out_queued_bytes_ for H2, unlike the H1 path's out_.size() check in
runtime/http/connection.cpp. Added EnforceWriteCap(), using a new,
tight caps::kH2MaxPendingControlBytes for control output (PING/SETTINGS
acks, RST, WINDOW_UPDATE, GOAWAY) and the existing kWriteBufferCeiling
for DATA/response output, same as H1. Because the kernel's own TCP send
buffer keeps draining small control frames even while the peer never
reads, out_queued_bytes_ alone can stay near zero through a flood, so
also added a monotonic caps::kH2MaxControlFramesPerConnection rate cap
in EnqueueControl as the mechanism that actually bounds this class of
abuse; exceeding either cap drops the connection via Fatal().

audit/MOLO-H2-004 now PASSes repeatably: the connection is cut well
before all 300k PINGs are accepted, and the server stays up with
bounded RSS. All 134 runtime unit tests (including the H2 suite)
still pass.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-25 20:27:04 +01:00
retoorandClaude Sonnet 5 399c5c4dca fix(runtime): cap H2 client RST_STREAM churn against Rapid Reset (CVE-2023-44487)
H2Connection accepted an unbounded number of client-initiated
HEADERS(END_HEADERS|END_STREAM)+RST_STREAM(NO_ERROR) pairs on one
connection: kH2MaxConcurrentStreamsDefault never engages because each
stream is torn down (dispatched and erased) before the next HEADERS
arrives. Add caps::kH2MaxStreamResetsPerConnection (200) and a
per-connection client_resets_ counter in OnRst; once a connection's
lifetime count of client RST_STREAM frames exceeds the cap, close it
with GOAWAY(ENHANCE_YOUR_CALM) via the existing Fatal() path, same as
other protocol-limit violations in this file.

The counter increments unconditionally for every valid RST_STREAM
frame, not only ones matching a still-open stream: this server's
coroutine dispatch runs synchronously inline (lazy Task resumed via
EventLoop::post on the loop thread) for fast handlers, so the matching
stream is frequently already completed and erased by the time the
paired RST_STREAM is parsed, which would otherwise let the attack
bypass a naively-scoped counter.

audit/MOLO-H2-001 (Rapid Reset) now PASSes; audit/MOLO-H2-002
(MadeYouReset) continues to PASS via its separate existing
flow-control-error path, unaffected by this change.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-25 20:25:48 +01:00
retoorandClaude Sonnet 5 8569e8d577 fix(runtime): walk every path component with O_NOFOLLOW in DiskProvider
openat(root_fd_, path, O_NOFOLLOW) only blocks the kernel from
dereferencing a symlink at the FINAL component of path; an earlier
component that is a symlink pointing outside the jail is still
followed while resolving the rest of the path, so a strict
(follow_symlinks=false) DiskProvider served files outside its
configured root via a symlinked intermediate directory (CWE-61,
MOLO-STATIC-001). Walk the path one component at a time from
root_fd_ instead, applying O_NOFOLLOW at every level, so a symlink
anywhere in the path is rejected when follow_symlinks_ is false. The
follow_symlinks_=true path (realpath containment fallback) is
unchanged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-25 20:10:50 +01:00
retoor 5c3071ebf7 fix(realtime): parse upstream host as real IP before allow-list check (MOLO-EXPOSE-001)
UpstreamHostAllowed used bare string-prefix tests (host.rfind("10.",0)==0
etc.), so a public DNS name like "10.evil.com" or "127.evil.com" was
misclassified as private/loopback even though it resolves to an
attacker-controlled address (CWE-184). Now the host is parsed with
inet_pton (AF_INET and AF_INET6, including v4-mapped and fe80::/10) and
only a real IP literal is checked against numeric RFC1918/loopback/
link-local ranges; anything that fails to parse as a literal is never
treated as private. Also fixes the latent 172.16.0.0/12 check, which used
ad-hoc digit parsing instead of a real numeric subnet comparison.

audit/MOLO-EXPOSE-001 harness now prints PASS (7/7 cases correct).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-25 20:10:11 +01:00
retoorandClaude Sonnet 5 11ae3ce4a5 fix(runtime): cap CONTINUATION frame count per header block (MOLO-H2-003)
kH2HeaderListMax only bounded accumulated header bytes across HEADERS plus
CONTINUATION frames, so an attacker could flood zero-length CONTINUATION
frames on an open header block (CVE-2024-27316 class) forever without
tripping the byte cap, each still costing a 9-byte frame parse. Add an
independent kH2MaxContinuationFramesPerHeaderBlock cap in caps.h and
enforce it in H2Connection::OnContinuation, closing the connection via the
same Fatal(kCompressionError) GOAWAY path already used for the byte cap.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-25 20:06:37 +01:00
retoorandClaude Sonnet 5 54499eef4e fix(realtime): reject WebDAV COPY/MOVE destinations nested inside the source
ResourceTree::copy inserted into entries_ (a std::map) while range-iterating
that same map. When dst fell inside src (e.g. /dav/a -> /dav/a/b), each
newly inserted entry was discovered by the ongoing iteration and copied
again, so the loop never converged and memory grew without bound
(MOLO-DAV-001, CWE-674/CWE-400). RFC 4918 9.8.3/9.9.3 require servers to
reject this shape before mutating anything, so copy() now checks dst == src
or dst nested under src and fails immediately with no side effects.
move() inherits the fix since it calls copy() first.

As defense in depth, copy() also no longer mutates entries_ while
iterating it: it collects the (target, resource) pairs into a local
vector first, then applies them in a second pass, so the same class of
bug cannot recur even if the containment check is ever bypassed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-25 20:06:30 +01:00
retoorandClaude Sonnet 5 9733d63e6c fix(realtime): reject WebSocket handshakes from unlisted Origins (CSWSH)
HandshakeValidator::validate never read the Origin header, so any
cross-site page could open a WebSocket to the app and ride a victim's
cookies (CWE-1385, the CVE-2024-23898 class). Add HandshakeConfig's
allowed_origins exact-match list and reject the handshake when an
Origin header is present but not allow-listed. Empty/unset
allowed_origins is closed by default (any Origin present is
rejected), matching CorsPolicy's closed-by-default convention.
Requests with no Origin header (non-browser clients) are unaffected.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-25 20:06:04 +01:00
retoorandClaude Sonnet 5 8093b598c3 fix(runtime): close chunk-size cap-check overflow in FeedChunkSize
body_.size() + size could wrap size_t when an attacker-controlled chunk
size (up to 0xFFFFFFFFFFFFFFFF) was added to an already non-empty body,
making the body_cap_ comparison pass when it should reject with 413.
Check the remaining budget instead of the sum: reject if body_ already
exceeds the cap, or if the declared chunk size exceeds what's left.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-25 20:05:29 +01:00
retoorandClaude Sonnet 5 3a1d55ba51 fix(cli): spawn git init directly, no shell (MOLO-CLI-001)
molo new <name> passed the project name through system("git -C \"" + dir +
"\" init -q"), a real shell; a name containing a double quote broke out of
the quoting and ran arbitrary shell commands (CWE-78). Replace the system()
call with fork+execvp passing argv as an array, so there is no shell to
parse the name. grep confirms this was the only system() call in
scaffolder.cpp.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-25 19:57:59 +01:00
retoorandClaude Sonnet 5.5 997b06bc60 feat(clients): integrate plan 18: API catalog for 83 Google services, key table, detail error envelope, docs
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 16:01:51 +01:00
retoor 78426d1ba5 Merge branch 'worktree-agent-a74b9432eb3a8ee52' 2026-10-25 15:42:10 +01:00
retoorandClaude Sonnet 5.5 6d80dd0223 feat(clients): audio: ElevenLabs, AssemblyAI, Deepgram, Cartesia, Speechmatics, Hume
Table driven REST (509 rows verified against vendor specs by tools/check_spec.py),
WebSockets over the src/google/live client, neutral SpeechSynthesizer /
SpeechRecognizer seam, /ai/audio demo with dry runs, 110 package tests and 5
route tests. PlayHT has no public API; LeMUR is gone from AssemblyAI's spec.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 15:36:57 +01:00
retoor 07a1930a80 Merge branch 'worktree-agent-afa3d6579009e448f' 2026-10-25 15:24:28 +01:00
retoor ffdd2f34f5 Merge branch 'worktree-agent-a1e8651ad784c651f' 2026-10-25 15:24:28 +01:00
retoor 2faa1a91fc Merge branch 'worktree-agent-a2320ad47c0e6cfd0' 2026-10-25 15:24:28 +01:00
retoor 3b32465dee Merge branch 'worktree-agent-a058017f4f5ead787' 2026-10-25 15:24:28 +01:00
retoor 68a112de7a Merge branch 'worktree-agent-ab5ff9bd42306b1a6' 2026-10-25 15:24:28 +01:00
retoor d39ebb8d95 Merge branch 'worktree-agent-a6c7d57da30a90b4f' 2026-10-25 15:24:28 +01:00
retoor dd969fbd2c Merge branch 'worktree-agent-a404596e1b4db6b5d' 2026-10-25 15:24:28 +01:00
retoor 9b1c2e5301 Merge branch 'worktree-agent-acef51f9a1658599e' 2026-10-25 15:24:28 +01:00
retoor 65183df839 Merge branch 'worktree-agent-a2aaa8fe42eac35db' 2026-10-25 15:24:27 +01:00
retoor c30b26029d Merge branch 'worktree-agent-a2e298643b4505a43' 2026-10-25 15:24:27 +01:00
retoor d20506db2a Merge branch 'worktree-agent-a34d3b36384ad366e' 2026-10-25 15:24:27 +01:00
retoor 9e5a1da407 Merge branch 'worktree-agent-a1d8c9d17ebff3c74' 2026-10-25 15:24:27 +01:00
retoor ebfe1eed2c Merge branch 'worktree-agent-af2efb541856af61f' 2026-10-25 15:24:27 +01:00
retoor caf59501d4 Merge branch 'worktree-agent-a89776b81b60a5fca' 2026-10-25 15:24:27 +01:00
retoor 1377c766e1 Merge branch 'worktree-agent-a52dc99d769b245fb' 2026-10-25 15:24:27 +01:00
retoorandClaude Sonnet 5.5 18ec8b720e feat(clients): ops: 20 Google Cloud operations APIs, 418 Discovery-derived calls
Compute, Cloud Run, Functions, GKE, Build, Artifact Registry, IAM, IAM
Credentials, Resource Manager, Service Usage, Logging, Monitoring, Scheduler,
Tasks, Workflows, Eventarc, Billing, Asset, Org Policy. Generated call table
checked against Discovery, validated plans, dry-run default for writes
(enable/disable never live), /google/ops demo routes, live read-only probe.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 15:23:56 +01:00
retoorandClaude Sonnet 5.5 5a0c18d0e0 feat(clients): media: image and video generation across 12 providers behind one job seam
Stability, BFL, Runway, Luma, Replicate, fal, Ideogram, Recraft, Leonardo,
MiniMax, Kling, Higgsfield: call tables checked against vendor specs/SDKs,
ImageGenerator/VideoGenerator seam with capped polling, /ai/media demo.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 15:19:43 +01:00
retoorandClaude Sonnet 5.5 2ac5859cdb feat(clients): retrieval: Voyage, Jina, Pinecone, Qdrant, Weaviate, Mixedbread, Tavily, Exa, Brave
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 15:15:34 +01:00
retoorandClaude Sonnet 5.5 d2e2888ef4 feat(clients): mistral: La Plateforme package, 347-op call table, typed services, ChatModel, demo
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 15:08:12 +01:00
retoorandClaude Sonnet 5.5 d2f783a6fe feat(clients): bedrock: SigV4 signer, Converse, event streams, guardrails, agents, KB, batch
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 15:08:00 +01:00
retoorandClaude Sonnet 5.5 0e3816691b feat(clients): enterprise: Discovery Engine, Dialogflow, Retail, Insights, CES, Recommendations
1080-row Discovery-derived call table, validating Caller, typed facades,
demo under /google/enterprise, Discovery checker, live read checks.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 15:04:37 +01:00
retoorandClaude Sonnet 5.5 a2c1186036 feat(clients): azure: Azure OpenAI and AI Foundry package, 147-row spec table, Entra auth, demo
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 15:04:27 +01:00
retoorandClaude Sonnet 5.5 54b564f9b9 feat(clients): workspace: 20 Workspace APIs from Discovery, delegation sub claim, demo
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 15:03:45 +01:00
retoorandClaude Sonnet 5.5 1af14b5d74 feat(clients): data: BigQuery, Storage media and signed URLs, Pub/Sub, Firestore, Spanner, Bigtable admin, Secret Manager, Dataplex, DLP, KMS, Datastore
Discovery generated call table (918 rows), typed services, /google/data demo.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 15:03:43 +01:00
retoorandClaude Sonnet 5.5 4ae0b8ec4b feat(clients): discovery: generic engine for all Google Discovery APIs
Directory and document cache with caps, parameter and body validation before
traffic, path/query/repeated/regional handling, key-or-OAuth choice, paging,
long-running wait, whole-directory checker script, demo at /google/discovery.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 15:03:40 +01:00