feat(policies): lenient structured finding validation at runtime#2967
Open
migmartri wants to merge 1 commit intochainloop-dev:mainfrom
Open
feat(policies): lenient structured finding validation at runtime#2967migmartri wants to merge 1 commit intochainloop-dev:mainfrom
migmartri wants to merge 1 commit intochainloop-dev:mainfrom
Conversation
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>
c66211c to
aeccc43
Compare
jiparis
approved these changes
Mar 31, 2026
Member
jiparis
left a comment
There was a problem hiding this comment.
Approving, but it's not clear to me what's the use case for those warnings. Are they shown or included in the attestation somehow?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
WithLenientFindingValidation()option toPolicyVerifierthat makes structured finding validation errors non-fatal at runtimeFindingDegraded=trueand a warning instead of failing the entire evaluationpolicy develop evalkeeps strict validation for fast feedback during policy authoringfinding_degradedboolean field to theViolationproto message so downstream consumers can distinguish intentionally unstructured violations from degraded ones