Skip to content

cosing-installer default is to make updating cosign difficult #219

@jku

Description

@jku

Problem

Most cosign users run an unsupported old version (at least 65% of cosign clients that made a request to Rekor last week were < 2.6.0)

Image

Potential root causes in cosign-installer

Obviously some people just don't upgrade their software and some workflows are just abandoned but my hunch is that cosign-installer does a few things that may be negatively affecting this statistic.

Widespread use of cosign-release argument

The first example in README looks like this

uses: sigstore/cosign-installer@v4.0.0
with:
  cosign-release: 'v3.0.3' # optional
  • I believe this has lead to widespread use of this pattern (including the cosign-release argument in the workflow)
  • this means anyone using dependabot will get updates for cosign-installer and may think they're covered... but may in fact be running very old cosign

cosign-installer hard codes a cosign version but does not follow cosign release schedule

The users who do not set cosign-release will get a default value that is hard-coded in the action: This seems fine as a new release of cosign-installer typically updates that default value.

Unfortunately cosign releases almost invariably happen without a corresponding cosign-installer release. Current cosign-installer by default installs a cosign version that has a vulnerability in it.

Potential fixes

  • Start breaking cosign-release gradually. This could be done in many ways but a straw man suggestion:
    • Document that cosign-release should not be used in normal use: One version of cosign-installer will always use the same cosign version so setting cosign-release does not improve reproducibility
    • Hard code a "supported releases list" in the installer:
      • accept only these versions and higher as cosign-release value. Current list could be ["2.6.2", "3.0.5"]
      • Make sure the error message makes it clear most users should not be using the cosign-release argument at all
    • (Maybe) Add an argument use-unsupported-cosign-release so users who really want to run 2.2.0 can override this behaviour
  • cosign release must lead to a cosign-installer release soon after -- or alternatively cosign-installer must stop hard coding the cosign version
    • New release should update the default cosign version and the "supported releases list" if that is added
    • Some automation in this repo should be able to at least open an issue if not a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions