diff --git a/app/cli/internal/policydevel/templates/example-policy.yaml b/app/cli/internal/policydevel/templates/example-policy.yaml index cfa871f86..249f8fade 100644 --- a/app/cli/internal/policydevel/templates/example-policy.yaml +++ b/app/cli/internal/policydevel/templates/example-policy.yaml @@ -2,7 +2,7 @@ # # For policy examples and reference: # https://github.com/chainloop-dev/chainloop/tree/main/docs/examples/policies -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: {{.Name | sanitize}} diff --git a/app/cli/internal/policydevel/testdata/embedded-policy.yaml b/app/cli/internal/policydevel/testdata/embedded-policy.yaml index 1c4602347..aba4f2204 100644 --- a/app/cli/internal/policydevel/testdata/embedded-policy.yaml +++ b/app/cli/internal/policydevel/testdata/embedded-policy.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: test-policy diff --git a/app/cli/internal/policydevel/testdata/policy-test.yaml b/app/cli/internal/policydevel/testdata/policy-test.yaml index 97c1ab3de..40836a58f 100644 --- a/app/cli/internal/policydevel/testdata/policy-test.yaml +++ b/app/cli/internal/policydevel/testdata/policy-test.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: policy-test diff --git a/app/cli/internal/policydevel/testdata/policy.yaml b/app/cli/internal/policydevel/testdata/policy.yaml index 7c3e9a983..54db89d65 100644 --- a/app/cli/internal/policydevel/testdata/policy.yaml +++ b/app/cli/internal/policydevel/testdata/policy.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: test-policy diff --git a/app/cli/internal/policydevel/testdata/sbom-metadata-component-policy.yaml b/app/cli/internal/policydevel/testdata/sbom-metadata-component-policy.yaml index a5bf81c18..49fbb2497 100644 --- a/app/cli/internal/policydevel/testdata/sbom-metadata-component-policy.yaml +++ b/app/cli/internal/policydevel/testdata/sbom-metadata-component-policy.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: sbom-metadata-component diff --git a/app/cli/internal/policydevel/testdata/sbom-min-components-policy.yaml b/app/cli/internal/policydevel/testdata/sbom-min-components-policy.yaml index be3772436..b4addabfd 100644 --- a/app/cli/internal/policydevel/testdata/sbom-min-components-policy.yaml +++ b/app/cli/internal/policydevel/testdata/sbom-min-components-policy.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: sbom-min-components diff --git a/app/cli/internal/policydevel/testdata/sbom-multiple-checks-policy.yaml b/app/cli/internal/policydevel/testdata/sbom-multiple-checks-policy.yaml index fb6cbceb1..12e100e3a 100644 --- a/app/cli/internal/policydevel/testdata/sbom-multiple-checks-policy.yaml +++ b/app/cli/internal/policydevel/testdata/sbom-multiple-checks-policy.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: sbom-multiple-checks diff --git a/app/cli/internal/policydevel/testdata/sbom-valid-cyclonedx-policy.yaml b/app/cli/internal/policydevel/testdata/sbom-valid-cyclonedx-policy.yaml index 1ad72e028..e4fc871b0 100644 --- a/app/cli/internal/policydevel/testdata/sbom-valid-cyclonedx-policy.yaml +++ b/app/cli/internal/policydevel/testdata/sbom-valid-cyclonedx-policy.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: sbom-valid-cyclonedx diff --git a/app/cli/pkg/action/testdata/policy_group.yaml b/app/cli/pkg/action/testdata/policy_group.yaml index bf5db2697..f70e203eb 100644 --- a/app/cli/pkg/action/testdata/policy_group.yaml +++ b/app/cli/pkg/action/testdata/policy_group.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: PolicyGroup metadata: name: sbom-quality diff --git a/app/cli/pkg/action/testdata/policy_group_no_name.yaml b/app/cli/pkg/action/testdata/policy_group_no_name.yaml index 511cf9838..66bb81e70 100644 --- a/app/cli/pkg/action/testdata/policy_group_no_name.yaml +++ b/app/cli/pkg/action/testdata/policy_group_no_name.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: PolicyGroup metadata: name: sbom-quality diff --git a/app/cli/pkg/action/testdata/policy_group_with_arguments.yaml b/app/cli/pkg/action/testdata/policy_group_with_arguments.yaml index 1c42908c2..e8a59fffd 100644 --- a/app/cli/pkg/action/testdata/policy_group_with_arguments.yaml +++ b/app/cli/pkg/action/testdata/policy_group_with_arguments.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: PolicyGroup metadata: name: sbom-quality diff --git a/app/controlplane/api/gen/jsonschema/workflowcontract.v1.Policy.jsonschema.json b/app/controlplane/api/gen/jsonschema/workflowcontract.v1.Policy.jsonschema.json index 8cf8cc237..3e623eff0 100644 --- a/app/controlplane/api/gen/jsonschema/workflowcontract.v1.Policy.jsonschema.json +++ b/app/controlplane/api/gen/jsonschema/workflowcontract.v1.Policy.jsonschema.json @@ -6,6 +6,7 @@ "patternProperties": { "^(api_version)$": { "enum": [ + "chainloop.dev/v1", "workflowcontract.chainloop.dev/v1" ], "type": "string" @@ -14,6 +15,7 @@ "properties": { "apiVersion": { "enum": [ + "chainloop.dev/v1", "workflowcontract.chainloop.dev/v1" ], "type": "string" diff --git a/app/controlplane/api/gen/jsonschema/workflowcontract.v1.Policy.schema.json b/app/controlplane/api/gen/jsonschema/workflowcontract.v1.Policy.schema.json index 59d2a4e73..50212e85f 100644 --- a/app/controlplane/api/gen/jsonschema/workflowcontract.v1.Policy.schema.json +++ b/app/controlplane/api/gen/jsonschema/workflowcontract.v1.Policy.schema.json @@ -6,6 +6,7 @@ "patternProperties": { "^(apiVersion)$": { "enum": [ + "chainloop.dev/v1", "workflowcontract.chainloop.dev/v1" ], "type": "string" @@ -14,6 +15,7 @@ "properties": { "api_version": { "enum": [ + "chainloop.dev/v1", "workflowcontract.chainloop.dev/v1" ], "type": "string" diff --git a/app/controlplane/api/gen/jsonschema/workflowcontract.v1.PolicyGroup.jsonschema.json b/app/controlplane/api/gen/jsonschema/workflowcontract.v1.PolicyGroup.jsonschema.json index 2b59c3b63..83d4e9212 100644 --- a/app/controlplane/api/gen/jsonschema/workflowcontract.v1.PolicyGroup.jsonschema.json +++ b/app/controlplane/api/gen/jsonschema/workflowcontract.v1.PolicyGroup.jsonschema.json @@ -6,6 +6,7 @@ "patternProperties": { "^(api_version)$": { "enum": [ + "chainloop.dev/v1", "workflowcontract.chainloop.dev/v1" ], "type": "string" @@ -14,6 +15,7 @@ "properties": { "apiVersion": { "enum": [ + "chainloop.dev/v1", "workflowcontract.chainloop.dev/v1" ], "type": "string" diff --git a/app/controlplane/api/gen/jsonschema/workflowcontract.v1.PolicyGroup.schema.json b/app/controlplane/api/gen/jsonschema/workflowcontract.v1.PolicyGroup.schema.json index f80f23dd2..cd6feeafd 100644 --- a/app/controlplane/api/gen/jsonschema/workflowcontract.v1.PolicyGroup.schema.json +++ b/app/controlplane/api/gen/jsonschema/workflowcontract.v1.PolicyGroup.schema.json @@ -6,6 +6,7 @@ "patternProperties": { "^(apiVersion)$": { "enum": [ + "chainloop.dev/v1", "workflowcontract.chainloop.dev/v1" ], "type": "string" @@ -14,6 +15,7 @@ "properties": { "api_version": { "enum": [ + "chainloop.dev/v1", "workflowcontract.chainloop.dev/v1" ], "type": "string" diff --git a/app/controlplane/api/workflowcontract/v1/crafting_schema.pb.go b/app/controlplane/api/workflowcontract/v1/crafting_schema.pb.go index ccadb1565..21d9dc212 100644 --- a/app/controlplane/api/workflowcontract/v1/crafting_schema.pb.go +++ b/app/controlplane/api/workflowcontract/v1/crafting_schema.pb.go @@ -2010,10 +2010,9 @@ const file_workflowcontract_v1_crafting_schema_proto_rawDesc = "" + "\x10MaterialSelector\x12\x12\n" + "\x04name\x18\x01 \x01(\tR\x04nameB\x0f\n" + "\x06policy\x12\x05\xbaH\x02\b\x01B\a\n" + - "\x05_gate\"\xf6\x01\n" + - "\x06Policy\x12I\n" + - "\vapi_version\x18\x01 \x01(\tB(\xbaH%r#\n" + - "!workflowcontract.chainloop.dev/v1R\n" + + "\x05_gate\"\x88\x02\n" + + "\x06Policy\x12[\n" + + "\vapi_version\x18\x01 \x01(\tB:\xbaH7r5R\x10chainloop.dev/v1R!workflowcontract.chainloop.dev/v1R\n" + "apiVersion\x12!\n" + "\x04kind\x18\x02 \x01(\tB\r\xbaH\n" + "r\b\n" + @@ -2066,10 +2065,9 @@ const file_workflowcontract_v1_crafting_schema_proto_rawDesc = "" + "\x04skip\x18\x03 \x03(\tR\x04skip\x1a7\n" + "\tWithEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xb5\a\n" + - "\vPolicyGroup\x12I\n" + - "\vapi_version\x18\x01 \x01(\tB(\xbaH%r#\n" + - "!workflowcontract.chainloop.dev/v1R\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xc7\a\n" + + "\vPolicyGroup\x12[\n" + + "\vapi_version\x18\x01 \x01(\tB:\xbaH7r5R\x10chainloop.dev/v1R!workflowcontract.chainloop.dev/v1R\n" + "apiVersion\x12&\n" + "\x04kind\x18\x02 \x01(\tB\x12\xbaH\x0fr\r\n" + "\vPolicyGroupR\x04kind\x12A\n" + diff --git a/app/controlplane/api/workflowcontract/v1/crafting_schema.proto b/app/controlplane/api/workflowcontract/v1/crafting_schema.proto index 5f0f4563d..707a697b0 100644 --- a/app/controlplane/api/workflowcontract/v1/crafting_schema.proto +++ b/app/controlplane/api/workflowcontract/v1/crafting_schema.proto @@ -252,7 +252,12 @@ message PolicyAttachment { // Represents a policy to be applied to a material or attestation message Policy { - string api_version = 1 [(buf.validate.field).string.const = "workflowcontract.chainloop.dev/v1"]; + string api_version = 1 [(buf.validate.field).string = { + in: [ + "chainloop.dev/v1", + "workflowcontract.chainloop.dev/v1" + ] + }]; string kind = 2 [(buf.validate.field).string.const = "Policy"]; Metadata metadata = 3 [(buf.validate.field).required = true]; @@ -388,7 +393,12 @@ message PolicyGroupAttachment { // Represents a group or policies message PolicyGroup { - string api_version = 1 [(buf.validate.field).string.const = "workflowcontract.chainloop.dev/v1"]; + string api_version = 1 [(buf.validate.field).string = { + in: [ + "chainloop.dev/v1", + "workflowcontract.chainloop.dev/v1" + ] + }]; string kind = 2 [(buf.validate.field).string.const = "PolicyGroup"]; Metadata metadata = 3 [(buf.validate.field).required = true]; diff --git a/app/controlplane/api/workflowcontract/v1/policy_test.go b/app/controlplane/api/workflowcontract/v1/policy_test.go index 451bc0cee..c98cabad2 100644 --- a/app/controlplane/api/workflowcontract/v1/policy_test.go +++ b/app/controlplane/api/workflowcontract/v1/policy_test.go @@ -1,5 +1,5 @@ // -// Copyright 2023 The Chainloop Authors. +// Copyright 2023-2026 The Chainloop Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -13,8 +13,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// limitations under the License. - package v1_test import ( @@ -77,11 +75,17 @@ func TestValidatePolicy(t *testing.T) { violation: "spec source or policies", }, { - desc: "correct spec", + desc: "correct spec with legacy api version", policy: &v1.Policy{ApiVersion: "workflowcontract.chainloop.dev/v1", Kind: "Policy", Metadata: &v1.Metadata{Name: "my-policy"}, Spec: &v1.PolicySpec{Source: &v1.PolicySpec_Path{Path: "policy.rego"}}}, wantErr: false, }, + { + desc: "correct spec with new api version", + policy: &v1.Policy{ApiVersion: "chainloop.dev/v1", Kind: "Policy", + Metadata: &v1.Metadata{Name: "my-policy"}, Spec: &v1.PolicySpec{Source: &v1.PolicySpec_Path{Path: "policy.rego"}}}, + wantErr: false, + }, { desc: "filter material type", policy: &v1.Policy{ApiVersion: "workflowcontract.chainloop.dev/v1", Kind: "Policy", @@ -116,3 +120,72 @@ func TestValidatePolicy(t *testing.T) { }) } } + +func TestValidatePolicyGroup(t *testing.T) { + testCases := []struct { + desc string + group *v1.PolicyGroup + wantErr bool + violation string + }{ + { + desc: "empty policy group", + group: &v1.PolicyGroup{}, + wantErr: true, + violation: "api_version", + }, + { + desc: "wrong api version", + group: &v1.PolicyGroup{ApiVersion: "wrong", Kind: "PolicyGroup"}, + wantErr: true, + violation: "api_version", + }, + { + desc: "legacy api version accepted", + group: &v1.PolicyGroup{ApiVersion: "workflowcontract.chainloop.dev/v1", Kind: "PolicyGroup", Metadata: &v1.Metadata{Name: "my-group"}, Spec: &v1.PolicyGroup_PolicyGroupSpec{Policies: &v1.PolicyGroup_PolicyGroupPolicies{}}}, + wantErr: false, + }, + { + desc: "new api version accepted", + group: &v1.PolicyGroup{ApiVersion: "chainloop.dev/v1", Kind: "PolicyGroup", Metadata: &v1.Metadata{Name: "my-group"}, Spec: &v1.PolicyGroup_PolicyGroupSpec{Policies: &v1.PolicyGroup_PolicyGroupPolicies{}}}, + wantErr: false, + }, + { + desc: "wrong kind", + group: &v1.PolicyGroup{ApiVersion: "chainloop.dev/v1", Kind: "wrong"}, + wantErr: true, + violation: "kind", + }, + { + desc: "missing metadata", + group: &v1.PolicyGroup{ApiVersion: "chainloop.dev/v1", Kind: "PolicyGroup"}, + wantErr: true, + violation: "metadata", + }, + { + desc: "missing spec", + group: &v1.PolicyGroup{ApiVersion: "chainloop.dev/v1", Kind: "PolicyGroup", Metadata: &v1.Metadata{Name: "my-group"}}, + wantErr: true, + violation: "spec", + }, + } + + validator, err := protovalidate.New() + require.NoError(t, err) + + for _, tc := range testCases { + t.Run(tc.desc, func(t *testing.T) { + err := validator.Validate(tc.group) + if tc.wantErr { + assert.Error(t, err) + + if tc.violation != "" { + assert.Contains(t, err.Error(), tc.violation) + } + return + } + + assert.NoError(t, err) + }) + } +} diff --git a/app/controlplane/pkg/biz/testdata/policy_group_with_embedded.yaml b/app/controlplane/pkg/biz/testdata/policy_group_with_embedded.yaml index 34d5a40bf..7187c2428 100644 --- a/app/controlplane/pkg/biz/testdata/policy_group_with_embedded.yaml +++ b/app/controlplane/pkg/biz/testdata/policy_group_with_embedded.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: PolicyGroup metadata: name: test-policy-group diff --git a/docs/examples/policies/chainloop-commit.yaml b/docs/examples/policies/chainloop-commit.yaml index f4a35bda4..bdf4c3f54 100644 --- a/docs/examples/policies/chainloop-commit.yaml +++ b/docs/examples/policies/chainloop-commit.yaml @@ -1,4 +1,4 @@ -# Copyright 2024-2025 The Chainloop Authors. +# Copyright 2024-2026 The Chainloop Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: chainloop-commit diff --git a/docs/examples/policies/chainloop-qa.yaml b/docs/examples/policies/chainloop-qa.yaml index 2eba9188b..8c2ca2da6 100644 --- a/docs/examples/policies/chainloop-qa.yaml +++ b/docs/examples/policies/chainloop-qa.yaml @@ -1,4 +1,4 @@ -# Copyright 2024-2025 The Chainloop Authors. +# Copyright 2024-2026 The Chainloop Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ # Checks that there are is a container material with a custom annotation "chainloop-qa-approval=true" # chainloop att push # This can be used as a control gate to allow e.g. a production deployment -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: sarif-errors diff --git a/docs/examples/policies/http-hostname-validation/policy.yaml b/docs/examples/policies/http-hostname-validation/policy.yaml index d21baf1db..d3316456c 100644 --- a/docs/examples/policies/http-hostname-validation/policy.yaml +++ b/docs/examples/policies/http-hostname-validation/policy.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: http-hostname-validation diff --git a/docs/examples/policies/json-field-validator/policy.yaml b/docs/examples/policies/json-field-validator/policy.yaml index e94b428a8..426ac8e7f 100644 --- a/docs/examples/policies/json-field-validator/policy.yaml +++ b/docs/examples/policies/json-field-validator/policy.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: json-field-validator diff --git a/docs/examples/policies/quickstart/cdx-fresh.yaml b/docs/examples/policies/quickstart/cdx-fresh.yaml index 40ef20183..1e8f89e13 100644 --- a/docs/examples/policies/quickstart/cdx-fresh.yaml +++ b/docs/examples/policies/quickstart/cdx-fresh.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: cdx-fresh diff --git a/docs/examples/policies/sarif-errors.yaml b/docs/examples/policies/sarif-errors.yaml index 56f7401bf..7f1417d13 100644 --- a/docs/examples/policies/sarif-errors.yaml +++ b/docs/examples/policies/sarif-errors.yaml @@ -1,4 +1,4 @@ -# Copyright 2024-2025 The Chainloop Authors. +# Copyright 2024-2026 The Chainloop Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ # limitations under the License. # Checks that there are no errors in the SARIF report -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: sarif-errors diff --git a/docs/examples/policies/sbom-freshness/policy.yaml b/docs/examples/policies/sbom-freshness/policy.yaml index 10b3374b5..367ad8c67 100644 --- a/docs/examples/policies/sbom-freshness/policy.yaml +++ b/docs/examples/policies/sbom-freshness/policy.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: sbom-freshness diff --git a/docs/examples/policies/sbom/cyclonedx-banned-licenses.yaml b/docs/examples/policies/sbom/cyclonedx-banned-licenses.yaml index 38ea0d5a4..733d0d215 100644 --- a/docs/examples/policies/sbom/cyclonedx-banned-licenses.yaml +++ b/docs/examples/policies/sbom/cyclonedx-banned-licenses.yaml @@ -1,4 +1,4 @@ -# Copyright 2024 The Chainloop Authors. +# Copyright 2024-2026 The Chainloop Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: cyclonedx-banned-licenses diff --git a/docs/examples/policies/sbom/cyclonedx-banned-packages.yaml b/docs/examples/policies/sbom/cyclonedx-banned-packages.yaml index 23c38f184..9fa4a690a 100644 --- a/docs/examples/policies/sbom/cyclonedx-banned-packages.yaml +++ b/docs/examples/policies/sbom/cyclonedx-banned-packages.yaml @@ -1,4 +1,4 @@ -# Copyright 2024 The Chainloop Authors. +# Copyright 2024-2026 The Chainloop Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: cyclonedx-banned-packages diff --git a/docs/examples/policies/sbom/cyclonedx-freshness.yaml b/docs/examples/policies/sbom/cyclonedx-freshness.yaml index bedba90e7..db8a0e626 100644 --- a/docs/examples/policies/sbom/cyclonedx-freshness.yaml +++ b/docs/examples/policies/sbom/cyclonedx-freshness.yaml @@ -1,4 +1,4 @@ -# Copyright 2024 The Chainloop Authors. +# Copyright 2024-2026 The Chainloop Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: cyclonedx-required-packages diff --git a/docs/examples/policies/sbom/cyclonedx-licenses.yaml b/docs/examples/policies/sbom/cyclonedx-licenses.yaml index e222182b9..609796f67 100644 --- a/docs/examples/policies/sbom/cyclonedx-licenses.yaml +++ b/docs/examples/policies/sbom/cyclonedx-licenses.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: cyclonedx-licenses diff --git a/docs/examples/policies/sbom/cyclonedx-required-packages.yaml b/docs/examples/policies/sbom/cyclonedx-required-packages.yaml index c24bc3c85..14c1b5fb6 100644 --- a/docs/examples/policies/sbom/cyclonedx-required-packages.yaml +++ b/docs/examples/policies/sbom/cyclonedx-required-packages.yaml @@ -1,4 +1,4 @@ -# Copyright 2024 The Chainloop Authors. +# Copyright 2024-2026 The Chainloop Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: cyclonedx-required-packages diff --git a/docs/examples/policies/sbom/sbom-present.yaml b/docs/examples/policies/sbom/sbom-present.yaml index 71b123797..34921c1d9 100644 --- a/docs/examples/policies/sbom/sbom-present.yaml +++ b/docs/examples/policies/sbom/sbom-present.yaml @@ -1,4 +1,4 @@ -# Copyright 2024 The Chainloop Authors. +# Copyright 2024-2026 The Chainloop Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: sbom-present diff --git a/docs/examples/policies/sbom/spdx-sbom-syft.yaml b/docs/examples/policies/sbom/spdx-sbom-syft.yaml index 527715202..f8b0846c0 100644 --- a/docs/examples/policies/sbom/spdx-sbom-syft.yaml +++ b/docs/examples/policies/sbom/spdx-sbom-syft.yaml @@ -1,4 +1,4 @@ -# Copyright 2024 The Chainloop Authors. +# Copyright 2024-2026 The Chainloop Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: made-with-syft diff --git a/docs/examples/policies/trivy-vulns.yaml b/docs/examples/policies/trivy-vulns.yaml index a88baef50..1858f4519 100644 --- a/docs/examples/policies/trivy-vulns.yaml +++ b/docs/examples/policies/trivy-vulns.yaml @@ -1,4 +1,4 @@ -# Copyright 2024 The Chainloop Authors. +# Copyright 2024-2026 The Chainloop Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ # limitations under the License. # Checks that there are no MEDIUM or HIGH vulnerabilities in the CVE report -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: trivy-vulnerabilities diff --git a/labs/wasm-policy-sdk/go/README.md b/labs/wasm-policy-sdk/go/README.md index 804eb4040..3ec834f47 100644 --- a/labs/wasm-policy-sdk/go/README.md +++ b/labs/wasm-policy-sdk/go/README.md @@ -557,7 +557,7 @@ replace github.com/chainloop-dev/chainloop/labs/wasm-policy-sdk/go => /path/to/c ### policy.yaml ```yaml -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: my-policy diff --git a/labs/wasm-policy-sdk/go/examples/attestation/policy.yaml b/labs/wasm-policy-sdk/go/examples/attestation/policy.yaml index ebe44a408..6a08b8c83 100644 --- a/labs/wasm-policy-sdk/go/examples/attestation/policy.yaml +++ b/labs/wasm-policy-sdk/go/examples/attestation/policy.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: git-commit-signature diff --git a/labs/wasm-policy-sdk/go/examples/discover/policy.yaml b/labs/wasm-policy-sdk/go/examples/discover/policy.yaml index 08d33a285..0072f8620 100644 --- a/labs/wasm-policy-sdk/go/examples/discover/policy.yaml +++ b/labs/wasm-policy-sdk/go/examples/discover/policy.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: policy-builtins diff --git a/labs/wasm-policy-sdk/go/examples/http/policy.yaml b/labs/wasm-policy-sdk/go/examples/http/policy.yaml index e8eecd68e..e055d2761 100644 --- a/labs/wasm-policy-sdk/go/examples/http/policy.yaml +++ b/labs/wasm-policy-sdk/go/examples/http/policy.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: http-example diff --git a/labs/wasm-policy-sdk/go/examples/sbom/policy.yaml b/labs/wasm-policy-sdk/go/examples/sbom/policy.yaml index 95c72a7e0..048415bde 100644 --- a/labs/wasm-policy-sdk/go/examples/sbom/policy.yaml +++ b/labs/wasm-policy-sdk/go/examples/sbom/policy.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: sbom-validation diff --git a/labs/wasm-policy-sdk/go/examples/simple/policy.yaml b/labs/wasm-policy-sdk/go/examples/simple/policy.yaml index 79a5c07e9..d17c704e5 100644 --- a/labs/wasm-policy-sdk/go/examples/simple/policy.yaml +++ b/labs/wasm-policy-sdk/go/examples/simple/policy.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: simple-validation diff --git a/labs/wasm-policy-sdk/js/README.md b/labs/wasm-policy-sdk/js/README.md index 3f7bd0de5..e00445c6f 100644 --- a/labs/wasm-policy-sdk/js/README.md +++ b/labs/wasm-policy-sdk/js/README.md @@ -543,7 +543,7 @@ declare module "main" { ### policy.yaml ```yaml -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: my-policy diff --git a/labs/wasm-policy-sdk/js/examples/attestation/policy.yaml b/labs/wasm-policy-sdk/js/examples/attestation/policy.yaml index ebe44a408..6a08b8c83 100644 --- a/labs/wasm-policy-sdk/js/examples/attestation/policy.yaml +++ b/labs/wasm-policy-sdk/js/examples/attestation/policy.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: git-commit-signature diff --git a/labs/wasm-policy-sdk/js/examples/discover/policy.yaml b/labs/wasm-policy-sdk/js/examples/discover/policy.yaml index 08d33a285..0072f8620 100644 --- a/labs/wasm-policy-sdk/js/examples/discover/policy.yaml +++ b/labs/wasm-policy-sdk/js/examples/discover/policy.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: policy-builtins diff --git a/labs/wasm-policy-sdk/js/examples/http/policy.yaml b/labs/wasm-policy-sdk/js/examples/http/policy.yaml index e8eecd68e..e055d2761 100644 --- a/labs/wasm-policy-sdk/js/examples/http/policy.yaml +++ b/labs/wasm-policy-sdk/js/examples/http/policy.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: http-example diff --git a/labs/wasm-policy-sdk/js/examples/sbom/policy.yaml b/labs/wasm-policy-sdk/js/examples/sbom/policy.yaml index 95c72a7e0..048415bde 100644 --- a/labs/wasm-policy-sdk/js/examples/sbom/policy.yaml +++ b/labs/wasm-policy-sdk/js/examples/sbom/policy.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: sbom-validation diff --git a/labs/wasm-policy-sdk/js/examples/simple/policy.yaml b/labs/wasm-policy-sdk/js/examples/simple/policy.yaml index 8ea36385f..8a0007670 100644 --- a/labs/wasm-policy-sdk/js/examples/simple/policy.yaml +++ b/labs/wasm-policy-sdk/js/examples/simple/policy.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: simple-js-example diff --git a/pkg/attestation/crafter/testdata/policies/policy_embedded.yaml b/pkg/attestation/crafter/testdata/policies/policy_embedded.yaml index 30988e667..7c1fbe34a 100644 --- a/pkg/attestation/crafter/testdata/policies/policy_embedded.yaml +++ b/pkg/attestation/crafter/testdata/policies/policy_embedded.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: workflow diff --git a/pkg/attestation/crafter/testdata/policies/policy_missing_rego.yaml b/pkg/attestation/crafter/testdata/policies/policy_missing_rego.yaml index 898fa6315..5199266ba 100644 --- a/pkg/attestation/crafter/testdata/policies/policy_missing_rego.yaml +++ b/pkg/attestation/crafter/testdata/policies/policy_missing_rego.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: workflow diff --git a/pkg/attestation/crafter/testdata/policies/policy_rego.yaml b/pkg/attestation/crafter/testdata/policies/policy_rego.yaml index 4c52a0c5b..2af9767ac 100644 --- a/pkg/attestation/crafter/testdata/policies/policy_rego.yaml +++ b/pkg/attestation/crafter/testdata/policies/policy_rego.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: workflow diff --git a/pkg/policies/policies_test.go b/pkg/policies/policies_test.go index b0b8a046a..d0bef1a46 100644 --- a/pkg/policies/policies_test.go +++ b/pkg/policies/policies_test.go @@ -618,20 +618,20 @@ func (s *testSuite) TestLoadPolicySpec() { expectedCategory: "SBOM", expectedRef: &PolicyDescriptor{ URI: "file://testdata/sbom_syft.yaml", - Digest: "sha256:81b7fbe4c6ef2182fd042a28fa7f3b3971879d18994147cb812b8fe87a4e04e5", + Digest: "sha256:8337715eebbb27d498536bb4ac1adb090f63799e7a6ca6e15d22016368555c19", }, }, { name: "by file ref with valid digest", attachment: &v12.PolicyAttachment{ Policy: &v12.PolicyAttachment_Ref{ - Ref: "file://testdata/sbom_syft.yaml@sha256:81b7fbe4c6ef2182fd042a28fa7f3b3971879d18994147cb812b8fe87a4e04e5", + Ref: "file://testdata/sbom_syft.yaml@sha256:8337715eebbb27d498536bb4ac1adb090f63799e7a6ca6e15d22016368555c19", }, }, expectedName: "made-with-syft", expectedRef: &PolicyDescriptor{ URI: "file://testdata/sbom_syft.yaml", - Digest: "sha256:81b7fbe4c6ef2182fd042a28fa7f3b3971879d18994147cb812b8fe87a4e04e5", + Digest: "sha256:8337715eebbb27d498536bb4ac1adb090f63799e7a6ca6e15d22016368555c19", }, }, { diff --git a/pkg/policies/policy_groups_test.go b/pkg/policies/policy_groups_test.go index fcae4c74d..fa7625f55 100644 --- a/pkg/policies/policy_groups_test.go +++ b/pkg/policies/policy_groups_test.go @@ -72,7 +72,7 @@ func (s *groupsTestSuite) TestLoadGroupSpec() { { name: "with correct digest", attachment: &v1.PolicyGroupAttachment{ - Ref: "file://testdata/policy_group.yaml@sha256:e35d8effedf522b33a080168a69b0d56ca7d7e2779e2fe6e7d8c460509771f88", + Ref: "file://testdata/policy_group.yaml@sha256:3f27da0d40f194f760c68b99d93f405e135cb7be976b315688723cbdf1d07d90", }, expectedName: "sbom-quality", }, diff --git a/pkg/policies/testdata/container_policy.yaml b/pkg/policies/testdata/container_policy.yaml index d7320854b..756aefcc5 100644 --- a/pkg/policies/testdata/container_policy.yaml +++ b/pkg/policies/testdata/container_policy.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: container-policy diff --git a/pkg/policies/testdata/group_with_inputs.yaml b/pkg/policies/testdata/group_with_inputs.yaml index 7fb45f68b..6aea504a8 100644 --- a/pkg/policies/testdata/group_with_inputs.yaml +++ b/pkg/policies/testdata/group_with_inputs.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: PolicyGroup metadata: name: group-with-inputs diff --git a/pkg/policies/testdata/group_with_interpolated_material.yaml b/pkg/policies/testdata/group_with_interpolated_material.yaml index d1112123d..c8a8124fd 100644 --- a/pkg/policies/testdata/group_with_interpolated_material.yaml +++ b/pkg/policies/testdata/group_with_interpolated_material.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: PolicyGroup metadata: name: group-with-inputs diff --git a/pkg/policies/testdata/materials.yaml b/pkg/policies/testdata/materials.yaml index c2ebb861b..2b2cf659d 100644 --- a/pkg/policies/testdata/materials.yaml +++ b/pkg/policies/testdata/materials.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: materials diff --git a/pkg/policies/testdata/missing_rego.yaml b/pkg/policies/testdata/missing_rego.yaml index df8b6ba5c..28b38905a 100644 --- a/pkg/policies/testdata/missing_rego.yaml +++ b/pkg/policies/testdata/missing_rego.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: missing-rego diff --git a/pkg/policies/testdata/multi-kind.yaml b/pkg/policies/testdata/multi-kind.yaml index 8b43100a8..fef2385e8 100644 --- a/pkg/policies/testdata/multi-kind.yaml +++ b/pkg/policies/testdata/multi-kind.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: multikind diff --git a/pkg/policies/testdata/policy_group.yaml b/pkg/policies/testdata/policy_group.yaml index 68e720c14..77e0d3cd9 100644 --- a/pkg/policies/testdata/policy_group.yaml +++ b/pkg/policies/testdata/policy_group.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: PolicyGroup metadata: name: sbom-quality diff --git a/pkg/policies/testdata/policy_group_multikind.yaml b/pkg/policies/testdata/policy_group_multikind.yaml index ea828e1ac..05add6b77 100644 --- a/pkg/policies/testdata/policy_group_multikind.yaml +++ b/pkg/policies/testdata/policy_group_multikind.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: PolicyGroup metadata: name: sbom-quality diff --git a/pkg/policies/testdata/policy_group_no_name.yaml b/pkg/policies/testdata/policy_group_no_name.yaml index 511cf9838..66bb81e70 100644 --- a/pkg/policies/testdata/policy_group_no_name.yaml +++ b/pkg/policies/testdata/policy_group_no_name.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: PolicyGroup metadata: name: sbom-quality diff --git a/pkg/policies/testdata/policy_group_push_only.yaml b/pkg/policies/testdata/policy_group_push_only.yaml index 10462947a..b689ad028 100644 --- a/pkg/policies/testdata/policy_group_push_only.yaml +++ b/pkg/policies/testdata/policy_group_push_only.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: PolicyGroup metadata: name: push-only-group diff --git a/pkg/policies/testdata/policy_group_wrong.yaml b/pkg/policies/testdata/policy_group_wrong.yaml index 85a42a89d..be1513d0a 100644 --- a/pkg/policies/testdata/policy_group_wrong.yaml +++ b/pkg/policies/testdata/policy_group_wrong.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: PolicyGroup metadata: name: sbom-quality diff --git a/pkg/policies/testdata/policy_multi_kind_with_ignore.yaml b/pkg/policies/testdata/policy_multi_kind_with_ignore.yaml index 9bdc95b28..c27f3e5a1 100644 --- a/pkg/policies/testdata/policy_multi_kind_with_ignore.yaml +++ b/pkg/policies/testdata/policy_multi_kind_with_ignore.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: multikindignore diff --git a/pkg/policies/testdata/policy_openvex_no_ignore.yaml b/pkg/policies/testdata/policy_openvex_no_ignore.yaml index c5eb0faf4..ea8663cfa 100644 --- a/pkg/policies/testdata/policy_openvex_no_ignore.yaml +++ b/pkg/policies/testdata/policy_openvex_no_ignore.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: multikindignore diff --git a/pkg/policies/testdata/policy_result_format.yaml b/pkg/policies/testdata/policy_result_format.yaml index 830b439ab..d04714d50 100644 --- a/pkg/policies/testdata/policy_result_format.yaml +++ b/pkg/policies/testdata/policy_result_format.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: policy-result-format diff --git a/pkg/policies/testdata/policy_result_skipped.yaml b/pkg/policies/testdata/policy_result_skipped.yaml index 1f71881ae..986760c5d 100644 --- a/pkg/policies/testdata/policy_result_skipped.yaml +++ b/pkg/policies/testdata/policy_result_skipped.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: policy-result-skipped diff --git a/pkg/policies/testdata/policy_with_ignore.yaml b/pkg/policies/testdata/policy_with_ignore.yaml index 9942fa993..fde34bb41 100644 --- a/pkg/policies/testdata/policy_with_ignore.yaml +++ b/pkg/policies/testdata/policy_with_ignore.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: policy-result-format diff --git a/pkg/policies/testdata/policy_with_inputs.yaml b/pkg/policies/testdata/policy_with_inputs.yaml index b5868c0be..54a20162a 100644 --- a/pkg/policies/testdata/policy_with_inputs.yaml +++ b/pkg/policies/testdata/policy_with_inputs.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: policy-with-inputs diff --git a/pkg/policies/testdata/sbom_syft.yaml b/pkg/policies/testdata/sbom_syft.yaml index 0e864d161..ba5147259 100644 --- a/pkg/policies/testdata/sbom_syft.yaml +++ b/pkg/policies/testdata/sbom_syft.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: made-with-syft diff --git a/pkg/policies/testdata/sbom_syft_not_typed.yaml b/pkg/policies/testdata/sbom_syft_not_typed.yaml index 8b451c4f6..3f3519b46 100644 --- a/pkg/policies/testdata/sbom_syft_not_typed.yaml +++ b/pkg/policies/testdata/sbom_syft_not_typed.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: made-with-syft diff --git a/pkg/policies/testdata/with_arguments.yaml b/pkg/policies/testdata/with_arguments.yaml index 5c9c92792..200522801 100644 --- a/pkg/policies/testdata/with_arguments.yaml +++ b/pkg/policies/testdata/with_arguments.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: workflow diff --git a/pkg/policies/testdata/workflow.yaml b/pkg/policies/testdata/workflow.yaml index 4b4345118..8b726a2df 100644 --- a/pkg/policies/testdata/workflow.yaml +++ b/pkg/policies/testdata/workflow.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: workflow diff --git a/pkg/policies/testdata/workflow_embedded.yaml b/pkg/policies/testdata/workflow_embedded.yaml index 333a4967f..9de5b0ddd 100644 --- a/pkg/policies/testdata/workflow_embedded.yaml +++ b/pkg/policies/testdata/workflow_embedded.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: workflow diff --git a/pkg/policies/testdata/workflow_push_only.yaml b/pkg/policies/testdata/workflow_push_only.yaml index a04ba4541..b2ff6d740 100644 --- a/pkg/policies/testdata/workflow_push_only.yaml +++ b/pkg/policies/testdata/workflow_push_only.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: workflow-push-only diff --git a/pkg/policies/testdata/wrong_policy.yaml b/pkg/policies/testdata/wrong_policy.yaml index 0c9d9caa6..5a12168b0 100644 --- a/pkg/policies/testdata/wrong_policy.yaml +++ b/pkg/policies/testdata/wrong_policy.yaml @@ -1,4 +1,4 @@ -apiVersion: workflowcontract.chainloop.dev/v1 +apiVersion: chainloop.dev/v1 kind: Policy metadata: name: wrong_policy