diff --git a/.kiro/specs/authorization-obligations/design.md b/.kiro/specs/authorization-obligations/design.md index 3482bf1..492e6ac 100644 --- a/.kiro/specs/authorization-obligations/design.md +++ b/.kiro/specs/authorization-obligations/design.md @@ -131,7 +131,7 @@ src/openultrasast/ │ ├── policy.py # DeclaredPolicy schema + load_declared_policy(path) (closed; rejects unknown fields); version hash │ ├── dominance.py # Dominance protocol; OrderDominance default (decorators, router middleware, statement order, hop order) │ └── check.py # check_obligations(...) -> ObligationResult(findings, discharges, sibling_sets, degradations); findings_to_static -├── data/facts/obligations.toml # closed operation/discharger facts per language (python, javascript, typescript) +├── ruleset/obligations/{python,javascript,typescript}.toml # closed operation/discharger facts, beside (not inside) the flow facts dir that load_facts globs ├── cli.py # MAP: obligation check after variant search; manifest `obligations`; `mechanisms export` also writes obligation shapes ├── config.py # [obligations] enabled=true, min_siblings=3, policy_path=".openultrasast/obligations.toml" ├── reports.py # obligation lines in markdown, `obligation_*` SARIF properties @@ -358,7 +358,7 @@ class ObligationResult: degradations: tuple[dict[str, object], ...] def check_obligations(*, irs, entries, facts, flow_facts, policy, paths, dominance, store_shapes, min_siblings) -> ObligationResult: ... -def findings_to_static(result) -> list[StaticFinding]: ... # id "obligation:::", evidence suspicion, tags +def findings_to_static(result) -> list[StaticFinding]: ... # id "obligation::::", evidence suspicion, tags ``` Rules: reached = a `PathRecord` ends at the operation, or (no paths) the operation's function is an entry point; label precedence declared > consistency > function_local; a declared public route suppresses `path_guard` obligations for that route; an operation with a matching store shape gains `known_fix`; a discharge that binds `request_input` where `authenticated_context` is required is reported with `provenance = "request_input"`. @@ -369,7 +369,7 @@ When a hunter client is available (the same resolution as `pairs --hunter`), the ### Reports, manifest, rank -Markdown per finding: `- Obligation: on `, `- Missing discharger: ()`, `- Evidence: