Skip to content

fix(policies): graceful fallback for structured finding violations#2960

Merged
migmartri merged 1 commit intochainloop-dev:mainfrom
migmartri:fix/structured-findings-fallback
Mar 30, 2026
Merged

fix(policies): graceful fallback for structured finding violations#2960
migmartri merged 1 commit intochainloop-dev:mainfrom
migmartri:fix/structured-findings-fallback

Conversation

@migmartri
Copy link
Copy Markdown
Member

Summary

  • When a policy declares finding_type but some evaluation branches return plain-string violations, fall back to treating them as regular string violations instead of failing the entire policy evaluation
  • Structured violations from other branches in the same policy are still validated and populated normally
  • A deduplicated warning is emitted to signal that some violations lack structured finding data

When a policy declares finding_type but some evaluation branches return
plain-string violations, fall back to treating them as regular string
violations instead of failing the entire policy evaluation. Structured
violations from other branches are still validated normally.

Signed-off-by: Miguel Martinez <miguel@chainloop.dev>
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

@migmartri migmartri merged commit a2db2c3 into chainloop-dev:main Mar 30, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants