Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(deps): update module github.com/sigstore/cosign/v2 to v2.2.1 [sec…
…urity] (#2134) [![Mend Renovate logo banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/sigstore/cosign/v2](https://togithub.com/sigstore/cosign) | require | patch | `v2.2.0` -> `v2.2.1` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. ### GitHub Vulnerability Alerts #### [CVE-2023-46737](https://togithub.com/sigstore/cosign/security/advisories/GHSA-vfp6-jrw2-99g9) ### Summary Cosign is susceptible to a denial of service by an attacker controlled registry. An attacker who controls a remote registry can return a high number of attestations and/or signatures to Cosign and cause Cosign to enter a long loop resulting in an endless data attack. The root cause is that Cosign loops through all attestations fetched from the remote registry in `pkg/cosign.FetchAttestations`. The attacker needs to compromise the registry or make a request to a registry they control. When doing so, the attacker must return a high number of attestations in the response to Cosign. The result will be that the attacker can cause Cosign to go into a long or infinite loop that will prevent other users from verifying their data. In Kyvernos case, an attacker whose privileges are limited to making requests to the cluster can make a request with an image reference to their own registry, trigger the infinite loop and deny other users from completing their admission requests. Alternatively, the attacker can obtain control of the registry used by an organization and return a high number of attestations instead the expected number of attestations. The vulnerable loop in Cosign starts on line 154 below: https://github.com/sigstore/cosign/blob/004443228442850fb28f248fd59765afad99b6df/pkg/cosign/fetch.go#L135-L196 The `l` slice is controllable by an attacker who controls the remote registry. Many cloud-native projects consider the remote registry to be untrusted, including Crossplane, Notary and Kyverno. We consider the same to be the case for Cosign, since users are not in control of whether the registry returns the expected data. TUF's security model labels this type of vulnerability an ["Endless data attack"](https://theupdateframework.io/security/), but an attacker could use this as a type of rollback attack, in case the user attempts to deploy a patched version of a vulnerable image; The attacker could prevent this upgrade by causing Cosign to get stuck in an infinite loop and never complete. ### Mitigation The issue can be mitigated rather simply by setting a limit to the limit of attestations that Cosign will loop through. The limit does not need to be high to be within the vast majority of use cases and still prevent the endless data attack. --- ### Release Notes <details> <summary>sigstore/cosign (github.com/sigstore/cosign/v2)</summary> ### [`v2.2.1`](https://togithub.com/sigstore/cosign/blob/HEAD/CHANGELOG.md#v221) [Compare Source](https://togithub.com/sigstore/cosign/compare/v2.2.0...v2.2.1) **Note: This release comes with a fix for CVE-2023-46737 described in this [Github Security Advisory](https://togithub.com/sigstore/cosign/security/advisories/GHSA-vfp6-jrw2-99g9). Please upgrade to this release ASAP** #### Enhancements - feat: Support basic auth and bearer auth login to registry ([#​3310](https://togithub.com/sigstore/cosign/issues/3310)) - add support for ignoring certificates with pkcs11 ([#​3334](https://togithub.com/sigstore/cosign/issues/3334)) - Support ReplaceOp in Signatures ([#​3315](https://togithub.com/sigstore/cosign/issues/3315)) - feat: added ability to get image digest back via triangulate ([#​3255](https://togithub.com/sigstore/cosign/issues/3255)) - feat: add `--only` flag in `cosign copy` to copy sign, att & sbom ([#​3247](https://togithub.com/sigstore/cosign/issues/3247)) - feat: add support attaching a Rekor bundle to a container ([#​3246](https://togithub.com/sigstore/cosign/issues/3246)) - feat: add support outputting rekor response on signing ([#​3248](https://togithub.com/sigstore/cosign/issues/3248)) - feat: improve dockerfile verify subcommand ([#​3264](https://togithub.com/sigstore/cosign/issues/3264)) - Add guard flag for experimental OCI 1.1 verify. ([#​3272](https://togithub.com/sigstore/cosign/issues/3272)) - Deprecate SBOM attachments ([#​3256](https://togithub.com/sigstore/cosign/issues/3256)) - feat: dedent line in cosign copy doc ([#​3244](https://togithub.com/sigstore/cosign/issues/3244)) - feat: add platform flag to cosign copy command ([#​3234](https://togithub.com/sigstore/cosign/issues/3234)) - Add SLSA 1.0 attestation support to cosign. Closes [#​2860](https://togithub.com/sigstore/cosign/issues/2860) ([#​3219](https://togithub.com/sigstore/cosign/issues/3219)) - attest: pass OCI remote opts to att resolver. ([#​3225](https://togithub.com/sigstore/cosign/issues/3225)) #### Bug Fixes - Merge pull request from GHSA-vfp6-jrw2-99g9 - fix: allow cosign download sbom when image is absent ([#​3245](https://togithub.com/sigstore/cosign/issues/3245)) - ci: add a OCI registry test for referrers support ([#​3253](https://togithub.com/sigstore/cosign/issues/3253)) - Fix ReplaceSignatures ([#​3292](https://togithub.com/sigstore/cosign/issues/3292)) - Stop using deprecated in_toto.ProvenanceStatement ([#​3243](https://togithub.com/sigstore/cosign/issues/3243)) - Fixes [#​3236](https://togithub.com/sigstore/cosign/issues/3236), disable SCT checking for a cosign verification when usin… ([#​3237](https://togithub.com/sigstore/cosign/issues/3237)) - fix: update error in `SignedEntity` to be more descriptive ([#​3233](https://togithub.com/sigstore/cosign/issues/3233)) - Fail timestamp verification if no root is provided ([#​3224](https://togithub.com/sigstore/cosign/issues/3224)) #### Documentation - Add some docs about verifying in an air-gapped environment ([#​3321](https://togithub.com/sigstore/cosign/issues/3321)) - Update CONTRIBUTING.md ([#​3268](https://togithub.com/sigstore/cosign/issues/3268)) - docs: improves the Contribution guidelines ([#​3257](https://togithub.com/sigstore/cosign/issues/3257)) - Remove security policy ([#​3230](https://togithub.com/sigstore/cosign/issues/3230)) #### Others - Set go to min 1.21 and update dependencies ([#​3327](https://togithub.com/sigstore/cosign/issues/3327)) - Update contact for code of conduct ([#​3266](https://togithub.com/sigstore/cosign/issues/3266)) - Update .ko.yaml ([#​3240](https://togithub.com/sigstore/cosign/issues/3240)) #### Contributors - AdamKorcz - Andres Galante - Appu - Billy Lynch - Bob Callaway - Caleb Woodbine - Carlos Tadeu Panato Junior - Dylan Richardson - Gareth Healy - Hayden B - John Kjell - Jon Johnson - jonvnadelberg - Luiz Carvalho - Priya Wadhwa - Ramkumar Chinchani - Tosone - Ville Aikas - Vishal Choudhary - ziel </details> --- ### Configuration 📅 **Schedule**: Branch creation - "" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/defenseunicorns/zarf). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40Ni4wIiwidXBkYXRlZEluVmVyIjoiMzcuNDYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
- Loading branch information