mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-16 03:49:26 +00:00
feat(prover): access-control prover, delivery A: path records, Stapler and Jetty entries, Java operation rows, the prover and its scoring arm
Codex delivery under spec access-control-prover. `semantic/obligations/paths.py` builds entry-to-function path records from the cached caller index; `mapping.py` names Stapler web methods and Jetty handlers as entries; `check_obligations` gains the opt-in premise `assume_entries_protected` with the label `unguarded_path`; `hunt/prover.py` proves a change with no model call and states its coverage; `benchmarks/valid/prover_arm.py` scores it with the valid-benchmark metrics. Two fixes after the first smoke run: a product file git holds empty is read, not unread (four changes failed on `__init__.py` and empty assets), and absent-input reasons are counted by name. Smoke on the 23 fix changes of the training pool: 7 pushes caught (30 percent, Wilson 16 to 51), 28 of 93 locations, precision 7 of 8 flagged, no instrument failure; three changes over the 120 second bound. Twelve of the 17 Jenkins fixes reach the fixed method but check no operation because the method is the operation; the spec now carries handler-named operations for delivery B. Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
e514551cb6
commit
beb272a5ec
@@ -30,8 +30,9 @@ runner that scores it with the valid-benchmark metrics.
|
||||
- Operation and discharger rows added to `ruleset/obligations/{java,php,python,typescript}.toml`.
|
||||
|
||||
### Out of Boundary
|
||||
- The facts loader and schema, `OrderDominance`, and the checker's existing decision rules (owned by
|
||||
`authorization-obligations`). One opt-in extension of the checker is allowed and owned here: the
|
||||
- The facts loader's existing fields, `OrderDominance`, and the checker's existing decision rules (owned by
|
||||
`authorization-obligations`). Two extensions are allowed and owned here: the handler-named operation fields
|
||||
(`handlers`, `framework`) in the facts, and the
|
||||
`assume_entries_protected` keyword and the `unguarded_path` label (see the checker block below); default off,
|
||||
every existing checker test unchanged.
|
||||
- The feature table, the DSPy and hunter arms, the ablation (`hunter-learning-loop`).
|
||||
@@ -185,6 +186,16 @@ access is not `public` and the route is not declared public; evidence carries th
|
||||
strings and the sentence "no declared policy clause and no sibling norm; the prover assumes a recognised entry is
|
||||
protected". `findings_to_static` explains the label like the others. `LABELS` gains the value.
|
||||
|
||||
### facts extension: handler-named operations (owned here, schema change)
|
||||
`[[operation]]` rows gain two optional fields: `handlers` (a list of regular expressions over the function name)
|
||||
and `framework` (a recogniser id the mapper's evidence names: `stapler`, `tornado`, `remix`, `jetty`,
|
||||
`symfony`, `laravel`). A row with `handlers` and no `calls` is a handler-named operation: `find_operations`
|
||||
yields it at the function's declaration line for every function whose name matches and that the caller lists as
|
||||
a recognised entry of that framework (new keyword `handlers_of: Mapping[str, str] | None`, function name to
|
||||
framework id; default None keeps today's behaviour). The smoke run of delivery A showed why: 15 of the 17
|
||||
Jenkins fixes are form-validation and list-filling web methods whose body calls no listed operation; the
|
||||
method is the operation. Jenkins documents the rule (form validation methods must check a permission).
|
||||
|
||||
### obligations.enforcement
|
||||
```python
|
||||
def witnesses(*, root: Path, texts: Mapping[str, str], entries: Sequence[EntryPointRecord], language: str) -> list[Discharge]
|
||||
|
||||
Reference in New Issue
Block a user