Skip to main content

Module eval

Module eval 

Source
Expand description

Rule + pack evaluator.

Direct port of the Python reference: _get_dotpath, _match_action, _eval_rego_subset, _eval_rego_allowlist, _eval_jsonlogic, evaluate_rule, evaluate_packs.

Semantics are documented in policy-pack-format.md section “Evaluation semantics”: any DENY wins, else WARN, else ALLOW.

Structs§

DecisionResult
Aggregate result returned by evaluate_packs.

Enums§

Decision

Functions§

eval_jsonlogic
Minimal JSONLogic — supports the SINGLE pattern shipped in rate-limit.json:
eval_rego_allowlist
Rego allowlist pattern (used by tool-allowlist.json).
eval_rego_subset
Minimal Rego subset — supports the SINGLE pattern shipped in the example PII pack:
evaluate_packs
Run an action through every loaded pack in pack-load order.
evaluate_rule
Evaluate a single rule. Returns (decision, deny_reason).
get_dotpath
Walk a dot-path through nested JSON objects.
match_action
Does the rule’s match.action cover the inbound action?