list_rules() returns a compact inventory of a policy's rule set. It is
intended for audits, examples, tests, and pre-deployment reviews.
Details
The has_pattern and has_fn columns identify whether each rule is regex
based or function based. Regex rules can produce redaction spans directly.
Function rules may produce findings without spans unless the function
returns span metadata.
Examples
list_rules(policy("custom"))
#> [1] id owasp severity action has_pattern has_fn
#> <0 rows> (or 0-length row.names)
