Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use local policy.yaml file for Enterprise Contract #42

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions ec/policy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
#
# Example usage:
# ec validate image \
# --image $IMAGE \
# --public-key key.pub \
# --policy github.com/redhat-appstudio/tssc-sample-pipelines//ec
#
# (Assuming this file is located at
# https://github.com/redhat-appstudio/tssc-sample-pipelines/tree/main/ec/policy.yaml )
#
# See also https://github.com/enterprise-contract/config for other example
# Enterprise Contract configs.
#
name: Default (v0.4)
description: >-
Includes rules for levels 1, 2 & 3 of SLSA v0.1. (Pinned to the
release-v0.4 branch for stability with ec version v0.4.)
sources:
- name: Default
policy:
- github.com/enterprise-contract/ec-policies//policy/lib?ref=release-v0.4
- github.com/enterprise-contract/ec-policies//policy/release?ref=release-v0.4
data: []
config:
# Other rules from the ec-policies repo may be included here
# Unwanted rules can be excluded. For more details see
# https://enterprisecontract.dev/docs/ec-cli/main/configuration.html
include:
- '@slsa3'
exclude: []
3 changes: 2 additions & 1 deletion pac/pipelines/gitops-pull-request-rhtap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ spec:
description: The target branch for the pull request
name: target-branch
type: string
- default: github.com/enterprise-contract/config//default
# See https://github.com/redhat-appstudio/tssc-sample-pipelines/tree/main/ec/policy.yaml
- default: github.com/redhat-appstudio/tssc-sample-pipelines//ec
description: Enterprise Contract policy to validate against
name: ec-policy-configuration
type: string
Expand Down