diff --git a/.kiro/specs/pre-push-safety-net/tasks.md b/.kiro/specs/pre-push-safety-net/tasks.md index 34f892b2..70a9b9b0 100644 --- a/.kiro/specs/pre-push-safety-net/tasks.md +++ b/.kiro/specs/pre-push-safety-net/tasks.md @@ -602,7 +602,8 @@ Preserve all completed task evidence below. - _Frozen 2026-09-24._ `benchmarks/independent/freeze.py` verified every case with git and file reads only -- no analyzer, query or tooling: both pins present and ordered, the sink text present at the vulnerable pin (LearnPress's fix is source-side and recorded as `fix_site`; Mockoon's sink is recorded as `sink_evidence`), the fix touching the sink or its declared fix site, and SHA-256 of the sink file at both pins. Benign controls were proposed mechanically and REVIEWED by diff: the keyword filter alone let through an access-restriction, a filter check, API-token scopes, a login change and a TLS-verification option, all rejected; Ultimate Member's and alerta's controls were replaced by hand (a coding-standards reformat; a dependency-plumbing change with both sides still vulnerable). Record: `freeze-v1.json`. The guard test now requires a benign pair for every case of a frozen population. Nothing in it has been scanned; the first scan is the evaluation. - _Reserved 2026-11-23, population v4._ Why a fourth population: v1 and v2 were evaluated and failed every M4 gate, and v3 (PHP) is frozen for the one-time final check. Twelve cases selected by the maintainer from sixteen researched by advisory and fix diff only (no clone, no scan), none among the repositories this tree names: 4 PHP with JavaScript (rtMedia SQL injection, Drupal core SQL injection, Known SSRF, TYPO3 news SQL injection), 4 TypeScript (Tianji SQL injection, Vendure SQL injection, Novu SSRF, Strapi permissive CORS), 4 Python (agenticSeek debug mode, Rucio SQL injection, LlamaFactory SSRF, IRRD host-header reset-link poisoning). Records: `benchmarks/independent/population-v4.toml`, `research-2026-11-23.md`. Since commit 731eb8d the guard scans every file under benchmarks, plane, src and tests, so each file that names a reserved repository is pinned by SHA-256 in `benchmarks/valid/reservation_guard_sources.py`. Commit 624816f. - _Frozen 2026-11-23._ `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 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. The population holds 11 cases, 4 PHP with JavaScript, 4 TypeScript, 3 Python (injection 6, untrusted destination 3, configuration 2), with four multi-language members. The review named the functions freeze.py could not resolve (Novu, Vendure), replaced one benign proposal by hand (agenticSeek: the proposal edited the denial branch of a tool guard), and read and recorded every licence. Record: `freeze-v4.json`, pinned, with the review fields inside it. Nothing in it has been scanned, traced, probed or censused. Commit c975643. - - _Still open before the first scan:_ (1) `protocol-v4.md` does not exist; it must be committed before any scan and must state, per language, which instruments run (`evaluate.py` runs only the Joern engine and the quick rules are PHP-only), the matching rule, the gates and the budget: maintainer choices. (2) Not traced at the freeze, by rule, and recorded as such in the population: the request entry points and privilege claims of every case. (3) A twelfth case to replace IRRD needs its own reservation and freeze. (4) The docs that list populations with counts (`docs/evaluation.md`, `docs/where-we-stand.md`, the steering files) do not list v4 yet. + - _Protocol v4 committed 2026-11-23._ `benchmarks/independent/protocol-v4.md`, before any scan (commit ca87f4c). Maintainer decisions: the one-time M4 run after the candidate frozen at M3; three instruments at one analyzer commit (the engine, the enabled quick rules of PHP, JavaScript/TypeScript and Python, and the pre-push hook as the M4 answer); file scope equals module scope in matching; the v3 gates per instrument; zero model spend, with a model instrument only by an amendment committed before the first scan (candidates named: deepseek-flash, GLM-5.4 or GLM-5.3; a result is bound to the exact model and version); the hook's candidate alerts are the product's own set (quick matches plus new or worsened engine candidates); warm latency is measured on the second of two identical runs. Decisions the controller made while drafting are listed separately in the protocol's confirmation section. Two statements of the earlier open item are corrected: `evaluate.py` runs only the Joern engine, but the quick rules are not PHP-only (12 enabled JavaScript/TypeScript rules, 11 Python). The docs and steering files list v4 since commit c5ec9a1. + - _Still open before the first scan:_ (1) Runner work the protocol requires and no script provides yet: a v4 runner for the three instruments (engine through `finding_dump.py`, quick rules on fresh exports, the hook on three push pairs per case), the protocol stamp in the result (`evaluate.py` stamps `protocol-v2.md` for every version after v1), module-scope normalisation before matching, and a timing per hook run. (2) Not traced at the freeze, by rule, and recorded as such in the population: the request entry points and privilege claims of every case. (3) A twelfth case to replace IRRD needs its own reservation and freeze. - _Boundary: Evaluation harness, corpus provenance_ - _Requirements: 8.1, 8.2_ - [x] 15.2 Declare the v1 advisory scope as the families whose claims can be admitted diff --git a/.kiro/steering/overview.md b/.kiro/steering/overview.md index b2db2992..9666f261 100644 --- a/.kiro/steering/overview.md +++ b/.kiro/steering/overview.md @@ -98,8 +98,8 @@ User-facing documentation: `README.md`, `docs/architecture.md`, `docs/evaluation - **Evaluation.** Populations v1 and v2 are spent and failed every M4 gate (`benchmarks/independent/results-v1.json`, `results-v2.json`); v3 (PHP) is frozen and untouched for the one-time final check. The plane increment met its gate on the second measurement with a tie-break chosen after the first (`benchmarks/independent/plane-increment-2.json`). - Population v4 (11 cases: 4 PHP, 4 TypeScript, 3 Python) was frozen on 2026-11-23 and is unscanned, with no - protocol and no result yet. + Population v4 (11 cases: 4 PHP, 4 TypeScript, 3 Python) was frozen on 2026-11-23 and is unscanned; + `protocol-v4.md` is committed and no result exists yet. - **Providers.** DeepSeek for LLM calls, OpenRouter only for OpenAI embeddings; keys in `.env`, which never overrides an exported shell variable. diff --git a/.kiro/steering/roadmap.md b/.kiro/steering/roadmap.md index b93bb833..8e22ec1b 100644 --- a/.kiro/steering/roadmap.md +++ b/.kiro/steering/roadmap.md @@ -403,8 +403,8 @@ engine pins on kube-ax, model calls on the VM or CI), sized by what G1-G3 kept. G5. Qualification and rollout: adopt, commit `prediction-v3.json`, spend population v3 once, advisory rollout, BLOCK only for families that passed. -Population v4 (11 cases, frozen 2026-11-23) is the untouched population held for M4: it is not scanned and has -no protocol yet. +Population v4 (11 cases, frozen 2026-11-23) is the untouched population held for M4: it is not scanned; +`protocol-v4.md` is committed and its one run follows the candidate frozen at M3. ### Cross-cutting rules @@ -432,7 +432,8 @@ The milestone table below dates from 2026-09-14. Since then (`.kiro/specs/pre-pu M1a and M1b are met, M2 is measured NO-GO, and M3 is next, with M4 population preparation in parallel; none of M1-M5 is verified and rollout remains NO-GO. Populations v1 and v2 were evaluated and failed every M4 gate (`benchmarks/independent/results-v1.json`, `results-v2.json`); v3 (PHP) is frozen for the one-time final check. -Population v4 (11 cases) was frozen on 2026-11-23 and is unscanned, with no protocol and no result yet. +Population v4 (11 cases) was frozen on 2026-11-23 and is unscanned; `protocol-v4.md` is committed and no +result exists yet. Work since then moved to: the ax plane as the only agentic executor (`ai-service-plane`, HarnessX retired 2026-09-30 by `harnessx-removal`), and the learned decision engine (`learned-decision-engine`, task 6 in diff --git a/README.md b/README.md index 95f8f688..fdf89748 100644 --- a/README.md +++ b/README.md @@ -301,7 +301,8 @@ The design and evaluation slices are in [docs/decision-engine.md](docs/decision- 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, with no protocol and no result yet. +(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 diff --git a/docs/evaluation.md b/docs/evaluation.md index 3d8d0da9..a48a624a 100644 --- a/docs/evaluation.md +++ b/docs/evaluation.md @@ -60,13 +60,13 @@ A population is a set of real repositories. Its lifecycle has three steps: | v2 (17 cases) | spent | engine: recall 0/17, 3 benign alerts, completion 13,206 of 108,374. Tool hunter: recall 1/17, precision 2/14, 1 fixed-side and 16 benign alerts, $8.88. No M4 gate met by either. | `results-v2.json`, `results-v2-hunter.json` | | v2, model-driven pipeline | exploratory (v2 already spent) | stopped after 7 of 17 cases when the account emptied: recall 4/7; precision not adjudicated; no gate measurable | `results-v2-model-pipeline.json` | | v3 (PHP, 15 cases; one SSRF slot left empty by the selection rule) | frozen, untouched | none: it is the one-time final check, run once under `protocol-v3.md` after a prediction is committed | `population-v3-php.toml`, `freeze-v3-php.json` | -| v4 (11 cases: 4 PHP with JavaScript, 4 TypeScript, 3 Python) | frozen 2026-11-23, unscanned | none: it has not been scanned, and no protocol is written for it yet | `population-v4.toml`, `freeze-v4.json` | +| v4 (11 cases: 4 PHP with JavaScript, 4 TypeScript, 3 Python) | frozen 2026-11-23, unscanned | none: it has not been scanned; its one run follows `protocol-v4.md`, after the candidate is frozen at M3 | `population-v4.toml`, `freeze-v4.json`, `protocol-v4.md` | v3 is reserved. Development and analysis work never reads its cases. `tests/test_independent_population.py` fails when anything in the development tree names one of its repositories. That covers a recipe, catalog, manifest or measurement. -The same guard covers population v4, frozen on 2026-11-23 and not scanned. No protocol is -written for it yet. +The same guard covers population v4, frozen on 2026-11-23 and not scanned. Its run follows +`protocol-v4.md`, committed before any scan. ```mermaid stateDiagram-v2 diff --git a/docs/where-we-stand.md b/docs/where-we-stand.md index abda91ee..e6edea3a 100644 --- a/docs/where-we-stand.md +++ b/docs/where-we-stand.md @@ -89,7 +89,8 @@ What has not been touched: population v3, 15 PHP cases, frozen as the one-time f - It runs once, after a prediction is committed. Population v4 is unscanned as well: 11 cases (4 PHP with JavaScript, 4 TypeScript, 3 Python), -frozen on 2026-11-23, with no protocol and no result yet. The same test guards its repositories. +frozen on 2026-11-23, with `protocol-v4.md` committed and no result yet. The same test guards its +repositories. ## 2. Our approach to detection, step by step @@ -328,8 +329,8 @@ Measurement debt. label on unseen code (`2026-10-02-decision-engine-harvest-advisory/record.json`). - Population v3 waits for `benchmarks/independent/prediction-v3.json`, which does not exist. It is written only after a program is adopted. -- Population v4 (11 cases, frozen 2026-11-23) is unscanned. No protocol is written for it, so no - result exists. +- Population v4 (11 cases, frozen 2026-11-23) is unscanned. `protocol-v4.md` is committed; the + population runs once after the candidate is frozen at M3, so no result exists. Infrastructure.