Skip to content

Conversation

@nissessenap
Copy link

This enables users to only trigger to specific resources. For more info see: https://docs.sigstore.dev/policy-controller/overview/#policies-matching-specific-resource-types-and-labels

You could argue that we should add the same for github-exempt-policy, but since it exempt, it's probably easier to just skip it.

@nissessenap nissessenap requested a review from steiza as a code owner December 16, 2025 10:15
Copilot AI review requested due to automatic review settings December 16, 2025 10:15
@nissessenap nissessenap requested a review from a team as a code owner December 16, 2025 10:15
@nissessenap
Copy link
Author

There is some auto formatting stuff done in the value file, if you think that is an issue I can revert it

Copy link

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

This PR adds support for the match field in ClusterImagePolicy resources, enabling users to specify additional matching criteria to target specific Kubernetes resource types and labels. This enhancement allows for more granular control over which resources the image verification policy applies to, as documented in the Sigstore policy-controller documentation.

Key changes:

  • Added match field configuration to values.yaml with commented examples showing how to match specific resources like jobs and pods
  • Updated the github-policy template to conditionally include the match field when configured
  • Standardized quote style from single to double quotes for string values in values.yaml

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
charts/trust-policies/values.yaml Adds match field configuration with commented examples for resource matching; standardizes string quotes to double quotes
charts/trust-policies/templates/clusterimagepolicy-github.yaml Adds conditional template logic to include the match field in the ClusterImagePolicy spec when configured

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

1 participant