|
| 1 | +# Security Policy |
| 2 | + |
| 3 | +The Capsule community has adopted this security disclosures and response policy to ensure we responsibly handle critical issues. |
| 4 | + |
| 5 | +## Bulletins |
| 6 | + |
| 7 | +For information regarding the security of this project please join our [slack channel](https://kubernetes.slack.com/archives/C03GETTJQRL). |
| 8 | + |
| 9 | + |
| 10 | +## Covered Repositories and Issues |
| 11 | + |
| 12 | +When we say "a security vulnerability in capsule" we mean a security issue |
| 13 | +in any repository under the [projectcapsule GitHub organization](https://github.com/projectcapsule/). |
| 14 | + |
| 15 | +This reporting process is intended only for security issues in the capsule |
| 16 | +project itself, and doesn't apply to applications _using_ capsule or to |
| 17 | +issues which do not affect security. |
| 18 | + |
| 19 | +Don't use this process if: |
| 20 | + |
| 21 | + * You have issues with your capsule installation or configuration |
| 22 | + * Your issue is not security related |
| 23 | + |
| 24 | + |
| 25 | +### Explicitly Not Covered: Vulnerability Scanner Reports |
| 26 | + |
| 27 | +We do not accept reports which amount to copy and pasted output from a vulnerability |
| 28 | +scanning tool **unless** work has specifically been done to confirm that a vulnerability |
| 29 | +reported by the tool _actually exists_ in capsule. |
| 30 | + |
| 31 | +## Reporting a Vulnerability |
| 32 | + |
| 33 | +To report a security issue or vulnerability, [submit a private vulnerability report via GitHub](https://github.com/projectcapsule/capsule-proxy/security/advisories/new) to the repository maintainers with a description of the issue, the steps you took to create the issue, affected versions, and, if known, mitigations for the issue. |
| 34 | + |
| 35 | +Describe the issue in English, ideally with some example configuration or code which allows the issue to be reproduced. Explain why you believe this to be a security issue in capsule-proxy, if that's not obvious. should contain the following: |
| 36 | + |
| 37 | + * description of the problem |
| 38 | + * precise and detailed steps (include screenshots) |
| 39 | + * the affected version(s). This may also include environment relevant versions. |
| 40 | + * any possible mitigations |
| 41 | + |
| 42 | +If the issue is confirmed as a vulnerability, we will open a Security Advisory and acknowledge your contributions as part of it. |
| 43 | + |
| 44 | +## Reponse |
| 45 | + |
| 46 | +Response times could be affected by weekends, holidays, breaks or time zone differences. That said, the security response team will endeavour to reply as soon as possible, ideally within 5 working days. |
| 47 | + |
| 48 | +## Security Contacts |
| 49 | + |
| 50 | +[Maintainers](./github/maintainers.yaml) of this project are responsible for the security of the project as outlined in this policy. |
| 51 | + |
| 52 | +# Release Artifacts |
| 53 | + |
| 54 | +[See all the available artifacts](https://github.com/orgs/projectcapsule/packages?repo_name=capsule-proxy) |
| 55 | + |
| 56 | +## Verifing |
| 57 | + |
| 58 | +To verify artifacts you need to have [cosign installed](https://github.com/sigstore/cosign#installation). This guide assumes you are using v2.x of cosign. All of the signatures are created using [keyless signing](https://docs.sigstore.dev/verifying/verify/#keyless-verification-using-openid-connect). We have a seperate repository for all the signatures for all the artifacts released under the projectcapsule - `ghcr.io/projectcapsule/signatures`. You can set the environment variable `COSIGN_REPOSITORY` to point to this repository. For example: |
| 59 | + |
| 60 | + export COSIGN_REPOSITORY=ghcr.io/projectcapsule/signatures |
| 61 | + |
| 62 | +To verify the signature of the docker image, run the following command. Replace `<release_tag>` with an [available release tag](https://github.com/projectcapsule/capsule-proxy/pkgs/container/capsule-proxy): |
| 63 | + |
| 64 | + COSIGN_REPOSITORY=ghcr.io/projectcapsule/signatures cosign verify ghcr.io/projectcapsule/capsule-proxy:<release_tag> \ |
| 65 | + --certificate-identity-regexp="https://github.com/projectcapsule/capsule-proxy/.github/workflows/docker-publish.yml@refs/tags/*" \ |
| 66 | + --certificate-oidc-issuer="https://token.actions.githubusercontent.com" | jq |
| 67 | + |
| 68 | +To verify the signature of the helm image, run the following command. Replace `<release_tag>` with an [available release tag](https://github.com/projectcapsule/capsule/pkgs/container/charts%2Fcapsule): |
| 69 | + |
| 70 | + COSIGN_REPOSITORY=ghcr.io/projectcapsule/signatures cosign verify ghcr.io/projectcapsule/charts/capsule-proxy:<release_tag> \ |
| 71 | + --certificate-identity-regexp="https://github.com/projectcapsule/capsule-proxy/.github/workflows/helm-publish.yml@refs/tags/*" \ |
| 72 | + --certificate-oidc-issuer="https://token.actions.githubusercontent.com" | jq |
| 73 | + |
| 74 | + |
| 75 | +## Verifying Provenance |
| 76 | + |
| 77 | +Capsule creates and attests to the provenance of its builds using the [SLSA standard](https://slsa.dev/spec/v0.2/provenance) and meets the [SLSA Level 3](https://slsa.dev/spec/v0.1/levels) specification. The attested provenance may be verified using the cosign tool. |
| 78 | + |
| 79 | +Verify the provenance of the docker image. Replace `<release_tag>` with an [available release tag](https://github.com/projectcapsule/capsule-proxy/pkgs/container/capsule-proxy) |
| 80 | + |
| 81 | +```bash |
| 82 | +cosign verify-attestation --type slsaprovenance \ |
| 83 | + --certificate-identity-regexp="https://github.com/slsa-framework/slsa-github-generator/.github/workflows/generator_container_slsa3.yml@refs/tags/*" \ |
| 84 | + --certificate-oidc-issuer="https://token.actions.githubusercontent.com" \ |
| 85 | + ghcr.io/projectcapsule/capsule-proxy:<release_tag> | jq .payload -r | base64 --decode | jq |
| 86 | +``` |
| 87 | + |
| 88 | +Verify the provenance of the helm image. Replace `<release_tag>` with an [available release tag](https://github.com/projectcapsule/capsule-proxy/pkgs/container/charts%2Fcapsule-proxy) |
| 89 | + |
| 90 | +```bash |
| 91 | +cosign verify-attestation --type slsaprovenance \ |
| 92 | + --certificate-identity-regexp="https://github.com/slsa-framework/slsa-github-generator/.github/workflows/generator_container_slsa3.yml@refs/tags/*" \ |
| 93 | + --certificate-oidc-issuer="https://token.actions.githubusercontent.com" \ |
| 94 | + ghcr.io/projectcapsule/charts/capsule-proxy:<release_tag> | jq .payload -r | base64 --decode | jq |
| 95 | +``` |
| 96 | + |
| 97 | +## Software Bill of Materials (SBOM) |
| 98 | + |
| 99 | +An SBOM (Software Bill of Materials) in CycloneDX JSON format is published for each Kyverno release, including pre-releases. Like signatures, SBOMs are stored in a separate repository at `ghcr.io/projectcapsule/sbom`. You can set the environment variable `COSIGN_REPOSITORY` to point to this repository. For example: |
| 100 | + |
| 101 | + export COSIGN_REPOSITORY=ghcr.io/projectcapsule/sbom |
| 102 | + |
| 103 | +To inspect the SBOM of the docker image, run the following command. Replace `<release_tag>` with an [available release tag](https://github.com/projectcapsule/capsule-proxy/pkgs/container/capsule-proxy): |
| 104 | + |
| 105 | + |
| 106 | + COSIGN_REPOSITORY=ghcr.io/projectcapsule/sbom cosign download sbom ghcr.io/projectcapsule/capsule-proxy:<release_tag> |
| 107 | + |
| 108 | +To inspect the SBOM of the helm image, run the following command. Replace `<release_tag>` with an [available release tag](https://github.com/projectcapsule/capsule-proxy/pkgs/container/charts%2Fcapsule-proxy): |
| 109 | + |
| 110 | + COSIGN_REPOSITORY=ghcr.io/projectcapsule/sbom cosign download sbom ghcr.io/projectcapsule/charts/capsule-proxy:<release_tag> |
| 111 | + |
| 112 | + |
| 113 | +# Credits |
| 114 | + |
| 115 | +Our Security Policy and Workflows are based on the work of the [Kyverno](https://github.com/kyverno) and [Cert-Manager](https://github.com/cert-manager) community. |
0 commit comments