-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: added kyverno validation and updated deps
- Loading branch information
Showing
7 changed files
with
97 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
apiVersion: kyverno.io/v1 | ||
kind: ClusterPolicy | ||
metadata: | ||
name: verify-miracum-images | ||
annotations: | ||
policies.kyverno.io/title: >- | ||
Verify signatures and SLSA Provenance for ghcr.io/miracum container images | ||
policies.kyverno.io/category: Software Supply Chain Security | ||
policies.kyverno.io/severity: medium | ||
policies.kyverno.io/subject: Pod | ||
policies.kyverno.io/minversion: 1.9.2 | ||
kyverno.io/kyverno-version: 1.9.2 | ||
kyverno.io/kubernetes-version: "1.26" | ||
policies.kyverno.io/description: >- | ||
Provenance is used to identify how an artifact was produced | ||
and from where it originated. SLSA provenance is an industry-standard | ||
method of representing that provenance. This policy verifies that an | ||
image has SLSA provenance and was signed by the expected subject and issuer | ||
when produced through GitHub Actions. | ||
spec: | ||
validationFailureAction: Enforce | ||
webhookTimeoutSeconds: 30 | ||
rules: | ||
- name: verify-miracum-images | ||
match: | ||
any: | ||
- resources: | ||
kinds: | ||
- Pod | ||
verifyImages: | ||
- imageReferences: | ||
- "ghcr.io/miracum/*" | ||
attestors: | ||
- entries: | ||
- keyless: | ||
subject: "https://github.com/miracum/.github/.github/workflows/standard-build.yaml@*" | ||
issuer: "https://token.actions.githubusercontent.com" | ||
rekor: | ||
url: https://rekor.sigstore.dev | ||
additionalExtensions: | ||
githubWorkflowTrigger: release | ||
githubWorkflowName: ci | ||
githubWorkflowRepository: miracum/* | ||
attestations: | ||
# SLSA attestations | ||
- predicateType: https://slsa.dev/provenance/v0.2 | ||
attestors: | ||
- count: 1 | ||
entries: | ||
- keyless: | ||
subject: "https://github.com/slsa-framework/slsa-github-generator/.github/workflows/generator_container_slsa3.yml@refs/tags/v*" | ||
issuer: "https://token.actions.githubusercontent.com" | ||
rekor: | ||
url: https://rekor.sigstore.dev | ||
conditions: | ||
- all: | ||
# This expression uses a regex pattern to ensure the builder.id in the attestation is equal to the official | ||
# SLSA provenance generator workflow and uses a tagged release in semver format. If using a specific SLSA | ||
# provenance generation workflow, you may need to adjust the first input as necessary. | ||
- key: "{{ regex_match('^https://github.com/slsa-framework/slsa-github-generator/.github/workflows/generator_container_slsa3.yml@refs/tags/v[0-9]+.[0-9]+.[0-9]+$', '{{ builder.id }}') }}" | ||
operator: Equals | ||
value: true |