feat(policies): pass structured findings to the matches_evaluation rule
Merged
JA
8h ago+158+158+012345678901234567890123456789-14-14-01234567890123456789
Summary
The matches_evaluation rule of a policy auto-match file now gets the structured findings of the evaluation in input.findings, next to the violation messages in input.violations. A rule can then judge each violation by the severity or the score of its finding, instead of parsing the message text.
MatchesEvaluationof the policy engine interface takes the findings as a new argument.- The rego engine puts them in
input.findings. A nil list becomes an empty list, notnull. - The WASM engine ignores the argument, as it ignores the violations today.
A rule that reads only input.violations keeps working.
This change was made with the assistance of Claude Code.
Refs PFM-7751