You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Enrich compliance findings: support additional levels, custom fields, and custom messages (esp. for OPA) #341
Currently, the compliance findings returned to the frontend are constrained by hardcoded logic in CBOMKit’s Java layer. External policy engines such as OPA can influence only a predefined set of inputs, while the resulting compliance level and message are determined entirely by the Java implementation. This significantly limits the flexibility and expressiveness of custom policies.
I propose extending the findings model to support:
Additional compliance levels
Allow compliance levels beyond the currently defined IDs 1–4. For example, policies could introduce levels such as 5: Not Relevant or 5: Acceptable.
CBOMKit could continue to define and support levels 1–4 by default while allowing additional levels to be introduced by external policies.
Custom fields
Allow policies executed by OPA to attach arbitrary key-value metadata to a finding. These fields should be preserved and returned through the API so that the frontend or other consumers can use them.
Custom messages
Allow policies to provide their own finding messages, either replacing or supplementing the message generated by CBOMKit.
This capability may partially overlap with the proposed custom key-value fields, but it is worth considering because it would provide policies with direct control over the human-readable explanation presented to users.
Would you be open to a proposal like this? Would you need any support from my side?
Thanks!
Activity