Skip to content

Conversation

jiparis
Copy link
Member

@jiparis jiparis commented May 2, 2025

This PR fixes the case when a required argument gets an interpolated value, and the interpolation variables are not passed. In this case, if it renders to an empty string, should be still considered missing, thus failing the validation.

This one should fail if foo value is not provided and policyfoo is required by the policy.

apiVersion: workflowcontract.chainloop.dev/v1
kind: PolicyGroup
metadata:
  name: my-group
spec:
  inputs:
    - name: foo
policies:
  attestation:
    - ref: my-policy
      with: 
        policyfoo: "{{ inputs.foo }}"

Fixes #2012

Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
@jiparis jiparis requested review from migmartri and javirln May 2, 2025 12:29
@jiparis jiparis changed the title fix(policies): fail on required arguments that are empty after rendering bindings fix(policies): fail on required arguments that are empty after applying interpolations May 2, 2025
@jiparis jiparis merged commit 5c02958 into chainloop-dev:main May 2, 2025
13 checks passed
@jiparis jiparis deleted the 2012 branch May 2, 2025 13:54
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.

bug: required policy arguments are bypassed when used with input bindings
2 participants