Skip to content

bug: required policy arguments are bypassed when used with input bindings #2012

@jiparis

Description

@jiparis

In the context of for example a policy group:

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

In this example, if policyfoo argument is required, validation won't take into account that it might have input bindings on it. This will cause a false positive if the group is instantiated without that parameter

# my contract
policyGroups:
  - ref: my-group

The above example contract won't fail, even if policyfoo is mandatory and it doesn't have any value

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions