chore(security): cve-audit regression checks and make target
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,92 @@
|
||||
# audit
|
||||
|
||||
**Scope:** [README](../README.md) · [AGENTS](../AGENTS.md)
|
||||
|
||||
A fixed, named set of regression checks for vulnerability classes relevant to the
|
||||
mechanisms MoloApp actually has (an in-house HTTP/1 and HTTP/2 server, an in-house
|
||||
WebSocket/WebDAV/reverse-tunnel realtime stack, a shell-invoking CLI, in-house
|
||||
crypto and an ORM), each in its own directory with where the problem lives, why it
|
||||
matters to MoloApp specifically, and a check that reproduces it against real,
|
||||
built artifacts. Modeled on the `audit/` convention used by the `doos` project:
|
||||
capped to the issues that target code paths MoloApp actually has, not "every CVE",
|
||||
consistent with the base rule that every automated process gets a fixed, named
|
||||
ceiling instead of an open-ended scope.
|
||||
|
||||
Most of these are **in-house findings** from reading this codebase, not public CVE
|
||||
assignments (MoloApp is not itself a CVE-tracked project); each README still cites
|
||||
the real-world vulnerability *class* it is modeled on, with sources, so the check's
|
||||
severity and shape can be judged against known precedent.
|
||||
|
||||
A check here answers one question: does *this build*, today, reproduce the exposure
|
||||
described. It is not a claim that MoloApp is unaffected by anything not listed here.
|
||||
|
||||
## Running it
|
||||
|
||||
```
|
||||
make # build/bin/runtime_interop_server, build/example/living-server, build/molo
|
||||
make -C audit test # sequential
|
||||
make -C audit -j8 test # concurrent, one job per check
|
||||
make -C audit report # runs all, never stops, one line prefix per check
|
||||
make -C audit list # names the check directories
|
||||
```
|
||||
|
||||
Each check is independent, writes only under its own `mktemp -d` (Python checks) or
|
||||
is a pure in-memory harness (C++ checks), and cleans up on exit. A check that needs
|
||||
something the host does not have (an unbuilt binary) prints `SKIP` with the reason
|
||||
and exits 0; it never reports PASS for a precondition it could not test. Every check
|
||||
runs under a hard wall-clock watchdog (`audit/lib/molo_audit.py`'s `arm_watchdog`, or
|
||||
an `alarm()` call in the C++ harnesses) so a check that finds a genuine hang reports
|
||||
FAIL instead of wedging the suite.
|
||||
|
||||
## Verdicts
|
||||
|
||||
| Verdict | Meaning |
|
||||
|---|---|
|
||||
| `PASS` | This build does not reproduce the exposure described, under the conditions this check creates. |
|
||||
| `FAIL` | It does. Treat as a regression; the check prints what it observed. |
|
||||
| `SKIP` | The check's precondition was not met on this host (missing build). Not a verdict on MoloApp. |
|
||||
|
||||
## How a check drives the real thing
|
||||
|
||||
Three kinds of real artifact, no mocks:
|
||||
|
||||
- **Over a real socket**, against `build/bin/runtime_interop_server` (the runtime's
|
||||
own interop test server: real HTTP/1.1, real h2c HTTP/2, real compression, real
|
||||
static files, nothing stubbed) or `build/example/living-server`. These checks live
|
||||
in `audit/lib/molo_audit.py`'s `H2`/`h1` helpers: a minimal HTTP/2 client speaking
|
||||
real frames, and raw-socket HTTP/1.1, both stdlib-only Python.
|
||||
- **Through the real CLI**, `build/molo`, run as a subprocess against a scratch
|
||||
directory.
|
||||
- **Against the real class directly**, for the handful of classes (`src/realtime/
|
||||
websocket/server/handshake_validator.cpp`, `src/realtime/webdav/server/
|
||||
resource_tree.cpp`, `src/realtime/expose/upstream.cpp`) that are pure, I/O-free
|
||||
logic not yet wired to any route in the shipped example (`example/fw/` is
|
||||
explicitly a skeleton still being re-bound to `src/`, per the main README). Each
|
||||
such check's README says so and compiles a tiny harness straight from the real
|
||||
`.cpp` file, the same code any real route would call, rather than skipping the
|
||||
class entirely.
|
||||
|
||||
## What is deliberately not here
|
||||
|
||||
No kernel-level memory-corruption exploit code, and no check that requires outbound
|
||||
network access (DNS resolution, reaching a real external host) to prove its point.
|
||||
Everything here drives a MoloApp artifact through its real inputs inside a scratch
|
||||
directory or a loopback socket; nothing here targets any host other than the one
|
||||
running the check, and nothing here is a weaponized exploit for an unrelated target.
|
||||
|
||||
## The list
|
||||
|
||||
| Check | Mechanism | Modeled on |
|
||||
|---|---|---|
|
||||
| [MOLO-H1-001](MOLO-H1-001/) | HTTP/1 chunked-body cap bypass via chunk-size addition overflow | CWE-190 / request-smuggling-adjacent resource exhaustion |
|
||||
| [MOLO-H2-001](MOLO-H2-001/) | HTTP/2 stream-open/reset churn, no rate limit | CVE-2023-44487 "Rapid Reset" |
|
||||
| [MOLO-H2-002](MOLO-H2-002/) | HTTP/2 server-triggered reset churn | CVE-2025-8671 "MadeYouReset" |
|
||||
| [MOLO-H2-003](MOLO-H2-003/) | HTTP/2 empty-CONTINUATION flood, byte cap only | CVE-2024-27316 "CONTINUATION flood" |
|
||||
| [MOLO-H2-004](MOLO-H2-004/) | HTTP/2 PING flood to an unread peer, no queue cap | CVE-2019-9511/9512/9515/9518 HTTP/2 DoS batch |
|
||||
| [MOLO-STATIC-001](MOLO-STATIC-001/) | Static-file jail escape via a symlinked intermediate directory | CWE-61 symlink following |
|
||||
| [MOLO-CLI-001](MOLO-CLI-001/) | Shell command injection in `molo new <name>` | CWE-78 OS command injection |
|
||||
| [MOLO-WS-001](MOLO-WS-001/) | WebSocket handshake has no Origin check | CWE-1385 / CVE-2024-23898-class CSWSH |
|
||||
| [MOLO-DAV-001](MOLO-DAV-001/) | WebDAV COPY into its own subtree never terminates | CWE-674 uncontrolled recursion |
|
||||
| [MOLO-EXPOSE-001](MOLO-EXPOSE-001/) | `expose` upstream allow-list bypassed by hostname prefix | CWE-184 incomplete allow-list / SSRF-adjacent |
|
||||
|
||||
Back to [README](../README.md), [AGENTS](../AGENTS.md).
|
||||
Reference in New Issue
Block a user