mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-19 04:59:28 +00:00
feat(authorization-obligations): harvest mode handler_context and the obligation label
Task 4.1. A new excerpt mode keeps the labeled handler with its decorators and every statement outside it that registers the handler by name, so guards living in decorators, routers and middleware travel with the pair. Comment and string mentions never count. The closed mechanism vocabulary gains the three obligation ids, catalog rows accept an additive obligation field validated against the closed operation kinds, and the pair scorer counts a finding tagged with that obligation inside the labeled function as a detection. Rows without the label run the same code as before. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01T7XD7x5KonMdmGRkp63EQG
This commit is contained in:
co-authored by
Claude Opus 5
parent
4bd59555ae
commit
e219dd553d
@@ -97,8 +97,9 @@ when a hunter model is configured. The improve loop rejects a change that
|
||||
regresses any profile on the holdout split.
|
||||
|
||||
Harvest for every slice goes through `benchmarks/pairs/harvest.py --slice <name>`
|
||||
(modes `name`, `line_range`, `hunk`, `enclosing`; comment and string mentions
|
||||
never anchor) and `benchmarks/pairs/catalog_gen.py --slice <name>` regenerates
|
||||
(modes `name`, `line_range`, `hunk`, `enclosing`, `handler_context`; comment
|
||||
and string mentions never anchor; `handler_context` keeps the labeled handler
|
||||
with its decorators and the statements that register it) and `benchmarks/pairs/catalog_gen.py --slice <name>` regenerates
|
||||
the catalog from `recipes.toml`. Maintainer only; CI never fetches.
|
||||
|
||||
## Commands
|
||||
|
||||
Reference in New Issue
Block a user