mitre / hipcheck

Automatically assess and score software repositories for supply chain risk.
https://mitre.github.io/hipcheck/
Apache License 2.0
74 stars 5 forks source link

JSON Pointers as `policy_expr` enum variants #371

Open j-lanson opened 2 months ago

j-lanson commented 2 months ago

Currently, if a policy_expr has a JSON pointer (most all of them do), we can't parse the expression into the structured Expr type until the analysis completes and we have the value to insert at said pointer. This means we can't ensure that the policy expression strings from a policy file are syntactically valid until the analysis steps are already complete.

Update the Expr type to support a variant marking JSON pointers, and change code that currently holds policy expressions as strings to Exprs.

j-lanson commented 1 month ago