Commit Graph
117 Commits
Author SHA1 Message Date
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
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 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
retoorandClaude Sonnet 5.5 3404392887 feat(clients): perplexity: Sonar, Search, Agent, embeddings, decisions, batches, skills, orchestrator
Package molo::perplexity covering all 39 operations of the five published
OpenAPI documents, PerplexityChatModel, demo routes under /ai/perplexity,
check_spec.py, SPEC.md, 46 unit cases and 111 route checks.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 15:01:55 +01:00
retoorandClaude Sonnet 5.5 0b806eb7e3 feat(clients): huggingface: Hub, Inference Providers, Endpoints, TGI, TEI, chat model, demo
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 15:01:40 +01:00
retoorandClaude Sonnet 5.5 4347726941 feat(clients): cloudai: Translation, Vision, Language, Video, Document AI, Speech v2, long audio TTS
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 15:01:40 +01:00
retoorandClaude Sonnet 5.5 aaddb29d42 feat(clients): compat: OpenAI-compatible provider registry (39 rows), chat model, services, demo
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 15:01:38 +01:00
retoorandClaude Sonnet 5.5 f32947427b feat(clients): cohere: whole API, CohereChatModel, spec checker, demo and tests
Package src/vendors/cohere (molo::cohere): Chat v2 with streaming, tools,
thinking and citations; embed, rerank, classify, tokenize, detokenize,
parse, transcription; datasets, embed jobs, batches, connectors,
fine-tuning, models, check-api-key; legacy v1 chat/generate/summarize;
CohereChatModel : ChatModel. All 42 operations of cohere-openapi.yaml are
in one call table, verified by tools/check_spec.py. Demo routes under
/ai/cohere, 51 unit tests and 2 route tests; live tests are opt-in.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 10:49:17 +01:00
retoorandClaude Sonnet 5.5 bf7b6fb3c8 feat(clients): maps: Places, Address Validation, Solar, Pollen, Air Quality, Area Insights, Routes, web services, Street View, key handling
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 10:31:52 +01:00
retoorandClaude Sonnet 5.5 3db67fcf1f feat(clients): breadth plan 18 and stubs for 7 Google and 10 vendor packages
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 09:14:26 +01:00
retoorandClaude Sonnet 5.5 89f556e187 test(clients): registry live reads use the global location; record live registry findings
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 08:48:29 +01:00