Skip to content

Commit

Permalink
feat(docs): add docs for sigstore bundle verification (#1328)
Browse files Browse the repository at this point in the history
feat(docs): sigstore bundle verification

Signed-off-by: Vishal Choudhary <[email protected]>
Co-authored-by: shuting <[email protected]>
  • Loading branch information
vishal-chdhry and realshuting authored Sep 26, 2024
1 parent 9e40035 commit 56e82c6
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions content/en/docs/writing-policies/verify-images/sigstore/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,48 @@ check-image:
invalid signature'
```

### Verifying Sigstore bundles

Container images signatures that use [sigstore bundle format](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) such as [GitHub Artifact Attestation](https://docs.github.com/en/actions/security-for-github-actions/using-artifact-attestations) can be verified using verification type `SigstoreBundle`. The following example verifies images containing SLSA Provenance created and signed using GitHub Artifact Attestation.

```yaml
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
annotations:
pod-policies.kyverno.io/autogen-controllers: none
name: sigstore-attestation-verification
spec:
background: false
validationFailureAction: Enforce
webhookTimeoutSeconds: 30
rules:
- match:
any:
- resources:
kinds:
- Pod
name: sigstore-attestation-verification
verifyImages:
- imageReferences:
- "*"
type: SigstoreBundle
attestations:
- attestors:
- entries:
- keyless:
issuer: https://token.actions.githubusercontent.com
subject: https://github.com/vishal-chdhry/artifact-attestation-example/.github/workflows/build-attested-image.yaml@refs/heads/main
rekor:
url: https://rekor.sigstore.dev
conditions:
- all:
- key: '{{ buildDefinition.buildType }}'
operator: Equals
value: https://actions.github.io/buildtypes/workflow/v1
type: https://slsa.dev/provenance/v1
```

### Skipping Image References

`skipImageReferences` can be used to precisely filter image references that should be verified by a policy. A list of references can be specified in `skipImageReferences` and images that match those references will be excluded from image verification process. The following example will match all images from `ghcr.io` but will skip images from `ghcr.io/trusted`.
Expand Down

0 comments on commit 56e82c6

Please sign in to comment.