Commit c66211c
committed
feat(policies): lenient structured finding validation at runtime
Make structured finding validation errors non-fatal during attestation
crafting while keeping strict validation in policy development mode.
When a policy returns malformed structured data at runtime, the violation
is preserved as a plain string with FindingDegraded=true and a warning,
instead of failing the entire evaluation.
Add WithLenientFindingValidation() option to PolicyVerifier using the
existing functional options pattern. The CLI policydevel path keeps strict
validation (default) for fast feedback during policy authoring.
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>1 parent 1041f32 commit c66211c
8 files changed
Lines changed: 246 additions & 60 deletions
File tree
- app/controlplane/api/gen
- frontend/attestation/v1
- jsonschema
- pkg
- attestation/crafter
- api/attestation/v1
- policies
Lines changed: 32 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 20 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
287 | 294 | | |
288 | 295 | | |
289 | 296 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
706 | 706 | | |
707 | 707 | | |
708 | 708 | | |
| 709 | + | |
709 | 710 | | |
710 | 711 | | |
711 | 712 | | |
| |||
723 | 724 | | |
724 | 725 | | |
725 | 726 | | |
| 727 | + | |
726 | 728 | | |
727 | 729 | | |
728 | 730 | | |
| |||
758 | 760 | | |
759 | 761 | | |
760 | 762 | | |
| 763 | + | |
761 | 764 | | |
762 | 765 | | |
763 | 766 | | |
| |||
768 | 771 | | |
769 | 772 | | |
770 | 773 | | |
| 774 | + | |
771 | 775 | | |
772 | 776 | | |
773 | 777 | | |
| |||
0 commit comments