feat(policies): pass structured findings to the matches_evaluation rule

Merged
JA
8h ago
+158-14

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.

  • MatchesEvaluation of 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, not null.
  • 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