Commit Graph
1307 Commits
Author SHA1 Message Date
Marius Ciepluch efa2b62bff feat(contributor-scan): pin Open Notebook as the whole vibe-code checkout (5.2, part 1)
benchmarks/repos/open-notebook.toml pins lfnovo/open-notebook at 89eac04c
(tag v1.8.3, MIT), chosen by the maintainer from a shortlist: 462 files in
two languages, 101 Python and 197 TypeScript or JavaScript. It holds one
known entry for each of the eight published advisories whose range covers
the pin, five in scope and three out with the reason in each, and asserts no
rung. Every site was read in the code at the pin, and the fix statements in
the code of the fixed trees rather than in the advisory text.

What the recipe says about scope, so that the measurement is read correctly:
two in-scope entries hand the value to a dependency that performs the sink
(a file read and an HTTP request in content-core), and one sits in
docker-compose.yml, which no scan opens. The engine cannot entail a flow to
a callee that no sink table names, so a miss on those is structural. Only
CVE-2026-33588 has its sink in the tree. The recipe also states what the
learning labels would make of the YAML entry, were a source to list it.

The measurement is part 2 and runs in the image.
2026-11-24 16:06:32 +01:00
Marius Ciepluch 6edae3a585 feat(contributor-scan): a scan writes its run to the user cache, and the ledger only when it learns (3.1, part A)
Where a scan writes. A native scan now creates its run under the user cache,
~/.cache/openultrasast/runs/<scan-id>/ by default ($XDG_CACHE_HOME when it is
set and absolute), prints run_dir=<path> once, and no longer writes anything
under the analysed tree. OPENULTRASAST_RUNS_DIR still wins: an absolute value
is used as given, a relative one resolves against the working directory.
Pre-push storage is unchanged.

The calibration ledger, by maintainer decision: .openultrasast/calibration/
stays the store, and a scan writes the false-positive ledger into the tree
only when its content would change. On a read-only tree the scan records
ledger_not_written, with a sentence in the report, and completes; before, a
read-only target with one rejected finding crashed before report.md existed.

benchmarks/repos/measure.py follows the printed run directory. It read the
run from under the scanned copy, which would have recorded every repository
as failed, and it also read a stale run left in a copy.

Tests: tests/test_scan_output_location.py drives the real CLI and compares
the whole tree before and after; tests/test_repo_measure.py pins the
measurement script; an autouse fixture keeps every test's scan runs out of
the developer's cache; fourteen test files follow the run to its new place.
README, docs/examples.md and the scan skill name the ledger as the one write
a scan makes. _run_scan is touched by one line and stays over the complexity
cap.

Task 3.1 stays open for part B, the readable summary.
2026-11-24 15:33:35 +01:00
Marius Ciepluch d45fc98c4e spec(plane-on-kubernetes): record that the local kind cluster is stopped and the code stays
The maintainer decided on 2026-11-24 to stop the local kind cluster and keep
the code until groups 3 to 8 are re-planned. The cluster was torn down the
same day with ops/ax/down.sh; whether the executor code is deleted is decided
at that re-plan.

The dated section at the end of tasks.md records what was true when the
decision was taken, each with its source: nothing on the product's main line
used the cluster or its stores and the memory store is remote; the rustfs in
the cluster was Substrate's snapshot store, and a file copy of it with
Substrate's postgres data is kept on the development machine; search-with-proof
demonstrated on kube-ax and takes from plane/ only memory.py and budget.py;
the admission that decides rollout does not depend on the local cluster. The
status block at the top points to it, and spec.json carries the date.
2026-11-24 15:25:48 +01:00
Marius Ciepluch 11733bfb87 spec(contributor-scan): record the course of the implementation run and close 7.1 as superseded
The maintainer set the course for this run on 2026-11-24. spec.json now
carries it as two approval entries: the course itself (7.1 closes as
superseded; 5.12 covers facts and generic features and is to record why it
drops the LLM ranker; 7.2 lands before 5.6 and 5.1; the subject for 5.2 is
chosen by the maintainer; a native scan writes to the user cache; both
stages run autonomously and a push follows only after the whole test suite
and every CI check pass), and the later decisions of the same day, recorded
at the time of writing (the 5.2 subject, the calibration ledger, the build
cache, the image contents).

tasks.md: 7.1 is ticked as superseded. Its instrument was built on
2026-09-21 (0beae46, b0500ec), measured on NodeGoat only, and retired with
the other cuts on 2026-10-13 (f5a904b); the NodeGoat record survives and the
successor is the detection-core fact-pack workstream. 5.1 carries its
deferral, which sets aside the Depends line task 5.6 carries. 5.2 names its
chosen subject and says that other advisories affect the pinned version
besides the two labelled ones.
2026-11-24 14:40:08 +01:00
Marius Ciepluch 90170380ec fix(docker): keep the reserved populations out of the image (contributor-scan 3.2)
The root image copies benchmarks/ (Dockerfile:43), and .dockerignore let benchmarks/valid
and benchmarks/unseen through, about 18 MB of reserved-population material.
RELEASE_NOTES.md says every version tag is pushed to ghcr.io/norandom/openultrasast.
Decided by the maintainer on 2026-11-24: both stay out of the image.

The scan path reads neither. The one run-time reader is the hunter's contamination report
(hunt/contamination.py), which runs from a checkout: a missing pool contributes nothing to
it, and it imports benchmarks.unseen.eligibility late, so inside the image that report has
no eligibility module and fails at the import rather than silently.

A test pins both patterns and fails if a later negation lets either back in. The built image
is checked for their absence in task 3.2 part 2, when it is rebuilt.
2026-11-24 14:25:30 +01:00
Marius Ciepluch ab2f55d8ae spec(contributor-scan): close the deferred decisions 4.1 and 4.2 on the maintainer's record
Task 4.1 (Req 7.1), decided 2026-11-24: "C memory-safety beyond string-function misuse
is out of scope. Record that, and say so per corpus slice." The decision is recorded in
the spec's amendment record, the steering overview and roadmap, and the user docs; the
pair corpus README states it per slice (vfc, sast, local). The maintainer stated no
reason, so the records name the evidence that was on record and label it as such: the
memory family models calls, not arithmetic; no execution tier is adopted, since
Rung.EXECUTION_CONFIRMED has no producer; of the 176 vfc pairs none is labelled as going
through a string API the family models (129 carry no sink label, counted 2026-11-24).

With it, task 5.3 (the C harvest of Req 9.2) and task 2.13 are withdrawn, and task 2.15
closes on its recorded-decision branch. Req 9.2 is left unmet and its text stands. The
entailment at contrib/examples/iccfrompng.c:124, libpng's last one by task 2.13's
account, now has nothing that removes it; that is recorded as to be re-measured.

Task 4.2 (Req 7.2), decided 2026-11-24: "Keep both, record why. No output change for
JSON, SARIF or MCP consumers. Record the reason in the spec and docs, and revisit when
detection-core revises its consumer contract." rung is the model ladder's verdict;
evidence_level is the pattern and overlay pipeline's vocabulary, which the overlay raises
only to static_corroboration. Folding one into the other would present a text match as a
model verdict or change the JSON, SARIF and MCP output. No code changes.

Reviewed in four adversarial rounds; the fourth approved both records.
2026-11-24 14:17:30 +01:00
Marius Ciepluch 89d08e01d3 fix(contributor-scan): build the image from the pinned base and keep runs on the writable mount (3.2, part 1)
`docker compose build` has failed since 1b9d1ca (2026-10-05): the Dockerfile requires the task
base's tag and digest and deliberately has no floating fallback, but the compose file passed
neither argument. Compose now defaults both from plane/task-base.digest, the pin CI builds
from, and a test fails when the two drift apart or an argument goes missing.

The service also sets OPENULTRASAST_RUNS_DIR=/reports/runs, so a scan's run directory lands on
the one writable mount (Req 6.3) whatever the default location is.

Built and verified once, with no scan (2026-11-24, 11:02Z to 11:10Z): `docker compose build`
exit 0 in 8m03s, the Joern zip passing its sha512 check, and inside the image the CLI usage,
native PHP 8.4.26, lib/io.joern.joern-cli-4.0.625.jar, the installed package, and the pinned
base's 12 layers and 24 history entries as the image's prefix. That image held HEAD's source
and was removed from the build machine by a Docker prune at 12:56Z.

Task 3.2 stays open: the image must be rebuilt after task 3.1 lands, and part 2 (a real scan
through the image and the shell wrapper, parity with a native run) is not done. Known for part
2: on a fresh checkout Docker creates ./reports root-owned and the image runs as uid 1000, so
the first run cannot write its output.
2026-11-24 14:04:33 +01:00
Marius Ciepluch 4c5b5d7932 test(contributor-scan): pin tier-zero pruning at the scan boundary (5.14)
Four regression tests for the mechanism that landed in 9a8e9f0 and 3b6e642:

- a family absent from the repository is never asked, at callDepth 0 or 3;
- the evidence that prunes a question is asked over that question's own
  scope and at the arbiter's callDepth;
- a pruned question is recorded as deferred with reason tier_zero and
  never as an outcome;
- an evidence summary that does not say the family is absent excludes
  nothing.

Each test was shown red under a control that breaks only the rule it
names. The engine's half of the rules (familyInRepo over the whole graph,
the reachable-set scope above depth 0) is verified by reading taint.sc
only; no executable test pins it.

Task 5.14 stays open: its Observable also asks whether the query completes
on pmpro, and the record on file (2026-09-22) answers that it does not.
2026-11-24 11:43:37 +01:00
Marius Ciepluch d26fbcbe53 docs(valid-detection-benchmark): record the full-scale rehearsal measurement
Item 9 of the hardening pass: the opt-in rehearsal completed a correctly
reviewed 840-input lifecycle in about 92 minutes, with the replay
derivation taking 75% of the time. The note carries the stage timings so
the 11.6 owner budgets the run from a measurement.
2026-11-24 07:42:06 +01:00
Marius Ciepluch 28f160419a test(valid-detection-benchmark): add the opt-in full-scale rehearsal
One test runs the whole lifecycle at 840 inputs with every planned arm and
the per-population review subject, so a correctly reviewed full-scale run
completes for the first time. It is skipped unless
OPENULTRASAST_FULL_SCALE_REHEARSAL=1 and records per-stage wall-clock
seconds. The default path is unchanged: the new ScaleLifecycle arguments
default to None and the timing wrapper always calls its stage.
2026-11-24 07:41:26 +01:00
Marius Ciepluch 26833ffe52 docs(valid-detection-benchmark): record the pre-11.6 hardening pass
Fold-in notes for the reviewer advisories closed before 11.6: reservation
identity, preparation-rooted spend and its harness adoption, the
wrong-typed stage product, the license fixture, the ledger and closure
type guards, the sourcing queue key, the runtime floor, the whole-tree
formatter gate, and the residuals left for the 11.6 owner.
2026-11-23 21:55:38 +01:00
Marius Ciepluch 081adfc052 test(valid-detection-benchmark): route the harness spends through the production spend stage
The end-to-end and scale harnesses committed the shared custody spend by
hand. They now bind the production stage (bind_case_adapter_spend_stage)
through one shared helper that predicts the release review subject before
the spend, so the harness exercises the same path the adapter replay
binds. The failure-injection copy stays a raising fault injector so the
failure matrix keeps its pinned outcomes.

The sealed release the harness persists now has the production shape
(schema version and review covered by the release digest); nothing
pinned the old five-key payload.
2026-11-23 21:54:42 +01:00
Marius Ciepluch 2b49fd748f docs(pre-push-safety-net): record protocol v4 and close the stale open items for 15.1
The lines that said population v4 has no protocol now name protocol-v4.md
(committed before any scan). The 15.1 notes record the maintainer
decisions the protocol fixes, correct the claim that the quick rules are
PHP-only, and list what is still open before the first scan: the v4
runner work, the entry points not traced at the freeze, and a possible
twelfth case.
2026-11-23 21:05:56 +01:00
Marius Ciepluch ca87f4c0a2 bench(independent): pre-registered protocol v4 before any scan
Protocol v4 fixes, before any scan of population v4: the one-time M4 run
after the candidate frozen at M3; three instruments at one analyzer
commit (engine, enabled quick rules, the pre-push hook as the M4
answer); matching with file scope equal to module scope; the v3 gates
per instrument; zero model spend, a model instrument only by amendment
committed before the first scan.

Decisions 1-5 and the hook candidate set are the maintainer's; the
controller's drafting decisions are listed separately in the
confirmation section.
2026-11-23 21:05:07 +01:00
Marius Ciepluch 2951f7d53a fix(valid-detection-benchmark): refuse a wrong-typed stage product as an instrument failure
A run stage that returned None or a product of another type escaped the run
command as a raw AttributeError, or was passed on to the next stage. The
run command now type-checks every stage product against its declared type
and persists an IMPAIRED outcome at that phase with reason
INSTRUMENT_FAILURE; the spent flag stays what durable custody says. Seam
refusals are still re-raised and the INTERRUPTED path is unchanged.
2026-11-23 20:15:28 +01:00
Marius Ciepluch f9d29aa6e8 fix(valid-detection-benchmark): bind a production spend stage for the adapter path
Add bind_case_adapter_spend_stage and export it from the run module: the
stage derives the preparation from the adapter request and commits the
shared spend through commit_preparation_spend_and_release, so a receipt
minted on this path satisfies the core's shared-spend validation. The
legacy release is refused on the same path (contrast test).

The bound stage refuses a stage product that differs from the execution the
request was validated for, before any custody read or write.
2026-11-23 20:15:21 +01:00
Marius Ciepluch 5fdf65e02d fix(valid-detection-benchmark): mint the shared spend receipt from the preparation
Add commit_preparation_spend_and_release: the shared label spend mints its
custody receipt from preparation.label_release_request, which is what the
core's shared-spend validation requires (arm id and influenced artifact
digest of the authority). commit_spend_and_release keeps its behaviour and
its mint order; its receipts cannot satisfy a preparation and are refused by
the replay, as a contrast test now pins.

Closed refusals, all before any write unless stated: wrong preparation type,
head unavailable or moved (no CAS), lost CAS, labels unreadable after the
committed spend (labels_spent true).
2026-11-23 20:15:09 +01:00
Marius Ciepluch 58b2021247 style(valid-detection-benchmark): apply ruff format to three benchmark modules
admission_spend.py, admission_case_adapter.py and run.py were still
unformatted at HEAD (CI runs ruff format --check over the whole tree).
Formatting only: the abstract syntax tree of each file is identical to
the previous revision.
2026-11-23 20:15:02 +01:00
Marius Ciepluch c5ec9a11d1 docs(independent): list population v4 among the independent populations
Population v4 (11 cases: 4 PHP with JavaScript, 4 TypeScript, 3 Python) was frozen on 2026-11-23 and is unscanned. The docs and steering that enumerate populations v1, v2 and v3-php now name it, with no result claimed.
2026-11-23 18:51:37 +01:00
Marius Ciepluch 62a08a0398 docs(pre-push-safety-net): record the population v4 reservation and freeze for 15.1 2026-11-23 17:42:23 +01:00
Marius Ciepluch c97564343e bench(independent): freeze population v4 (11 cases)
freeze.py verified every case with git and file reads only (exit 0). A hand
review in two independent sessions then read each sink at the vulnerable pin
and each benign diff. Eleven cases stand; irrd-host-header-reset-poisoning
was dropped (its declared sink file holds no link construction and the fix
touches none of the link files, so the sink rule cannot be met).

4 PHP with JavaScript, 4 TypeScript, 3 Python; injection 6, untrusted
destination 3, configuration 2. Nothing in it has been scanned, traced,
probed or censused. protocol-v4.md must be committed before the first scan.

freeze-v4.json is pinned in reservation_guard_sources.py beside the
research record, so the guard fails loudly if either file changes.
2026-11-23 17:41:29 +01:00
Marius Ciepluch 624816f36c bench(independent): reserve population v4 (12 cases) by maintainer selection
Reserve a fourth independent population for milestone M4: twelve
repositories (four PHP, four TypeScript, four Python) chosen by the
maintainer from a sixteen-candidate research record built without a
clone or a scan. None of the twelve is named anywhere else in the
development tree.

The research record is pinned by SHA-256 in the reservation guard so the
production guard accepts the one file allowed to name the reserved
repositories. The population is reserved, not frozen: pins, sink
presence and benign changes are verified by the freeze step. Nothing in
it has been scanned, traced, probed or censused.
2026-11-23 16:03:59 +01:00
Marius Ciepluch 078692e903 docs(pre-push-safety-net): record the provisional advisory scope for 15.2
Task 15.2 is implemented as a provisional record (commits b82b52f, d9b7aaa): one packaged scope record, one bounded Scope line per run, the artifact key and the wheel membership. Notes the dangling Requirement 5.6 citation (implemented against 3.1, 5.1, 7.1, 7.3), what must be decided before the scope takes effect, the registry that has been stale since 2026-09-13, and the reviewer suggestions left open.
2026-11-23 15:02:59 +01:00
Marius Ciepluch d9b7aaa6ac feat(pre-push-safety-net): exclude the memory family explicitly and document the scope line
- advisory-scope.json names the taxonomy family memory as excluded, with
  the registry-grounded reason and what a run does not tell
- docs/scanning.md shows the Scope line exactly as the hook prints it
- the loaded-scope guard moves into a helper, so __post_init__ keeps its
  complexity of 14
2026-11-23 13:45:27 +01:00
Marius Ciepluch 364b4c0777 test(valid-detection-benchmark): pin each fix-site key element and non-integer closure totals
- one sourcing-queue pair per fix-site key element (path-only,
  function-only), each proven red by dropping that key line alone
- the closure decode test covers a self-consistent bool total next to
  the float total
- the _request_order docstring names the two ties that remain open
  (fix revisions; shared candidate digest with another family or CWE)
2026-11-23 13:31:01 +01:00
Marius Ciepluch b82b52f976 feat(pre-push-safety-net): declare the provisional advisory scope and print it on every run
One packaged record (advisory-scope.json, shipped in the wheel beside eligibility.json) states the provisional scope, every exclusion with its reason, and what each exclusion leaves untold. The hook renders exactly one bounded Scope line per run in every state (provisional, with defects, record unavailable) and the artifact carries the record under advisory_scope. The record is provisional if and only if the shipped registry is NO-GO with no enabled declaration.

Task 15.2. The task text cites a requirement 5.6 that does not exist, so this is implemented against 3.1, 5.1, 7.1 and 7.3.
2026-11-23 13:01:01 +01:00
Marius Ciepluch bacbe53a0b style(valid-detection-benchmark): apply ruff format to 15 benchmark modules
CI runs ruff format --check over the whole repository, and these modules under benchmarks/valid were the last unformatted files. Formatting only: the AST dump of every file is identical to the previous revision and the logical line count is unchanged (admission_execution.py and admission_projection.py stay at 400).
2026-11-23 11:42:55 +01:00
Marius Ciepluch 0d5aaeecca test(valid-detection-benchmark): cover a non-permissive license class behind an allowlisted expression
The license_class conjunct of the public-material partition had no mismatch fixture. NON_PERMISSIVE and UNCERTAIN sources with an allowlisted expression and an approval are now pinned to the private partition.
2026-11-23 11:40:09 +01:00
Marius Ciepluch 67bc37cac6 fix(valid-detection-benchmark): break sourcing-queue ties on fix-site path and function
Candidates that differed only in fix-site path or function were selected by input order under the queue cap. Both scalars are now part of the request order, so cap selection no longer depends on input order for them.
2026-11-23 11:40:09 +01:00
Marius Ciepluch 9e884e8342 fix(valid-detection-benchmark): require a strict integer for the accepted positive total
total_accepted_positives accepted floats and booleans on both the direct and the decode path. Both now fail closed with STATE_MISMATCH through one sibling helper that keeps _validate_closure within the complexity cap.
2026-11-23 11:40:09 +01:00
Marius Ciepluch 60bb7f0bdd fix(valid-detection-benchmark): fail cohort selection closed on a malformed pending ledger
_ledger_facts accepted any pending_entries value and turned it into a set; a ledger outside the durable shape is now a STATE_MISMATCH on both selection rounds. The _pending_by_ecosystem docstring now states the conflicting-accepted-review corner accurately.
2026-11-23 11:40:09 +01:00
Marius Ciepluch 7e6da2efae fix(valid-detection-benchmark): normalize mixed-case .git suffixes in reservation identity
A reference such as OWNER/REPO.GIT escaped the reserved-identity check at both reservation sites because the suffix was stripped case-sensitively. One shared strip now handles the suffix case-insensitively; identities without a mixed-case suffix are byte-identical.
2026-11-23 11:40:09 +01:00
Marius Ciepluch f2093a5380 fix(valid-detection-benchmark): floor scale runtimes at one millisecond
The 11.5 review noted that the scale validator accepted runtime_ms >= 0,
so a sub-millisecond or frozen-clock reading could be recorded as 0 ms.
Clamp every recorded runtime (per-arm, streaming, lane) to at least 1 ms
and tighten the validator to > 0. A frozen-clock test proves all three
floors; it fails against the previous source (0 ms receipts).
2026-11-23 11:05:20 +01:00
Marius Ciepluch f30a5d2cb2 style(valid-detection-benchmark): apply ruff format to 10.x/11.x test files
`ruff format --check src tests` failed on the 17 test files and helpers added by tasks 10.x and 11.x. Formatting only: the AST of every file is unchanged.
2026-11-23 09:27:41 +01:00
Marius Ciepluch a68796610a feat(valid-detection-benchmark): 11.5 streaming scale bounded validation and back-pressure 2026-11-23 06:21:43 +01:00
Marius Ciepluch 66ec3e1a31 feat(valid-detection-benchmark): 11.4 spend-ordering crash and failure-visibility matrix 2026-11-23 03:51:56 +01:00
Marius Ciepluch da5323002e feat(valid-detection-benchmark): 11.3 end-to-end lifecycle with case adapter and hostile-decode retrofit 2026-11-23 02:50:12 +01:00
Marius Ciepluch 73c8a9d6b3 feat(valid-detection-benchmark): 11.2 persistence custody and scratch-loss suites 2026-11-22 23:28:46 +01:00
Marius Ciepluch 936835477a feat(valid-detection-benchmark): 11.1 governance and confidentiality adversarial suites 2026-11-22 23:01:01 +01:00
Marius Ciepluch c587f25bb3 feat(valid-detection-benchmark): 10.7 freeze and causally bind replacement baseline 2026-11-22 22:27:09 +01:00
Marius Ciepluch 93ebea7b93 feat(valid-detection-benchmark): 10.6 draw and validate ordinary-change population 2026-11-22 21:38:26 +01:00
Marius Ciepluch c867f24f7d docs(valid-detection-benchmark): persist 10.4/10.5 review advisories 2026-11-22 20:12:21 +01:00
Marius Ciepluch c2b5f5bc92 feat(valid-detection-benchmark): 10.5 ingest fourth cohort and close positive set 2026-11-22 20:12:03 +01:00
Marius Ciepluch 6d66501192 feat(valid-detection-benchmark): 10.4 select and ingest third reviewed cohort 2026-11-22 19:16:54 +01:00
Marius Ciepluch 408a562c41 feat(valid-detection-benchmark): 10.3 ingest bounded reviewed JavaScript/TypeScript cohort 2026-11-22 18:42:51 +01:00
Marius Ciepluch 825e680804 feat(valid-detection-benchmark): 10.2 ingest bounded reviewed Python cohort 2026-11-22 10:25:59 +01:00
Marius Ciepluch 34344234d5 feat(valid-detection-benchmark): 10.1 create bounded sourcing and review queues for both initial ecosystems 2026-11-21 21:29:52 +01:00
Marius Ciepluch a961a8080c chore(deps): refresh uv lockfile to revision 5 2026-11-21 21:09:49 +01:00
Marius Ciepluch e4ae37958e docs(valid-detection-benchmark): record R1 final-validation follow-up owners 2026-11-21 19:41:35 +01:00
Marius Ciepluch d81255e256 style(valid-detection-benchmark): apply repo formatter to R1 test files 2026-11-21 19:28:10 +01:00