fix: add supports for parsing custom compliance messages#4
Conversation
fix: adds better remarks and descriptions Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
There was a problem hiding this comment.
Pull request overview
Updates the Cloud Custodian “resources detected” policy bundle to produce richer, more user-friendly remarks/descriptions and to support propagating a custom non-compliance message from the plugin payload into the evidence description.
Changes:
- Enhance violation
remarksand overallremarksaggregation, including execution exit code and better error-detail selection. - Add support for
raw_policy.non_compliance_messageand append it to the generateddescriptionwhen non-compliant. - Expand rego tests to cover new message formatting and additional execution-error/
stderrscenarios; document the new payload field in README.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| policies/cloud_custodian_resources_detected.rego | Adds parsing of raw_policy fields and refactors how remarks/description are composed, including execution error detail selection. |
| policies/cloud_custodian_resources_detected_test.rego | Updates expectations for new remark/description formats and adds coverage for stderr/error-detail fallback behavior. |
| README.md | Documents the plugin-only non_compliance_message field and how it affects evidence output. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fix: adds better remarks and descriptions