mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-12-03 02:08:18 +00:00
docs(readme): an adopter's front door; roadmap and engine-trace runbook move to docs
The maintainer's request of 2026-11-28, in chat: update the README for an adopter
with /cobesy; move the parts on the roadmap and on technical internals to docs;
index docs/ from the README; add a roadmap visualization with the present state
and the past milestones; then give the choices for the open items through the
menu. The menu had eleven questions, each answered with the option recommended.
Two answers govern this commit. "README first": the README work is committed with
the per-commit gate and a fresh reviewer, before the record commit for 5b and
item 5c. "Fix in this commit": the faults found while moving text are fixed here,
the wording shown first.
The wording of the two fixes was shown in chat and answered "Write it as shown
(Recommended)" and "Say why, in a comment (Recommended)". A third fault offered in
that menu, "five docs pages link README anchors that do not exist", was the
session's error: they are seven links, in four pages, to five anchors of
ops/ax/README.md and ops/README.md, and all five headings exist. Nothing was
repointed. The learning is in the handover, which is not tracked, with the
maintainer's approval.
What changed. Measured in /tmp/opencode/s10_rd1_diffcheck.out: five tracked files
changed (144 insertions, 328 deletions) and three files are new.
- README.md, 488 lines at HEAD and 296 now. It keeps the install of Tier 1 and
Tier 2, the scan modes, the run artifacts and the maintainer commands. It adds
"What you can run today", "Status and roadmap" (a Mermaid ladder of R0 to R6, a
table with each step's state on 2026-11-28, a table of past milestones) and
"Documentation", a table with one row for each of the 21 pages under docs/.
- docs/roadmap.md, new, 123 lines: the destination, the ladder with what must be
true to move on, the release milestones M1a to M5, the past milestones, the
status of 2026-11-06 as the README carried it, what changed after that day, and
the rules that bind every step.
- ops/ax/engine-traces.md, new, 80 lines: the README's section "Engine traces on
kube-ax" as it stood, with "s3://..." written "s3://<bucket>" and the link to
ops/ax/README.md written as a path and a section name. docs/ops/ax/engine-traces.md,
new, includes it from its line 3, as docs/ops/ax/README.md includes
ops/ax/README.md.
- mkdocs.yml: two entries in the nav, Roadmap and Engine traces on kube-ax.
- docs/evaluation.md: one paragraph with the gate's committed baseline
(benchmarks/measurements/2026-09-06-gate-baseline.txt: recall 93.62%, 44 of 47;
false positives 0.0%), the day the README quoted it (2026-10-02, bdabb97), and
that PHP is not in the gate.
- docs/examples.md: two sentences moved from the README, on the ledger block of
manifest.json and on the MCP tool openultrasast.benchmark. The sentence that
pointed to the README's "Scan modes" now points to architecture.md.
- docs/index.md: the state line, from 2026-10-02 to 2026-11-28, in the words that
were shown.
- The README's pull line: a comment says that 2.0.1 is the last full release and
that a prerelease is tagged with its version (.github/workflows/release.yml:93-95).
Left out of the README because another page already held it, each checked by grep
before the cut and then by the reviewer: Tier 3 and Tier 4, the plane, the memory
store, the decision engine, the token economics, the detection techniques, the
framework priors, and the details of the run directory, its retention and the
ledger (docs/examples.md, docs/architecture.md). The note on the retired HarnessX
keys is in RELEASE_NOTES.md, which the README links.
Checks, in files under /tmp/opencode/ that start with their command; s10_rd1_exits.txt
is the gates script's own output, ten exit codes.
- s10_rd1_pytest_docs.out: 30 passed in the five test files that read the README,
docs and ops (test_docs_site, with the strict build;
test_removed_plane_references; test_plane_literals; test_push_explain;
test_engine_queue), run after the last edit.
- s10_rd1_pytest_ops.out: 141 passed and 3 skipped in seven test files that touch
ops/ax or the hook install.
- s10_rd1_links.out: the relative links resolve, anchors included: 41 in the
README, 5 in docs/roadmap.md, 19 in docs/index.md, 3 in docs/evaluation.md, 2
in docs/examples.md. README.md and docs/roadmap.md hold one flowchart each, of
seven nodes, by the checks of test_docs_site. No file under docs/ contains
".kiro" or "kiro-".
- s10_rd1_diffcheck.out: the new text is ASCII; git diff --check exits 0.
- s10_rd1_gates_run.out and s10_rd1_exits.txt: the gates of label rd1 give ten
zeros.
Not verified: the README's Mermaid block in a browser.
Review.
Three rounds, read-only. The old README was split into 351 sentences and each was
traced in the README, docs/, ops/ and the release notes. Round one found a lost
sentence, now in docs/examples.md, four false states in README.md and docs/roadmap.md
(Docker, M4, the proof arm, "a human go") and three wrong counts in the message; all
are corrected. Round two found the rewording of a remark false at docs/roadmap.md:14.
Round three read every number of that page: its only detection figures are the two
recall counts of the status of 2026-11-06, as the page now says. Measured in round
three: 123 lines; 41 relative links of the README resolve, and 5, 19, 3 and 2 in the
changed pages; 21 rows for 21 pages; one flowchart of seven nodes in each of README.md
and docs/roadmap.md; a strict build with no ".kiro" or "kiro-"; 11 tests passed in
the three permitted files. The counts 30, 141 and 3 and the ten gate zeros were read
in the session's files, not re-run.
This commit is contained in:
@@ -6,6 +6,20 @@ OpenUltraSAST is an experimental static security analyser. It aims to check secu
|
|||||||
repositories it has never seen. It scans a checkout or the commits a `git push` would publish. It
|
repositories it has never seen. It scans a checkout or the commits a `git push` would publish. It
|
||||||
distinguishes what it can prove from what it suspects.
|
distinguishes what it can prove from what it suspects.
|
||||||
|
|
||||||
|
The safety net is not released yet. A scan and the pre-push hook are advisory, and nothing
|
||||||
|
blocks a push. Detection on repositories the tool has never seen has not met its release gate.
|
||||||
|
[Status and roadmap](#status-and-roadmap) says where the project stands.
|
||||||
|
|
||||||
|
## What you can run today
|
||||||
|
|
||||||
|
- A quick scan of a checkout. It is deterministic and needs no Docker, network or API key.
|
||||||
|
- The pre-push hook, in any repository. It runs the quick rules on the lines a push changes, names
|
||||||
|
every check it could not run, and never blocks the push.
|
||||||
|
- A standard scan, with the Joern engine. It follows a value across statements and files. It needs
|
||||||
|
Joern: the Docker image, or the host install.
|
||||||
|
- A coding agent. An agent that can run shell commands needs nothing but the CLI. `ousast mcp`
|
||||||
|
exposes the same work to an MCP client.
|
||||||
|
|
||||||
A scan combines up to four parts:
|
A scan combines up to four parts:
|
||||||
|
|
||||||
- language-scoped pattern rules;
|
- language-scoped pattern rules;
|
||||||
@@ -18,51 +32,15 @@ a degradation instead of reporting a clean result.
|
|||||||
|
|
||||||
Where a repository's application can be built and run, an experimental proof arm goes further. It
|
Where a repository's application can be built and run, an experimental proof arm goes further. It
|
||||||
demonstrates a finding by executing it. The issue triggers on the vulnerable revision and not on
|
demonstrates a finding by executing it. The issue triggers on the vulnerable revision and not on
|
||||||
the fixed one, which makes the finding reproducible. This arm is in pilot testing and is being
|
the fixed one, which makes the finding reproducible. Pilot demonstrations exist. The arm is parked
|
||||||
qualified on repositories the tool has never seen; see [Status](#status).
|
until the roadmap's step R4 needs it, and it is not shipped.
|
||||||
|
|
||||||
`ousast` is the interface. Model work over whole repositories runs on a separate agentic plane
|
|
||||||
(google/ax). A learned decision engine is in development. A scan needs neither of them.
|
|
||||||
|
|
||||||
Each section in this file links to the corresponding page on the documentation site.
|
|
||||||
The site is published at <https://norandom.github.io/OpenUltraSAST/>. Its sources are in `docs/` and
|
|
||||||
`mkdocs.yml`; to preview it locally, run `uv sync --extra docs && uv run mkdocs serve`.
|
|
||||||
|
|
||||||
## Status
|
|
||||||
|
|
||||||
**v2.1.0-alpha.1 checkpoint, state as of 2026-11-06.** The pre-push safety net is **not yet released**. Blocking on
|
|
||||||
the static analyser by hand is **NO-GO** against every M4 gate, and the project no longer tries to
|
|
||||||
meet those gates that way.
|
|
||||||
|
|
||||||
- No blocking hook capability is enabled; the pre-push hook is advisory only.
|
|
||||||
- Two independent populations (case sets frozen before any scan) have been spent on the static
|
|
||||||
engine: recall was 1 of 11, then 0 of 17. The learned decision engine ranks findings but does not block for any
|
|
||||||
family.
|
|
||||||
- Static abstract interpretation could not prove the precision needed to block a push. Current
|
|
||||||
work focuses on a **dynamic proof arm**. It builds and runs a repository's app and
|
|
||||||
demonstrates a finding by a differential: the issue triggers on the vulnerable revision and not
|
|
||||||
on the fixed one. Execution establishes the finding as ground truth, so it can justify a block
|
|
||||||
without calibration. Pilot demonstrations exist, including one executed on the cluster; the arm
|
|
||||||
is being qualified, not shipped.
|
|
||||||
- The release gate is a **measured** catch-rate and false-alarm number on repositories the tool
|
|
||||||
has never seen (the unseen-repo evaluation). Until that number
|
|
||||||
exists, treat all output as advisory.
|
|
||||||
|
|
||||||
Every detection change must show an improvement in a controlled measurement on held-out repositories.
|
|
||||||
The current status and the record behind each figure are in
|
|
||||||
[docs/where-we-stand.md](docs/where-we-stand.md). For developers, the pre-push check and its
|
|
||||||
honest limits: [docs/pre-push-for-developers.md](docs/pre-push-for-developers.md); the
|
|
||||||
catch–prove–fix–re-verify loop: [docs/use-case-fix-and-reverify.md](docs/use-case-fix-and-reverify.md).
|
|
||||||
The release history is in [RELEASE_NOTES.md](RELEASE_NOTES.md).
|
|
||||||
|
|
||||||
## Install and first scan
|
## Install and first scan
|
||||||
|
|
||||||
Pick the tier you need:
|
Pick the tier you need. Tier 1 and Tier 2 are for everyone. Tier 3, model work over whole
|
||||||
|
repositories on the plane, is for maintainers. Tier 4, a Kubernetes deployment, is planned and not
|
||||||
1. Tier 1: a deterministic scan of a checkout, or a CI gate.
|
done. Both are in the documentation: [ax on this host](docs/ops/ax/README.md) and
|
||||||
2. Tier 2: the Joern engine (`standard`, `deep`).
|
[Deployment](docs/deployment.md).
|
||||||
3. Tier 3, for maintainers: model work over whole repositories on the plane.
|
|
||||||
4. Tier 4 does not exist yet.
|
|
||||||
|
|
||||||
### Tier 1: quick scan, no Docker
|
### Tier 1: quick scan, no Docker
|
||||||
|
|
||||||
@@ -103,7 +81,7 @@ to GHCR. It is big: a JRE plus about 2 GB of Joern. Pull it instead of building,
|
|||||||
shell wrapper uses:
|
shell wrapper uses:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker pull ghcr.io/norandom/openultrasast:2.0.1
|
docker pull ghcr.io/norandom/openultrasast:2.0.1 # the last full release; a prerelease is tagged with its version
|
||||||
docker tag ghcr.io/norandom/openultrasast:2.0.1 openultrasast:dev # or build: docker compose build
|
docker tag ghcr.io/norandom/openultrasast:2.0.1 openultrasast:dev # or build: docker compose build
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -122,8 +100,6 @@ ousast-with-judge scan . --mode standard # network on, the model is a
|
|||||||
the same without the wrapper. Create `reports/` first (`mkdir -p reports`): compose does not create it,
|
the same without the wrapper. Create `reports/` first (`mkdir -p reports`): compose does not create it,
|
||||||
because a directory Docker creates is root-owned and the image runs as an ordinary user. Findings land there.
|
because a directory Docker creates is root-owned and the image runs as an ordinary user. Findings land there.
|
||||||
|
|
||||||
`deep` requests the REGRESS stage, which was retired on 2026-10-13: the scan records a `regress_retired` degradation and otherwise equals `standard`. Execution proof now comes from the search-with-proof arm.
|
|
||||||
|
|
||||||
Details, including the host install, are in [ops/README.md](ops/README.md).
|
Details, including the host install, are in [ops/README.md](ops/README.md).
|
||||||
|
|
||||||
Keys and store settings live in `.env` in the working directory. The file is gitignored;
|
Keys and store settings live in `.env` in the working directory. The file is gitignored;
|
||||||
@@ -133,52 +109,23 @@ Keys and store settings live in `.env` in the working directory. The file is git
|
|||||||
- `OPENROUTER_API_KEY` is used for embeddings only (`ousast learn memory embed`).
|
- `OPENROUTER_API_KEY` is used for embeddings only (`ousast learn memory embed`).
|
||||||
- `.env` never overrides a variable already exported in your shell. If a key change seems to have
|
- `.env` never overrides a variable already exported in your shell. If a key change seems to have
|
||||||
no effect, `unset` the stale export.
|
no effect, `unset` the stale export.
|
||||||
- The plane's memory store defaults to a local file store under `~/ousast-results/plane/memory`.
|
|
||||||
- An S3-compatible bucket is optional: `uv sync --extra s3`, then `OUSAST_MEMORY=s3://<bucket>`
|
|
||||||
with `S3_ENDPOINT` and the AWS credentials in `.env`. Nothing in a scan needs it.
|
|
||||||
|
|
||||||
### Tier 3: the plane on ax (maintainers)
|
The plane's memory store and the optional S3 bucket are maintainer topics:
|
||||||
|
[Memory](docs/memory.md) and [RustFS setup](docs/rustfs.md). Nothing in a scan needs them.
|
||||||
Tier 1 and 2 need none of this. The local profile is a single-node kind cluster on the maintainer's
|
|
||||||
host. That cluster is stopped since 2026-11-24: the code stays, `ops/ax/up.sh` recreates the
|
|
||||||
cluster, and whether the executor code is deleted is decided at the plane re-plan.
|
|
||||||
|
|
||||||
- `ops/ax/up.sh` needs `docker`, `go`, `kubectl`, `kind`, `ko` and `ax` on the PATH. It refuses to
|
|
||||||
start when one is missing.
|
|
||||||
- It builds Agent Substrate and ax from their checkouts under `~/.cache/ousast/ax-src/`.
|
|
||||||
- Measured idle footprint with two workers: the kind node takes 1.7 GiB of memory (27% of the
|
|
||||||
7.7 GiB host) and 4.9 GB of disk for images. The build uses several GB more for Go caches.
|
|
||||||
- The worker pool is sized for that 7 GB host.
|
|
||||||
- The verify and roles tasks need `DEEPSEEK_API_KEY`.
|
|
||||||
- Memory lives in the local file store or the S3 store. RustFS is the tested server.
|
|
||||||
|
|
||||||
See [ops/ax/README.md](ops/ax/README.md) for bring-up and doctor instructions, along with the smoke Run.
|
|
||||||
|
|
||||||
### Tier 4: Kubernetes (k3s), planned
|
|
||||||
|
|
||||||
Nothing has been deployed to any cluster other than that kind cluster, stopped on 2026-11-24. The
|
|
||||||
target is two profiles of one code base: `kind` locally and `k3s` in production. The same `ousast
|
|
||||||
plane run` would submit a Run in a remote execution mode. It needs:
|
|
||||||
|
|
||||||
- a kubeconfig context or the cluster's ingress (and an `imagePullSecret` on the worker
|
|
||||||
ServiceAccount for a private package);
|
|
||||||
- runner and engine images published to GHCR and pinned by digest;
|
|
||||||
- the S3 store as the artifact path, with no receiver on a laptop.
|
|
||||||
|
|
||||||
The plan and required code changes, with file paths, are in
|
|
||||||
[docs/deployment.md](docs/deployment.md#production-topology-ax-on-a-kubernetes-cluster).
|
|
||||||
|
|
||||||
## Scan modes
|
## Scan modes
|
||||||
|
|
||||||
There are three modes. Each adds to the one before.
|
There are three modes. Each adds to the one before.
|
||||||
|
|
||||||
- `quick` runs the pattern rules, hints, ranking, verification and score. It needs nothing.
|
- `quick` runs the pattern rules, hints, ranking, verification and score. It needs nothing.
|
||||||
- `standard` adds the MAP stage: complexity map, semantic overlay, authorization obligations and
|
- `standard` adds a complexity map, the semantic overlay, authorization obligations and the Joern
|
||||||
the Joern model layer. The model layer builds one code property graph per repository. It decides
|
model layer. The model layer builds one code property graph per repository. It decides taint,
|
||||||
taint, guard-dominance and configuration questions on that graph. A model is asked only the
|
guard-dominance and configuration questions on that graph. A model is asked only the residual
|
||||||
residual question. Without a key, that question is skipped and only the graph's entailed
|
question. Without a key, that question is skipped and only the graph's entailed findings are
|
||||||
findings are reported.
|
reported.
|
||||||
- `deep` requests the REGRESS stage, which was retired on 2026-10-13: the scan records a `regress_retired` degradation and otherwise equals `standard`. Execution proof now comes from the search-with-proof arm.
|
- `deep` requests the REGRESS stage, which was retired on 2026-10-13: the scan records a
|
||||||
|
`regress_retired` degradation and otherwise equals `standard`. Execution proof now comes from the
|
||||||
|
search-with-proof arm.
|
||||||
|
|
||||||
A missing engine is a recorded degradation (`cpg_unavailable`, `regress_retired`), never a
|
A missing engine is a recorded degradation (`cpg_unavailable`, `regress_retired`), never a
|
||||||
clean result.
|
clean result.
|
||||||
@@ -188,32 +135,10 @@ loads settings. Every run writes `manifest.json`, `findings.json`, `verification
|
|||||||
`score.json`, `report.md`, `report.sarif` and `trace/events.jsonl` under
|
`score.json`, `report.md`, `report.sarif` and `trace/events.jsonl` under
|
||||||
`~/.cache/openultrasast/runs/<scan-id>/`, or under `$XDG_CACHE_HOME/openultrasast/runs/` when that
|
`~/.cache/openultrasast/runs/<scan-id>/`, or under `$XDG_CACHE_HOME/openultrasast/runs/` when that
|
||||||
variable is set to an absolute path. The scan prints that path (`run_dir=<path>`).
|
variable is set to an absolute path. The scan prints that path (`run_dir=<path>`).
|
||||||
`OPENULTRASAST_RUNS_DIR` moves the run directory: an absolute path is used as given, and a relative
|
`OPENULTRASAST_RUNS_DIR` moves the run directory. Runs older than 30 days are removed from the
|
||||||
one is resolved against the current working directory, never against the directory being scanned.
|
default location, and `OPENULTRASAST_RUNS_RETENTION_DAYS` sets the number of days.
|
||||||
After a scan writes its run to the default location, with no `OPENULTRASAST_RUNS_DIR` set, the runs
|
[Examples](docs/examples.md) has the details: a relative run directory, the retention notice, and
|
||||||
there older than 30 days are removed, and `ousast` prints one `notice:` line when it removes any;
|
where `ousast benchmark` and its MCP tool write.
|
||||||
`OPENULTRASAST_RUNS_RETENTION_DAYS` sets the number of days (`0` keeps every run), and nothing is
|
|
||||||
ever removed from a location chosen with `OPENULTRASAST_RUNS_DIR`, except through the shell wrapper:
|
|
||||||
it mounts `~/.cache/openultrasast/runs` at `/reports` in the image, and a scan through it removes the
|
|
||||||
expired runs there as well; the ledgers of tree digests (`calibration/` under the same directories)
|
|
||||||
go by the same number of days, dated by their last use. A scan does not read the files
|
|
||||||
under its runs directory when that directory lies inside the scanned path; when this leaves source
|
|
||||||
files out of the scan, `ousast` prints one `notice:` line naming the directory and how many.
|
|
||||||
|
|
||||||
`ousast benchmark` writes its run to the same runs directory, as
|
|
||||||
`<runs_dir>/<benchmark-run-id>/` beside the scan runs, and prints that path
|
|
||||||
(`benchmark_run_dir=<path>`); run retention removes it like a scan run. The MCP tool
|
|
||||||
`openultrasast.benchmark` uses the same directory.
|
|
||||||
|
|
||||||
A scan that rejects or holds a finding writes one file into the scanned tree,
|
|
||||||
`<target>/.openultrasast/calibration/false_positive_learnings.json`, and only when that file's
|
|
||||||
content would change. On a read-only tree the scan records `ledger_not_written` instead and keeps
|
|
||||||
the learnings in the ledger of the tree's digest, `<runs_dir>/calibration/<digest>.json`, where the
|
|
||||||
digest is a sha256 of every file's name and bytes under the target. Only a scan of the very same
|
|
||||||
bytes reads it; the first scan that can write the tree carries its entries into the tree's ledger
|
|
||||||
and removes it. The `ledger` block of `manifest.json` names the digest, how many learnings came
|
|
||||||
from each ledger, and what became of the digest's ledger. A digest's ledger is removed like a run
|
|
||||||
once its last use is `OPENULTRASAST_RUNS_RETENTION_DAYS` days past.
|
|
||||||
|
|
||||||
`ousast pre-push` (experimental) analyses the commits a push would publish against their base.
|
`ousast pre-push` (experimental) analyses the commits a push would publish against their base.
|
||||||
First, the quick rules run on the changed lines. Then the engine compares head with base, and only
|
First, the quick rules run on the changed lines. Then the engine compares head with base, and only
|
||||||
@@ -226,7 +151,7 @@ Flows and the per-language rule table: [docs/scanning.md](docs/scanning.md).
|
|||||||
|
|
||||||
## How detection works
|
## How detection works
|
||||||
|
|
||||||
The tool uses three representations of code, from cheap to expensive:
|
The tool reads code in three ways, from cheap to expensive:
|
||||||
|
|
||||||
1. Text: regex quick rules, one statement at a time.
|
1. Text: regex quick rules, one statement at a time.
|
||||||
2. Tree: the tree-sitter CST (concrete syntax tree) and an IR (intermediate representation) per
|
2. Tree: the tree-sitter CST (concrete syntax tree) and an IR (intermediate representation) per
|
||||||
@@ -234,136 +159,97 @@ The tool uses three representations of code, from cheap to expensive:
|
|||||||
3. Graph: the Joern CPG. It is the only one that follows a value across statements, calls and
|
3. Graph: the Joern CPG. It is the only one that follows a value across statements, calls and
|
||||||
files.
|
files.
|
||||||
|
|
||||||
Taint analysis uses fact tables and queries on the graph to produce verdicts. Absence bugs involve
|
|
||||||
operations that should have been guarded. The tool finds them through obligations and dominance
|
|
||||||
checks, plus a configuration census. A model answers only the residual question.
|
|
||||||
|
|
||||||
- [docs/detection-techniques.md](docs/detection-techniques.md) explains each technique, with the
|
|
||||||
code it comes from and what it misses.
|
|
||||||
- [docs/architecture.md](docs/architecture.md) gives the stage order and the evidence ladder (a
|
|
||||||
state machine, not a label a model may assign). It also covers the central CWE policy, the
|
|
||||||
project score.
|
|
||||||
|
|
||||||
Quick rules cover C/C++, Python, JavaScript/TypeScript, Java with Groovy templates, and PHP. Each
|
Quick rules cover C/C++, Python, JavaScript/TypeScript, Java with Groovy templates, and PHP. Each
|
||||||
rule runs only against files of its language.
|
rule runs only against files of its language.
|
||||||
|
|
||||||
The detection gate (`uv run python -m openultrasast.gate`) enforces at least 90% recall and under
|
What each technique can establish, with the code it comes from and what it misses:
|
||||||
10% false positives per language on the bundled cheat-sheet corpora. On this tree it reports
|
[docs/detection-techniques.md](docs/detection-techniques.md). The stage order and the evidence
|
||||||
93.62% recall (44/47) and 0.0% false positives. Those corpora show that a rule change did not
|
ladder (a state machine, not a label a model may assign), the central CWE policy and the project
|
||||||
break a known detection. They are not a recall estimate on real code, and PHP is not in the gate.
|
score: [docs/architecture.md](docs/architecture.md).
|
||||||
|
|
||||||
Framework knowledge (WordPress, Flask, Django, Express, Spring) is tagged as an optional prior in
|
## Status and roadmap
|
||||||
`src/openultrasast/ruleset/frameworks.toml`. Its contribution can be measured and switched off.
|
|
||||||
|
|
||||||
## The plane on ax
|
The project works through a seven-step plan, the ladder. It is at R3, the first honest number: one
|
||||||
|
governed run that measures detection on real repositories the tool was not tuned on. That run has
|
||||||
|
not happened. It waits on independently reviewed cases, which do not exist yet. No detection arm
|
||||||
|
has met the release gate on unseen repositories. On two frozen populations the engine found 1 of 11
|
||||||
|
and then 0 of 17 of the known vulnerabilities; [Where we stand](docs/where-we-stand.md) gives the
|
||||||
|
record behind each figure. Work on the engine runs alongside and does not wait for R3.
|
||||||
|
|
||||||
Model-driven work over whole repositories runs as a Run manifest. A Run is a DAG of ax Tasks. Each
|
```mermaid
|
||||||
Task runs in its own gVisor actor (an isolated sandbox) on Agent Substrate. ax is the only agentic
|
flowchart LR
|
||||||
executor; there is no local subprocess path.
|
R0["R0 Closure: done"] --> R1["R1 Benchmark machinery: done"]
|
||||||
|
R1 --> R2["R2 Real population: machinery done, reviewed cases missing"]
|
||||||
- Each Task binds at most one Model and its own `usd`/`calls` budget.
|
R2 --> R3["R3 First honest number: waiting"]
|
||||||
- Egress is deny-by-default per Task, by hostname only.
|
R3 --> R4["R4 Shippable scope: drafted"]
|
||||||
- The provider key travels only in the Task's start request, never in a manifest or an image.
|
R4 --> R6["R6 Narrow advisory rollout: not started"]
|
||||||
|
R5["R5 Engine depth and hardening: in progress"] -. "feeds later claims" .-> R4
|
||||||
Measured on the first increment: the plane agreed on 16 of 20 declared sites at $0.0205 per
|
classDef done fill:#c8e6c9,stroke:#388e3c
|
||||||
candidate.
|
classDef now fill:#fff9c4,stroke:#f9a825
|
||||||
|
classDef todo fill:#eeeeee,stroke:#90a4ae
|
||||||
```bash
|
class R0,R1 done
|
||||||
uv run ousast plane doctor # kind, Agent Substrate, ax controller, runner image
|
class R2,R3,R4,R5 now
|
||||||
uv run ousast plane run plane/runs/validation-46.yaml # a rerun skips tasks already done; --workers bounds tasks in flight
|
class R6 todo
|
||||||
uv run ousast plane status validation-46 # per-task status and the token attribution table
|
|
||||||
uv run ousast plane remember validation-46 # ingest the run's rows into the memory store
|
|
||||||
```
|
```
|
||||||
|
|
||||||
`workspaces`, `harvest`, `alerts-engine` and `memory-normalise` generate Runs, their inputs and
|
| Step | What it gives you | State on 2026-11-28 |
|
||||||
the store's rewrites. The flow and the task catalogue: [docs/plane.md](docs/plane.md). How the plane
|
| --- | --- | --- |
|
||||||
was deployed on the maintainer's host, and what moving it to a separate cluster would take:
|
| R0 Closure | The blocked engine work is unblocked, and the backlog is pushed. | Done, 2026-11-20 |
|
||||||
[docs/deployment.md](docs/deployment.md).
|
| R1 Benchmark machinery | The machinery that measures detection fairly. | Every subtask is checked |
|
||||||
|
| R2 Real population frozen | Real repositories to measure on. | Machinery checked. The independently reviewed cases are still missing |
|
||||||
|
| R3 First honest number | Recall and false alarms on repositories the tool has never seen. | Waiting on the reviewed cases |
|
||||||
|
| R4 Shippable scope declared | The exact families a release may claim. | Drafted. Provisional until R3 has been read |
|
||||||
|
| R5 Engine depth and hardening | Better detection in the static engine. | In progress |
|
||||||
|
| R6 Narrow advisory rollout | A first release, with a stated scope. | Not started |
|
||||||
|
|
||||||
HarnessX, the earlier agentic extra, was retired 2026-09-30. A `[harnessx]` section is ignored
|
Past milestones:
|
||||||
with one warning. `[models] verifier`, `[fusion] panel_model` and `[fusion] decider_model` fail and
|
|
||||||
name the plane replacement. Config keys that nothing ever read fail the same way. Fusion is
|
|
||||||
deterministic.
|
|
||||||
|
|
||||||
## Memory
|
| Date | Milestone | Result |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| 2026-09-14 | The release path: prove usefulness, then speed and transfer. | Accepted |
|
||||||
|
| 2026-09-16 | M1a: the detection shown, with every veto recorded. | Met, on a fixture repository (NodeGoat) |
|
||||||
|
| 2026-09-17 | M2: the same analysis fast enough for a push. | Measured and not met |
|
||||||
|
| 2026-10-02 | The pre-push hook on any repository. | Operational and advisory |
|
||||||
|
| 2026-10-30 | The third admission read of the access-control arm. | NO-GO. The arm is parked |
|
||||||
|
| 2026-11-06 | Checkpoint v2.1.0-alpha.1. | The project stops trying to block a push on the static analyser alone |
|
||||||
|
| 2026-11-20 | R0 Closure, and the ladder replaces the earlier plans. | Done |
|
||||||
|
| 2026-11-23 | Population v4 for M4 frozen: 11 cases. | Frozen, not scanned |
|
||||||
|
|
||||||
One store holds what plane runs and the decision engine learned. It is keyed by repository and pin.
|
The release milestones M1 to M5, the status of 2026-11-06 and the rules that bind every step are
|
||||||
It holds two kinds of data:
|
in [Roadmap](docs/roadmap.md). The release history is in [RELEASE_NOTES.md](RELEASE_NOTES.md).
|
||||||
|
Every figure has its record in [Where we stand](docs/where-we-stand.md).
|
||||||
|
|
||||||
- rows: facts, verdicts, unit costs, alerts, coverage and feature records;
|
## Documentation
|
||||||
- content-addressed blobs: excerpts, embeddings, cached responses and compiled programs.
|
|
||||||
|
|
||||||
`OUSAST_MEMORY` selects the backend. It is either a local file store or `s3://<bucket>` on any
|
The documentation site is published at <https://norandom.github.io/OpenUltraSAST/>. Its sources are
|
||||||
S3-compatible server. The S3 server must support versioning, lifecycle rules, object tags and S3
|
in `docs/` and `mkdocs.yml`; to preview it locally, run `uv sync --extra docs && uv run mkdocs serve`.
|
||||||
Select. RustFS is the tested server.
|
Every page, by what you want to do:
|
||||||
|
|
||||||
An admin sets the bucket up once. The store verifies it at every start. If anything is missing, it
|
| Page | For |
|
||||||
refuses to run and names each missing piece. It does not fall back.
|
| --- | --- |
|
||||||
|
| [Documentation home](docs/index.md) | The site's home page: the three layers, how they connect, and where to go next |
|
||||||
|
| [End-to-end examples](docs/examples.md) | Walkthroughs from a first quick scan to an MCP client; where a run is written and how long it is kept |
|
||||||
|
| [Scanning](docs/scanning.md) | The three scan modes, the quick rules per language, the pre-push hook with its install, settings, skip reasons and a CI recipe |
|
||||||
|
| [Pre-push security for developers](docs/pre-push-for-developers.md) | What the hook checks for you, and its honest limits |
|
||||||
|
| [Use case: catch, prove, fix, re-verify](docs/use-case-fix-and-reverify.md) | The loop from a finding to a proven fix |
|
||||||
|
| [Threat model](docs/threat-model.md) | What the tool trusts and what it does not: untrusted code, secret redaction, egress, budgets, the `deep` sandbox |
|
||||||
|
| [Architecture](docs/architecture.md) | The scan pipeline, the evidence ladder, the CWE policy, the project score, calibration |
|
||||||
|
| [Detection techniques](docs/detection-techniques.md) | The program analysis under a scan, with the code it comes from and what it misses |
|
||||||
|
| [Roadmap](docs/roadmap.md) | Past milestones, the present state and what is next |
|
||||||
|
| [Where we stand](docs/where-we-stand.md) | The state in one page, every figure with its record |
|
||||||
|
| [Evaluation](docs/evaluation.md) | How anything is measured on code the tool was not tuned on |
|
||||||
|
| [The plane on ax](docs/plane.md) | Maintainers: model work over whole repositories as Runs of isolated Tasks |
|
||||||
|
| [Memory](docs/memory.md) | Maintainers: the store that holds what plane runs and the decision engine learned |
|
||||||
|
| [Memory and detection](docs/memory-and-detection.md) | Maintainers: how stored rows are meant to improve decisions |
|
||||||
|
| [Decision engine](docs/decision-engine.md) | Maintainers: the learned classifier, in development; its design, evaluation slices and A/B protocol |
|
||||||
|
| [Token ergonomics](docs/token-ergonomics.md) | Maintainers: where model tokens go at runtime and in the maintainers' own sessions |
|
||||||
|
| [Engine and pre-push](docs/ops/README.md) | Operations: the engine image, the Docker wrapper and the host install |
|
||||||
|
| [ax on this host](docs/ops/ax/README.md) | Operations: bring-up and doctor instructions for the plane's local cluster |
|
||||||
|
| [Engine traces on kube-ax](docs/ops/ax/engine-traces.md) | Operations: dispatching an engine trace run to AX tasks, with a Docker fallback lane |
|
||||||
|
| [Deployment](docs/deployment.md) | How the plane was deployed, and what moving it to a separate Kubernetes cluster would take |
|
||||||
|
| [RustFS setup for the memory store](docs/rustfs.md) | The bucket policy and the admin steps for the S3 store |
|
||||||
|
|
||||||
- Layout and the read and write paths: [docs/memory.md](docs/memory.md).
|
## For maintainers and contributors
|
||||||
- The bucket policy and admin steps: [docs/rustfs.md](docs/rustfs.md).
|
|
||||||
- How stored rows are meant to turn into better decisions:
|
|
||||||
[docs/memory-and-detection.md](docs/memory-and-detection.md).
|
|
||||||
|
|
||||||
## Decision engine and evaluation
|
|
||||||
|
|
||||||
A learned decision engine is being built to replace hand-tuned detection edits. Its rules are:
|
|
||||||
|
|
||||||
- Every instrument produces signals, never verdicts.
|
|
||||||
- Labels come from ground truth only.
|
|
||||||
- A compiled AI classifier with local memory turns retrieved similar cases and the candidate's
|
|
||||||
signals into a calibrated probability. It has BLOCK and ADVISORY operating points.
|
|
||||||
|
|
||||||
It is **in development, not adopted**. No scan, pre-push check or report uses it.
|
|
||||||
|
|
||||||
It was measured on six families, on repositories the compiled program was not shown:
|
|
||||||
|
|
||||||
- The pooled AUC (area under the ROC curve) of its score runs from 0.77 (injection) to 0.96
|
|
||||||
(access control).
|
|
||||||
- The stricter within-pair AUC is 0.72 to 0.93 across the same families.
|
|
||||||
- BLOCK is offered for no family
|
|
||||||
(`benchmarks/measurements/2026-10-02-decision-engine-slice-2/record.json`).
|
|
||||||
|
|
||||||
Maintainer surface: `ousast learn labels|memory|compile|evaluate|curve|experiment|audit-leaks`.
|
|
||||||
The design and evaluation slices are in [docs/decision-engine.md](docs/decision-engine.md), along with the A/B protocol.
|
|
||||||
|
|
||||||
[docs/evaluation.md](docs/evaluation.md) explains how anything is measured on code the tool was not
|
|
||||||
tuned on. It covers the pair corpora, the independent populations and the M4 gates. It also covers
|
|
||||||
the fold discipline that keeps learned decisions out of their own training data. Population v3
|
|
||||||
(PHP, 15 cases) is frozen as the one-time final check. Nothing in the tree may read it. Population v4
|
|
||||||
(11 cases) was frozen on 2026-11-23 and is unscanned; `protocol-v4.md` is committed and no result
|
|
||||||
exists.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
uv run ousast benchmark benchmarks/manifests/python-vulnerable.toml --mode quick
|
|
||||||
uv run ousast pairs --slice sast # fire on the vulnerable side, stay silent on the fix
|
|
||||||
uv run python -m openultrasast.pair_gate # CI: local pairs must all pass
|
|
||||||
```
|
|
||||||
|
|
||||||
## Token economics
|
|
||||||
|
|
||||||
Model tokens are the one running cost. At runtime the plane routes them:
|
|
||||||
|
|
||||||
- one Model and one budget per Task;
|
|
||||||
- a metered client that refuses the next call at the ceiling;
|
|
||||||
- repository facts computed without a model and reused;
|
|
||||||
- blobs replayed at $0, with no new model call;
|
|
||||||
- triage before the hunt;
|
|
||||||
- a tie-break only on disputed candidates.
|
|
||||||
|
|
||||||
In development, 85.5% of the maintainers' coding-session tokens were tool input and output rather
|
|
||||||
than reasoning. That is down from 90%. The remedies in `benchmarks/dev/` target that share.
|
|
||||||
Mechanisms, the measured costs and the before-and-after table:
|
|
||||||
[docs/token-ergonomics.md](docs/token-ergonomics.md).
|
|
||||||
|
|
||||||
## Examples, threat model
|
|
||||||
|
|
||||||
- End-to-end walkthroughs, from a quick scan to an MCP client: [docs/examples.md](docs/examples.md).
|
|
||||||
- What the tool trusts and what it does not: [docs/threat-model.md](docs/threat-model.md). This
|
|
||||||
covers scanned code as untrusted input, secret redaction, per-task egress, budgets and the
|
|
||||||
`deep` sandbox.
|
|
||||||
|
|
||||||
## Contributing and maintainer tooling
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
uv run pytest # tests, incl. the 90/10 detection gate
|
uv run pytest # tests, incl. the 90/10 detection gate
|
||||||
@@ -375,8 +261,13 @@ uv run python -m openultrasast.pair_gate # local vuln-vs-fix pairs
|
|||||||
uv run python dagger/ci.py # containerized CI pipeline
|
uv run python dagger/ci.py # containerized CI pipeline
|
||||||
```
|
```
|
||||||
|
|
||||||
An agent that can run shell commands needs nothing but the CLI. For [OpenCode](https://opencode.ai)
|
Two parts are in development, and a scan needs neither of them: the agentic plane for model work
|
||||||
there are two project skills in `.agents/skills/`:
|
over whole repositories ([The plane on ax](docs/plane.md)) and a learned decision engine
|
||||||
|
([Decision engine](docs/decision-engine.md)). The benchmark and pair commands that maintainers run
|
||||||
|
are in [Examples](docs/examples.md). Other maintainer commands: `ousast repos` (pinned
|
||||||
|
known-vulnerable checkouts) and `ousast model candidates` (what the candidate enumerator can reach).
|
||||||
|
|
||||||
|
For [OpenCode](https://opencode.ai) there are two project skills in `.agents/skills/`:
|
||||||
|
|
||||||
- `openultrasast-scan`: modes and their prerequisites, `--fail-on`, the evidence ladder, recorded
|
- `openultrasast-scan`: modes and their prerequisites, `--fail-on`, the evidence ladder, recorded
|
||||||
degradations and run artifacts.
|
degradations and run artifacts.
|
||||||
@@ -393,10 +284,7 @@ command.
|
|||||||
```
|
```
|
||||||
|
|
||||||
The `kiro-*` skills, `AGENTS.md` and the Kiro-style specifications under `.kiro/` are the
|
The `kiro-*` skills, `AGENTS.md` and the Kiro-style specifications under `.kiro/` are the
|
||||||
maintainer's development tooling. Users can ignore them. Other maintainer commands:
|
maintainer's development tooling. Users can ignore them.
|
||||||
|
|
||||||
- `ousast repos`: pinned known-vulnerable checkouts.
|
|
||||||
- `ousast model candidates`: what the candidate enumerator can reach.
|
|
||||||
|
|
||||||
## Licence
|
## Licence
|
||||||
|
|
||||||
@@ -406,83 +294,3 @@ own terms:
|
|||||||
- Joern (Apache-2.0) is downloaded at image build time.
|
- Joern (Apache-2.0) is downloaded at image build time.
|
||||||
- The tree-sitter wheels of the `semantic` extra are MIT.
|
- The tree-sitter wheels of the `semantic` extra are MIT.
|
||||||
- The published benchmark cases were licence-checked one by one. v1's OpenCVE case is BUSL-1.1, see [RELEASE_NOTES.md](RELEASE_NOTES.md).
|
- The published benchmark cases were licence-checked one by one. v1's OpenCVE case is BUSL-1.1, see [RELEASE_NOTES.md](RELEASE_NOTES.md).
|
||||||
|
|
||||||
## Engine traces on kube-ax
|
|
||||||
|
|
||||||
`benchmarks/learn/engine_trace.py --executor ax` submits AX v0.3.1 Tasks with
|
|
||||||
`ax apply -f -` and removes them with `ax delete task NAME`. The operator supplies
|
|
||||||
kubeconfig and AX access; the dispatcher creates no Kubernetes resources or secrets.
|
|
||||||
The `ousast-engine-task` GHCR package **must be made Public once** in its package
|
|
||||||
settings so the actors can pull it without registry credentials.
|
|
||||||
|
|
||||||
The task image contains the current engine and worker code. Rebuild it after code
|
|
||||||
changes and pass its digest with `--image`; no analyzer download is needed. The host
|
|
||||||
prepares each pin as usual and uploads source and prepared questions under
|
|
||||||
`engine-queue/<run>/<pin>/`. Only object-scoped presigned URLs and deadline parameters
|
|
||||||
enter Task env. Credentials stay on the coordinator. Configure `OUSAST_MEMORY=s3://…`
|
|
||||||
and the store credentials in the coordinator's `.env` or environment, with
|
|
||||||
`S3_ENDPOINT=https://files.because-security.com`. Presigned links expire after the
|
|
||||||
pin deadline plus ten minutes. IP and HTTP endpoints are rejected: the operator's
|
|
||||||
actor EgressPolicy must allow files.because-security.com:443.
|
|
||||||
|
|
||||||
The result object marks completion, even while AX reports Running. Failed phases and
|
|
||||||
host deadlines produce explicit failure/timeout rows. Task and staging-object cleanup
|
|
||||||
runs on success and failure; cleanup failure stops further dispatch. Per-pin files,
|
|
||||||
`--rerun-status`, resume and `progress.json` retain the existing trace-runner behavior.
|
|
||||||
AX results include `executor: "ax"`, `worker_ip`, and the image digest. Placement is
|
|
||||||
random; `--parallel` defaults to two AX tasks and cannot exceed two.
|
|
||||||
|
|
||||||
AX workers use `--heap-profile cluster` with
|
|
||||||
`-Xms1700m -Xmx1700m -XX:MaxMetaspaceSize=256m -XX:ReservedCodeCacheSize=128m -XX:MaxDirectMemorySize=256m -Xss512k -XX:ActiveProcessorCount=1 -XX:+UseG1GC`
|
|
||||||
on every frontend/query JVM; instruments record the flags. A `JVM out of memory`
|
|
||||||
result is automatically re-queued to one local Docker lane with `--heap-profile vm`
|
|
||||||
(2560m), recording `fallback: "vm-oom"` and the AX attempt. `mixed-ax` also uses this
|
|
||||||
one Docker lane for overflow, prioritizing pending OOM fallbacks. Thus a mixed run has
|
|
||||||
up to two AX tasks plus one Docker container. Use `--docker-image` for the locally
|
|
||||||
available VM image; Docker never pulls it implicitly. A STOP file prevents new
|
|
||||||
launches; interrupted fallback queues are recovered on resume.
|
|
||||||
|
|
||||||
Coordinator commands, from this worktree (the AX binary and kubeconfig remain
|
|
||||||
configurable). Build the image of the Docker lane, then set `TASK_IMAGE` to the
|
|
||||||
`ousast-engine-task` reference the Engine image workflow printed:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cd /home/mc/Source/OpenUltraSAST/.claude/worktrees/engine-ax
|
|
||||||
export PATH=/home/mc/Source/OpenUltraSAST/.venv/bin:$PATH
|
|
||||||
export PYTHONPATH="$PWD/src"
|
|
||||||
OUSAST_VERSION=engine-ax docker compose build
|
|
||||||
# The ousast-engine-task reference the Engine image workflow printed, in its log and its summary:
|
|
||||||
export TASK_IMAGE="ghcr.io/norandom/ousast-engine-task@sha256:<digest>"
|
|
||||||
```
|
|
||||||
|
|
||||||
`docker compose build` takes the base from the defaults in `docker-compose.yml`,
|
|
||||||
which a test keeps equal to `plane/task-base.digest`; `OUSAST_VERSION` sets the tag
|
|
||||||
of the image, here `openultrasast:engine-ax`. The Engine image workflow also
|
|
||||||
builds/pushes both images and prints each digest; CI needs the changes published
|
|
||||||
before dispatch. When the workflow runs is the rebuild policy in
|
|
||||||
[ops/ax/README.md](ops/ax/README.md). The Docker lane runs the local image,
|
|
||||||
committed or not; the AX lanes run the task image of the revision the workflow built.
|
|
||||||
|
|
||||||
With `KUBECONFIG` pointing to the operator's kube-ax config and store settings in
|
|
||||||
`.env`, run a one-pin smoke using the default experiment units and local example
|
|
||||||
memory (or add `--examples /path/to/frozen-examples.jsonl`). Use the `ax` binary at
|
|
||||||
`$HOME/go/bin/ax`. `$HOME/.local/ax-v0.3.1/ax` hits the AX-lane dispatch blocker:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
: "${KUBECONFIG:?Set KUBECONFIG to the operator kube-ax configuration}"
|
|
||||||
python benchmarks/learn/engine_trace.py --executor ax \
|
|
||||||
--ax-bin "$HOME/go/bin/ax" --kubeconfig "$KUBECONFIG" \
|
|
||||||
--atespace default --image "$TASK_IMAGE" --docker-image openultrasast:engine-ax \
|
|
||||||
--parallel 1 --limit 1 --deadline 900 \
|
|
||||||
--out "$HOME/ousast-results/plane/engine-ax-smoke"
|
|
||||||
```
|
|
||||||
|
|
||||||
Then run the mixed lanes (repeat to resume; defaults re-run failed/timeout pins):
|
|
||||||
|
|
||||||
```bash
|
|
||||||
python benchmarks/learn/engine_trace.py --executor mixed-ax \
|
|
||||||
--ax-bin "$HOME/go/bin/ax" --kubeconfig "$KUBECONFIG" \
|
|
||||||
--atespace default --image "$TASK_IMAGE" --docker-image openultrasast:engine-ax \
|
|
||||||
--parallel 2 --deadline 900 --rerun-status failed,timeout \
|
|
||||||
--out "$HOME/ousast-results/plane/engine-ax-mixed"
|
|
||||||
```
|
|
||||||
|
|||||||
@@ -17,6 +17,10 @@ Recall means the share of known bugs found. FP means false positives.
|
|||||||
The detection gate and the local pairs are CI gates. They catch regressions. They do not
|
The detection gate and the local pairs are CI gates. They catch regressions. They do not
|
||||||
estimate recall on real code, because the rules were written against them.
|
estimate recall on real code, because the rules were written against them.
|
||||||
|
|
||||||
|
The gate's committed baseline, `benchmarks/measurements/2026-09-06-gate-baseline.txt`, records 93.62%
|
||||||
|
recall (44/47) and 0.0% false positives. The README quoted it from 2026-10-02 (commit `bdabb97`). PHP
|
||||||
|
is not in the gate.
|
||||||
|
|
||||||
## Pair corpora
|
## Pair corpora
|
||||||
|
|
||||||
A pair is a vulnerable function and its fixed version. You can run the catalog
|
A pair is a vulnerable function and its fixed version. You can run the catalog
|
||||||
|
|||||||
+4
-3
@@ -16,15 +16,16 @@ under its runs directory when that directory lies inside the scanned path; when
|
|||||||
files out of the scan, `ousast` prints one `notice:` line naming the directory and how many.
|
files out of the scan, `ousast` prints one `notice:` line naming the directory and how many.
|
||||||
`ousast benchmark` writes its run to the same directory, as `<runs_dir>/<benchmark-run-id>/` beside
|
`ousast benchmark` writes its run to the same directory, as `<runs_dir>/<benchmark-run-id>/` beside
|
||||||
the scan runs, and prints that path (`benchmark_run_dir=<path>`); run retention removes it like a
|
the scan runs, and prints that path (`benchmark_run_dir=<path>`); run retention removes it like a
|
||||||
scan run.
|
scan run. The MCP tool `openultrasast.benchmark` uses the same directory.
|
||||||
|
|
||||||
A scan that rejects or holds a finding writes one file into the scanned tree, and only when that
|
A scan that rejects or holds a finding writes one file into the scanned tree, and only when that
|
||||||
file's content would change:
|
file's content would change:
|
||||||
`<target>/.openultrasast/calibration/false_positive_learnings.json` (`.openultrasast/` is
|
`<target>/.openultrasast/calibration/false_positive_learnings.json` (`.openultrasast/` is
|
||||||
gitignored in this repository, not in one of your own). On a read-only tree the scan records
|
gitignored in this repository, not in one of your own). On a read-only tree the scan records
|
||||||
`ledger_not_written` instead and keeps the learnings in the ledger of the tree's digest,
|
`ledger_not_written` instead and keeps the learnings in the ledger of the tree's digest,
|
||||||
`<runs_dir>/calibration/<digest>.json`, read by the next scan of the very same bytes (the README says
|
`<runs_dir>/calibration/<digest>.json`, read by the next scan of the very same bytes. The `ledger` block
|
||||||
the same under "Scan modes").
|
of `manifest.json` names the digest, how many learnings came from each ledger, and what became of the
|
||||||
|
digest's ledger. [Architecture](architecture.md#scoped-calibration-every-scan) describes the mechanism.
|
||||||
|
|
||||||
## 1. Quick scan a local repo (deterministic, no keys)
|
## 1. Quick scan a local repo (deterministic, no keys)
|
||||||
|
|
||||||
|
|||||||
+4
-3
@@ -5,9 +5,10 @@ repositories it has never seen. It scans a checkout, or the commits a `git push`
|
|||||||
keeps what it can prove apart from what it only suspects. When a scan could not look at
|
keeps what it can prove apart from what it only suspects. When a scan could not look at
|
||||||
something, it records a degradation. It does not report a clean result.
|
something, it records a degradation. It does not report a clean result.
|
||||||
|
|
||||||
**State as of 2026-10-02 (v2.0.0):** the pre-push safety net is **NO-GO** for rollout.
|
**State as of 2026-11-28:** the safety net is not released yet. No hook capability is enabled: the pre-push
|
||||||
No hook capability is enabled. No independent population (a case set frozen before any scan) has
|
hook is advisory, and nothing blocks a push. No detection arm has met the release gate on unseen
|
||||||
passed the qualification gates (see [Evaluation](evaluation.md)).
|
repositories (see [Evaluation](evaluation.md)). The project is at step R3 of its ladder, the first
|
||||||
|
honest number, which waits on independently reviewed cases (see [Roadmap](roadmap.md)).
|
||||||
|
|
||||||
## Three layers
|
## Three layers
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# Engine traces on kube-ax
|
||||||
|
|
||||||
|
`benchmarks/learn/engine_trace.py --executor ax` sends an engine trace run to AX Tasks on kube-ax,
|
||||||
|
with one local Docker lane as the fallback. The runbook is the maintainer's: it names the paths of the
|
||||||
|
coordinator host.
|
||||||
|
|
||||||
|
--8<-- "ops/ax/engine-traces.md:3"
|
||||||
|
|
||||||
|
*Source: `ops/ax/engine-traces.md` in the repository, from its line 3 on; this page includes it when the docs site is built.*
|
||||||
+123
@@ -0,0 +1,123 @@
|
|||||||
|
# Roadmap
|
||||||
|
|
||||||
|
State on 2026-11-28. The project is at step R3 of its ladder, the first honest number. That is one
|
||||||
|
governed run (task 11.6 of the valid benchmark) that measures detection on real repositories the tool
|
||||||
|
was not tuned on. The run has not happened: the independently reviewed cases it needs do not exist
|
||||||
|
yet. The position this page rests on was refreshed on 2026-11-25 and read again on 2026-11-28.
|
||||||
|
|
||||||
|
What you can run today does not wait for it: a quick scan of a checkout, an advisory pre-push hook for
|
||||||
|
any repository, and the Joern engine in Docker. None of it blocks a push. No detection arm has met the
|
||||||
|
release gate on unseen repositories, so every result is advisory. The next action is the governed run
|
||||||
|
once the cases are reviewed, then the final gate (task 11.7: compatibility, security, boundary and
|
||||||
|
regression). Work on the engine runs alongside and does not wait for it.
|
||||||
|
|
||||||
|
The only detection figures on this page are the two recall counts quoted in the status of 2026-11-06.
|
||||||
|
Every figure, with its record, is in [Where we stand](where-we-stand.md) and [Evaluation](evaluation.md).
|
||||||
|
|
||||||
|
## Where this is going
|
||||||
|
|
||||||
|
On every push, from a hook or CI, OpenUltraSAST answers for the changed code. It stays advisory for
|
||||||
|
every vulnerability family. It blocks a push only for families whose precision has been proven on
|
||||||
|
repositories it has never seen. Two numbers decide that: recall on changes that introduce a
|
||||||
|
vulnerability, and false alarms on ordinary changes. Both are measured on unseen repositories.
|
||||||
|
|
||||||
|
## The ladder
|
||||||
|
|
||||||
|
The ladder of 2026-11-20 is the plan in force. It replaced the earlier orderings and lowered no bar.
|
||||||
|
R5 runs alongside R3 and R4; it does not wait for them.
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
flowchart LR
|
||||||
|
R0["R0 Closure: done"] --> R1["R1 Benchmark machinery: done"]
|
||||||
|
R1 --> R2["R2 Real population: machinery done, reviewed cases missing"]
|
||||||
|
R2 --> R3["R3 First honest number: waiting"]
|
||||||
|
R3 --> R4["R4 Shippable scope: drafted"]
|
||||||
|
R4 --> R6["R6 Narrow advisory rollout: not started"]
|
||||||
|
R5["R5 Engine depth and hardening: in progress"] -. "feeds later claims" .-> R4
|
||||||
|
classDef done fill:#c8e6c9,stroke:#388e3c
|
||||||
|
classDef now fill:#fff9c4,stroke:#f9a825
|
||||||
|
classDef todo fill:#eeeeee,stroke:#90a4ae
|
||||||
|
class R0,R1 done
|
||||||
|
class R2,R3,R4,R5 now
|
||||||
|
class R6 todo
|
||||||
|
```
|
||||||
|
|
||||||
|
| Step | What must be true to move on | State on 2026-11-28 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| R0 Closure | The blocked engine work is unblocked and the backlog is pushed. | Done, 2026-11-20. |
|
||||||
|
| R1 Benchmark machinery | Tasks 6.5 to 9.3 of the valid benchmark: sealed pre-spend diagnostics, a retry authority seam, lease-protected heads, an atomic admission lifecycle for several arms, and an operator entry point. | Every subtask is checked. |
|
||||||
|
| R2 Real population frozen | Four independently reviewed cohorts of real repositories, in at least two families across Python and JavaScript/TypeScript, a population of ordinary changes, and a baseline. | The machinery is checked. The reviewed cohorts do not exist. |
|
||||||
|
| R3 First honest number | One governed admission run on the frozen population. Its GO or NO-GO is bound to the population it spent, and a NO-GO names the missing capability. | Waiting on the reviewed cohorts. |
|
||||||
|
| R4 Shippable scope declared | The release claims exactly the families whose claims survived R3, and it meets the [M4 gates](evaluation.md#independent-populations-and-the-m4-gates). | Drafted. Provisional until R3 has been read. |
|
||||||
|
| R5 Engine depth and hardening | The capabilities a NO-GO names are built: control dependence, modelled sinks, framework and sanitizer knowledge in the engine, a harness that reports the cause of its own failure, a faster engine start, and the PHP transfer once its runtime is unblocked. | In progress. |
|
||||||
|
| R6 Narrow advisory rollout | Eligibility is bound to the exact runtime, query, facts, ranking and policy that passed, and the packaged push experience is revalidated. | Not started. |
|
||||||
|
|
||||||
|
## Release milestones
|
||||||
|
|
||||||
|
The ladder is the order of work. Release readiness is judged by five milestones, and only by evidence.
|
||||||
|
|
||||||
|
| Milestone | What it proves | State on 2026-11-28 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| M1a | One real security change is detected, and every veto is recorded. | Met on 2026-09-16, on a fixture repository (NodeGoat). |
|
||||||
|
| M1b | Only the vetoes that matter are repaired. | Two records disagree. The ladder's position says met on the same fixture. The milestone record says not verified. |
|
||||||
|
| M2 | The same analysis is fast enough for a push: 30 seconds warm, 2 seconds to cancel and report. | Measured and not met on 2026-09-17. A changed-code scan spent most of its 30 second budget building a whole-repository graph. The accepted direction is to reuse the graph across revisions. That work is not scheduled. |
|
||||||
|
| M3 | The shared design transfers to PHP and Python. | Partial. The PHP transfer is blocked by its runtime. |
|
||||||
|
| M4 | Independent cases establish useful detection and low noise. | Pending M3. No spent population has passed its gates. Its 11 frozen cases have not been scanned. |
|
||||||
|
| M5 | A narrow advisory rollout, bound to what passed. | Not started. The eligibility registry was last written on 2026-09-13 and admits no capability today. |
|
||||||
|
|
||||||
|
## Past milestones
|
||||||
|
|
||||||
|
| Date | Milestone | Result |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| 2026-09-14 | The release path: prove usefulness, then speed and transfer. | Accepted. |
|
||||||
|
| 2026-09-16 | M1a: the detection shown, with every veto recorded. | Met, on a fixture repository (NodeGoat). |
|
||||||
|
| 2026-09-17 | M2: the same analysis fast enough for a push. | Measured and not met. |
|
||||||
|
| 2026-10-02 | The pre-push hook on any repository. | Operational and advisory. |
|
||||||
|
| 2026-10-30 | The third admission read of the access-control arm. | NO-GO. The arm is parked. |
|
||||||
|
| 2026-11-06 | Checkpoint v2.1.0-alpha.1. | The project stops trying to block a push on the static analyser alone. |
|
||||||
|
| 2026-11-20 | R0 Closure, and the ladder replaces the earlier plans. | Done. |
|
||||||
|
| 2026-11-23 | Population v4 for M4 frozen: 11 cases. | Frozen, not scanned. |
|
||||||
|
|
||||||
|
## The status of 2026-11-06
|
||||||
|
|
||||||
|
The README carried this status until 2026-11-28. It is kept here as the record of that day.
|
||||||
|
|
||||||
|
- No blocking hook capability is enabled; the pre-push hook is advisory only.
|
||||||
|
- Two independent populations (case sets frozen before any scan) have been spent on the static
|
||||||
|
engine: recall was 1 of 11, then 0 of 17. [Where we stand](where-we-stand.md) gives the record
|
||||||
|
behind each figure. The learned decision engine ranks findings but does not block for any family.
|
||||||
|
- Static abstract interpretation could not prove the precision needed to block a push, and the
|
||||||
|
project no longer tries to meet those gates that way. Work then focused on a dynamic proof arm.
|
||||||
|
It builds and runs a repository's app and demonstrates a finding by a differential: the issue
|
||||||
|
triggers on the vulnerable revision and not on the fixed one. Execution establishes the finding as
|
||||||
|
ground truth, so it can justify a block without calibration. Pilot demonstrations exist, including
|
||||||
|
one executed on the cluster. The arm was being qualified, not shipped.
|
||||||
|
- The release gate is a measured catch-rate and false-alarm number on repositories the tool has
|
||||||
|
never seen (see [Evaluation](evaluation.md)). Until that number exists, treat all output as
|
||||||
|
advisory.
|
||||||
|
|
||||||
|
Every detection change must show an improvement in a controlled measurement on held-out repositories.
|
||||||
|
|
||||||
|
## What changed after that day
|
||||||
|
|
||||||
|
- The ladder of 2026-11-20 made one governed admission run on real repositories the next product
|
||||||
|
milestone. No product milestone outranks it.
|
||||||
|
- The access-control admission arm was parked after three NO-GOs in a row.
|
||||||
|
- Proof by search is parked until R4 needs it. The model lane stays at the proposal stage.
|
||||||
|
- The local cluster that runs the plane is stopped since 2026-11-24. A wider Kubernetes deployment
|
||||||
|
of the plane waits for a re-plan.
|
||||||
|
|
||||||
|
## Rules at every step
|
||||||
|
|
||||||
|
- The benchmark population measures. It never trains.
|
||||||
|
- Two admission NO-GOs in a row park an arm.
|
||||||
|
- Every zero proves that its instrument read non-zero input.
|
||||||
|
- Historical evidence stays frozen.
|
||||||
|
- No detection number is quoted unless it comes from the valid benchmark, and every number is
|
||||||
|
published with its record.
|
||||||
|
- Counts of finished tasks say how the build is going. They say nothing about release readiness.
|
||||||
|
|
||||||
|
## What is not on the path
|
||||||
|
|
||||||
|
A second code property graph engine, an execution stage inside a scan (`deep` equals `standard`),
|
||||||
|
and a server mode are deferred.
|
||||||
@@ -52,6 +52,7 @@ nav:
|
|||||||
- Overview: index.md
|
- Overview: index.md
|
||||||
- How it works:
|
- How it works:
|
||||||
- Where we stand: where-we-stand.md
|
- Where we stand: where-we-stand.md
|
||||||
|
- Roadmap: roadmap.md
|
||||||
- Scanning: scanning.md
|
- Scanning: scanning.md
|
||||||
- Detection techniques: detection-techniques.md
|
- Detection techniques: detection-techniques.md
|
||||||
- Architecture: architecture.md
|
- Architecture: architecture.md
|
||||||
@@ -69,5 +70,6 @@ nav:
|
|||||||
- Operations (maintainers):
|
- Operations (maintainers):
|
||||||
- Engine and pre-push: ops/README.md
|
- Engine and pre-push: ops/README.md
|
||||||
- ax on this host: ops/ax/README.md
|
- ax on this host: ops/ax/README.md
|
||||||
|
- Engine traces on kube-ax: ops/ax/engine-traces.md
|
||||||
- Deployment: deployment.md
|
- Deployment: deployment.md
|
||||||
- RustFS setup for the memory store: rustfs.md
|
- RustFS setup for the memory store: rustfs.md
|
||||||
|
|||||||
@@ -0,0 +1,80 @@
|
|||||||
|
# Engine traces on kube-ax
|
||||||
|
|
||||||
|
`benchmarks/learn/engine_trace.py --executor ax` submits AX v0.3.1 Tasks with
|
||||||
|
`ax apply -f -` and removes them with `ax delete task NAME`. The operator supplies
|
||||||
|
kubeconfig and AX access; the dispatcher creates no Kubernetes resources or secrets.
|
||||||
|
The `ousast-engine-task` GHCR package **must be made Public once** in its package
|
||||||
|
settings so the actors can pull it without registry credentials.
|
||||||
|
|
||||||
|
The task image contains the current engine and worker code. Rebuild it after code
|
||||||
|
changes and pass its digest with `--image`; no analyzer download is needed. The host
|
||||||
|
prepares each pin as usual and uploads source and prepared questions under
|
||||||
|
`engine-queue/<run>/<pin>/`. Only object-scoped presigned URLs and deadline parameters
|
||||||
|
enter Task env. Credentials stay on the coordinator. Configure `OUSAST_MEMORY=s3://<bucket>`
|
||||||
|
and the store credentials in the coordinator's `.env` or environment, with
|
||||||
|
`S3_ENDPOINT=https://files.because-security.com`. Presigned links expire after the
|
||||||
|
pin deadline plus ten minutes. IP and HTTP endpoints are rejected: the operator's
|
||||||
|
actor EgressPolicy must allow files.because-security.com:443.
|
||||||
|
|
||||||
|
The result object marks completion, even while AX reports Running. Failed phases and
|
||||||
|
host deadlines produce explicit failure/timeout rows. Task and staging-object cleanup
|
||||||
|
runs on success and failure; cleanup failure stops further dispatch. Per-pin files,
|
||||||
|
`--rerun-status`, resume and `progress.json` retain the existing trace-runner behavior.
|
||||||
|
AX results include `executor: "ax"`, `worker_ip`, and the image digest. Placement is
|
||||||
|
random; `--parallel` defaults to two AX tasks and cannot exceed two.
|
||||||
|
|
||||||
|
AX workers use `--heap-profile cluster` with
|
||||||
|
`-Xms1700m -Xmx1700m -XX:MaxMetaspaceSize=256m -XX:ReservedCodeCacheSize=128m -XX:MaxDirectMemorySize=256m -Xss512k -XX:ActiveProcessorCount=1 -XX:+UseG1GC`
|
||||||
|
on every frontend/query JVM; instruments record the flags. A `JVM out of memory`
|
||||||
|
result is automatically re-queued to one local Docker lane with `--heap-profile vm`
|
||||||
|
(2560m), recording `fallback: "vm-oom"` and the AX attempt. `mixed-ax` also uses this
|
||||||
|
one Docker lane for overflow, prioritizing pending OOM fallbacks. Thus a mixed run has
|
||||||
|
up to two AX tasks plus one Docker container. Use `--docker-image` for the locally
|
||||||
|
available VM image; Docker never pulls it implicitly. A STOP file prevents new
|
||||||
|
launches; interrupted fallback queues are recovered on resume.
|
||||||
|
|
||||||
|
Coordinator commands, from this worktree (the AX binary and kubeconfig remain
|
||||||
|
configurable). Build the image of the Docker lane, then set `TASK_IMAGE` to the
|
||||||
|
`ousast-engine-task` reference the Engine image workflow printed:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd /home/mc/Source/OpenUltraSAST/.claude/worktrees/engine-ax
|
||||||
|
export PATH=/home/mc/Source/OpenUltraSAST/.venv/bin:$PATH
|
||||||
|
export PYTHONPATH="$PWD/src"
|
||||||
|
OUSAST_VERSION=engine-ax docker compose build
|
||||||
|
# The ousast-engine-task reference the Engine image workflow printed, in its log and its summary:
|
||||||
|
export TASK_IMAGE="ghcr.io/norandom/ousast-engine-task@sha256:<digest>"
|
||||||
|
```
|
||||||
|
|
||||||
|
`docker compose build` takes the base from the defaults in `docker-compose.yml`,
|
||||||
|
which a test keeps equal to `plane/task-base.digest`; `OUSAST_VERSION` sets the tag
|
||||||
|
of the image, here `openultrasast:engine-ax`. The Engine image workflow also
|
||||||
|
builds/pushes both images and prints each digest; CI needs the changes published
|
||||||
|
before dispatch. When the workflow runs is the rebuild policy in `ops/ax/README.md`,
|
||||||
|
under "Image layers, publication and node cache budget". The Docker lane runs the local
|
||||||
|
image, committed or not; the AX lanes run the task image of the revision the workflow
|
||||||
|
built.
|
||||||
|
|
||||||
|
With `KUBECONFIG` pointing to the operator's kube-ax config and store settings in
|
||||||
|
`.env`, run a one-pin smoke using the default experiment units and local example
|
||||||
|
memory (or add `--examples /path/to/frozen-examples.jsonl`). Use the `ax` binary at
|
||||||
|
`$HOME/go/bin/ax`. `$HOME/.local/ax-v0.3.1/ax` hits the AX-lane dispatch blocker:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
: "${KUBECONFIG:?Set KUBECONFIG to the operator kube-ax configuration}"
|
||||||
|
python benchmarks/learn/engine_trace.py --executor ax \
|
||||||
|
--ax-bin "$HOME/go/bin/ax" --kubeconfig "$KUBECONFIG" \
|
||||||
|
--atespace default --image "$TASK_IMAGE" --docker-image openultrasast:engine-ax \
|
||||||
|
--parallel 1 --limit 1 --deadline 900 \
|
||||||
|
--out "$HOME/ousast-results/plane/engine-ax-smoke"
|
||||||
|
```
|
||||||
|
|
||||||
|
Then run the mixed lanes (repeat to resume; defaults re-run failed/timeout pins):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python benchmarks/learn/engine_trace.py --executor mixed-ax \
|
||||||
|
--ax-bin "$HOME/go/bin/ax" --kubeconfig "$KUBECONFIG" \
|
||||||
|
--atespace default --image "$TASK_IMAGE" --docker-image openultrasast:engine-ax \
|
||||||
|
--parallel 2 --deadline 900 --rerun-status failed,timeout \
|
||||||
|
--out "$HOME/ousast-results/plane/engine-ax-mixed"
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user