Skip to content

fix: add supports for parsing custom compliance messages#4

Merged
gusfcarvalho merged 3 commits into
mainfrom
gc-fix-improve-remarks
Apr 28, 2026
Merged

fix: add supports for parsing custom compliance messages#4
gusfcarvalho merged 3 commits into
mainfrom
gc-fix-improve-remarks

Conversation

@gusfcarvalho
Copy link
Copy Markdown
Contributor

fix: adds better remarks and descriptions

fix: adds better remarks and descriptions
Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
Copilot AI review requested due to automatic review settings April 28, 2026 12:10
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 remarks and overall remarks aggregation, including execution exit code and better error-detail selection.
  • Add support for raw_policy.non_compliance_message and append it to the generated description when non-compliant.
  • Expand rego tests to cover new message formatting and additional execution-error/stderr scenarios; 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.

Comment thread policies/cloud_custodian_resources_detected.rego
Comment thread README.md Outdated
Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment thread policies/cloud_custodian_resources_detected.rego Outdated
Comment thread policies/cloud_custodian_resources_detected.rego
Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

@gusfcarvalho gusfcarvalho merged commit 2cd6f51 into main Apr 28, 2026
6 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