GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [bug] "Generate builder" and "Run sigstore/cosign-installer" steps failing with `error updating to TUF remote mirror: invalid key` · Issue #3350 · slsa-framework/slsa-github-generator

[bug] "Generate builder" and "Run sigstore/cosign-installer" steps failing with error updating to TUF remote mirror: invalid key #3350

New issue
Copy link
New issue
Copy link
Closed
#3355
Closed
[bug] "Generate builder" and "Run sigstore/cosign-installer" steps failing with error updating to TUF remote mirror: invalid key#3350
#3355
Copy link
Labels
status:triageIssue that has not been triagedtype:bugSomething isn't working

Description

@jkreileder
jkreileder
opened on Mar 19, 2024
Issue body actions

The "Generate builder" and "Run sigstore/cosign-installer" steps have started failing for my workflows. This used to work fine, not sure if it is just an intermittent error or something more fundamental:

Here's a build that worked 18 hours ago but is failing now (i.e. without any code changes): https://github.com/jkreileder/cf-ips-to-hcloud-fw/actions/runs/8339143012 (corresponding workflow)

  1. Generate builder error:
Verifying artifact slsa-generator-container-linux-amd64: FAILED: error retrieving Rekor public keys: updating local metadata and targets: error updating to TUF remote mirror: invalid key
remote status:{
	"mirror": "https://tuf-repo-cdn.sigstore.dev/",
	"metadata": {
		"root.json": {
			"version": 9,
			"len": 6766,
			"expiration": "12 Sep 24 06:53 UTC",
			"error": ""
		},
		"snapshot.json": {
			"version": 132,
			"len": 2302,
			"expiration": "09 Apr 24 16:16 UTC",
			"error": ""
		},
		"targets.json": {
			"version": 9,
			"len": 5478,
			"expiration": "12 Sep 24 06:13 UTC",
			"error": ""
		},
		"timestamp.json": {
			"version": 169,
			"len": 723,
			"expiration": "26 Mar 24 16:16 UTC",
			"error": ""
		}
	}
}

FAILED: SLSA verification failed: error retrieving Rekor public keys: updating local metadata and targets: error updating to TUF remote mirror: invalid key
remote status:{
	"mirror": "https://tuf-repo-cdn.sigstore.dev/",
	"metadata": {
		"root.json": {
			"version": 9,
			"len": 6766,
			"expiration": "12 Sep 24 06:53 UTC",
			"error": ""
		},
		"snapshot.json": {
			"version": 132,
			"len": 2302,
			"expiration": "09 Apr 24 16:16 UTC",
			"error": ""
		},
		"targets.json": {
			"version": 9,
			"len": 5478,
			"expiration": "12 Sep 24 06:13 UTC",
			"error": ""
		},
		"timestamp.json": {
			"version": 169,
			"len": 723,
			"expiration": "26 Mar 24 16:16 UTC",
			"error": ""
		}
	}
}
Error: Process completed with exit code 6.
  1. Run sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 error:
Error: getting ctlog public keys: updating local metadata and targets: error updating to TUF remote mirror: invalid key
remote status:{
	"mirror": "https://tuf-repo-cdn.sigstore.dev/",
	"metadata": {
		"root.json": {
			"version": 9,
			"len": 6766,
			"expiration": "12 Sep 24 06:53 UTC",
			"error": ""
		},
		"snapshot.json": {
			"version": 132,
			"len": 2302,
			"expiration": "09 Apr 24 16:16 UTC",
			"error": ""
		},
		"targets.json": {
			"version": 9,
			"len": 5478,
			"expiration": "12 Sep 24 06:13 UTC",
			"error": ""
		},
		"timestamp.json": {
			"version": 169,
			"len": 723,
			"expiration": "26 Mar 24 16:16 UTC",
			"error": ""
		}
	}
}
main.go:74: error during command execution: getting ctlog public keys: updating local metadata and targets: error updating to TUF remote mirror: invalid key
remote status:{
	"mirror": "https://tuf-repo-cdn.sigstore.dev/",
	"metadata": {
		"root.json": {
			"version": 9,
			"len": 6766,
			"expiration": "12 Sep 24 06:53 UTC",
			"error": ""
		},
		"snapshot.json": {
			"version": 132,
			"len": 2302,
			"expiration": "09 Apr 24 16:16 UTC",
			"error": ""
		},
		"targets.json": {
			"version": 9,
			"len": 5478,
			"expiration": "12 Sep 24 06:13 UTC",
			"error": ""
		},
		"timestamp.json": {
			"version": 169,
			"len": 723,
			"expiration": "26 Mar 24 16:16 UTC",
			"error": ""
		}
	}
}
Error: Process completed with exit code 1.
Reacted by Sai Tirumerla, Behnaz Hassanshahi, Shunsuke Suzuki, laurentsimon and Sam Gammon

Activity

Next
  1. jkreileder
    added
    status:triageIssue that has not been triaged
    type:bugSomething isn't working
    on Mar 19, 2024
  2. tirumerla commented on Mar 19, 2024

    @tirumerla
    tirumerla
    on Mar 19, 2024
    Contributor
    More actions

    Started seeing the same just now.

  3. brad-getpassport commented on Mar 19, 2024

    @brad-getpassport
    brad-getpassport
    on Mar 19, 2024
    More actions

    +1 Seeing this across all our builds in the last 2 hours... this is holding up our release candidate...

    Generating ephemeral keys...
    Retrieving signed certificate...
    creating signer: getting signer: getting key from Fulcio: getting CTFE public keys: updating local metadata and targets: error updating to TUF remote mirror: invalid key
    remote status:{
    	"mirror": "https://tuf-repo-cdn.sigstore.dev/",
    	"metadata": {
    		"root.json": {
    			"version": 9,
    			"len": 6766,
    			"expiration": "12 Sep 24 06:53 UTC",
    			"error": ""
    		},
    		"snapshot.json": {
    			"version": 132,
    			"len": 2302,
    			"expiration": "09 Apr 24 16:16 UTC",
    			"error": ""
    		},
    		"targets.json": {
    			"version": 9,
    			"len": 5478,
    			"expiration": "12 Sep 24 06:13 UTC",
    			"error": ""
    		},
    		"timestamp.json": {
    			"version": 169,
    			"len": 723,
    			"expiration": "26 Mar 24 16:16 UTC",
    			"error": ""
    		}
    	}
    }
    Error: Process completed with exit code 1.
    
  4. jenstroeger commented on Mar 20, 2024

    @jenstroeger
    jenstroeger
    on Mar 20, 2024
    More actions

    ‼️ @ianlewis @laurentsimon please advise! This is breaking all our build pipelines, and talking with folks their pipelines are also dead in the water ‼️

  5. Hayden-IO commented on Mar 20, 2024

    @Hayden-IO
    Hayden-IO
    on Mar 20, 2024
    Collaborator
    More actions

    @laurentsimon @ianlewis You just need to bump Cosign to at least v2.2.0, latest is v2.2.3.

    I'd also recommend checking your renovate settings, I would have expected this bump to get picked up automatically.

  6. Hayden-IO
    added a commit that references this issue on Mar 20, 2024

    Bump Cosign to latest v2.2.3

    744e063
  7. behnazh-w commented on Mar 20, 2024

    @behnazh-w
    behnazh-w
    on Mar 20, 2024
    Contributor
    More actions

    @haydentherapper Cosign in SLSA Verifier needs to be updated to the latest version as well.

  8. suzuki-shunsuke commented on Mar 20, 2024

    @suzuki-shunsuke
    suzuki-shunsuke
    on Mar 20, 2024
    Contributor
    More actions

    haydentherapper Cosign in SLSA Verifier needs to be updated to the latest version as well.

    According to the announcement, v2.2.0 should support a new TUF Trust root, so I don't think we need to update Cosign in SLSA Verifier.

  9. suzuki-shunsuke commented on Mar 20, 2024

    @suzuki-shunsuke
    suzuki-shunsuke
    on Mar 20, 2024
    Contributor
    More actions

    I see. The latest slsa-github-generato v1.9.0 uses the old slsa-verifier which uses the old cosign v2.0.2

    slsa-github-generator/.github/actions/generate-builder/action.yml

    Line 95 in 07e64b6

    VERIFIER_RELEASE: v2.3.0 # The version of the verifier to download.

    https://github.com/slsa-framework/slsa-verifier/blob/c9abffe4d2ab2ffa0b2ea9b2582b84164f390adc/go.mod#L21

    The main branch uses the latest slsa-verifier v2.4.1.

    slsa-github-generator/.github/actions/generate-builder/action.yml

    Line 95 in b595e06

    VERIFIER_RELEASE: v2.4.1 # The version of the verifier to download.

    So we need to release a new version of slsa-github-generator, then the issue would be solved.

  10. suzuki-shunsuke commented on Mar 20, 2024

    @suzuki-shunsuke
    suzuki-shunsuke
    on Mar 20, 2024
    Contributor
    More actions

    @laurentsimon @ianlewis
    I'm sorry to bother you, but could you release a new version of slsa-github-generator to solve this issue?
    #3350 (comment)

    Reacted by laurentsimon
  11. laurentsimon commented on Mar 20, 2024

    @laurentsimon
    laurentsimon
    on Mar 20, 2024
    Collaborator
    More actions

    Hi, yes let's do that. I think we need to revert a few breaking PRs we made recently in the slsa-github-generator. slsa-verifier should be ready to be released. @ramonpetgrave64 could you send PRs to temporarily revert the few breaking PRs we made recently?

    Reacted by Shunsuke Suzuki
  12. laurentsimon commented on Mar 20, 2024

    @laurentsimon
    laurentsimon
    on Mar 20, 2024
    Collaborator
    More actions

    Note: slsa-verifier's latest version uses cosign 2.2.0 https://github.com/slsa-framework/slsa-verifier/blob/v2.4.1/go.mod so need not be updated.

  13. laurentsimon
    closed this as completedin #3355on Mar 20, 2024
  14. laurentsimon
    added a commit that references this issue on Mar 20, 2024

    fix: Bump Cosign to latest v2.2.3 (#3355)

    1fee7c6
  15. 12 remaining items

  16. ddworken commented on Mar 24, 2024

    @ddworken
    ddworken
    on Mar 24, 2024
    Contributor
    More actions

    The issue is that the old version of slsa-verifier isn't able to verify releases that were formerly valid. My project uses SLSA for releases and secure updates. I have daily tests running on Github Actions and it went from passing to failing in line with this bug:

    Screenshot 2024-03-24 at 4 03 42 PM

    You can see the test failure here. I also confirmed that this appears to apply to the main slsa-verifier binary, so this can easily be reproduced:

    # From inside of the slsa-verifier git repo
    # Check out the old version of slsa-verifier
    git checkout v1.3.2
    # Download a file and an old attestation
    wget https://github.com/ddworken/hishtory/releases/download/v0.277/hishtory-linux-amd64
    wget https://github.com/ddworken/hishtory/releases/download/v0.277/hishtory-linux-amd64.intoto.jsonl
    # Run slsa-verifier
    go run ./cli/slsa-verifier -artifact-path hishtory-linux-amd64 -provenance hishtory-linux-amd64.intoto.jsonl -source github.com/ddworken/hishtory
    

    This fails with the output:

    slsa-verifier output
    Getting rekor entry error error verifying tlog entry: updating local metadata and targets: error updating to TUF remote mirror: invalid key
    remote status:{
    	"mirror": "https://sigstore-tuf-root.storage.googleapis.com",
    	"metadata": {
    		"root.json": {
    			"version": 9,
    			"len": 6766,
    			"expiration": "12 Sep 24 06:53 UTC",
    			"error": ""
    		},
    		"snapshot.json": {
    			"version": 132,
    			"len": 2302,
    			"expiration": "09 Apr 24 16:16 UTC",
    			"error": ""
    		},
    		"targets.json": {
    			"version": 9,
    			"len": 5478,
    			"expiration": "12 Sep 24 06:13 UTC",
    			"error": ""
    		},
    		"timestamp.json": {
    			"version": 170,
    			"len": 721,
    			"expiration": "29 Mar 24 16:08 UTC",
    			"error": ""
    		}
    	}
    }: unable to fetch Rekor public keys from TUF repository, trying Redis search index to find entries by subject digest
    FAILED: SLSA verification failed: could not find a matching valid signature entry: got unexpected errors updating local metadata and targets: error updating to TUF remote mirror: invalid key
    remote status:{
    	"mirror": "https://sigstore-tuf-root.storage.googleapis.com",
    	"metadata": {
    		"root.json": {
    			"version": 9,
    			"len": 6766,
    			"expiration": "12 Sep 24 06:53 UTC",
    			"error": ""
    		},
    		"snapshot.json": {
    			"version": 132,
    			"len": 2302,
    			"expiration": "09 Apr 24 16:16 UTC",
    			"error": ""
    		},
    		"targets.json": {
    			"version": 9,
    			"len": 5478,
    			"expiration": "12 Sep 24 06:13 UTC",
    			"error": ""
    		},
    		"timestamp.json": {
    			"version": 170,
    			"len": 721,
    			"expiration": "29 Mar 24 16:08 UTC",
    			"error": ""
    		}
    	}
    }: unable to fetch Rekor public keys from TUF repository: verifying tlog entry 24296fb24b8ad77a614df024f5e997739525746b275409b28df6a6b7285c7128f4f8e429a5cb1e42, updating local metadata and targets: error updating to TUF remote mirror: invalid key
    remote status:{
    	"mirror": "https://sigstore-tuf-root.storage.googleapis.com",
    	"metadata": {
    		"root.json": {
    			"version": 9,
    			"len": 6766,
    			"expiration": "12 Sep 24 06:53 UTC",
    			"error": ""
    		},
    		"snapshot.json": {
    			"version": 132,
    			"len": 2302,
    			"expiration": "09 Apr 24 16:16 UTC",
    			"error": ""
    		},
    		"targets.json": {
    			"version": 9,
    			"len": 5478,
    			"expiration": "12 Sep 24 06:13 UTC",
    			"error": ""
    		},
    		"timestamp.json": {
    			"version": 170,
    			"len": 721,
    			"expiration": "29 Mar 24 16:08 UTC",
    			"error": ""
    		}
    	}
    }: unable to fetch Rekor public keys from TUF repository: verifying tlog entry 24296fb24b8ad77af7d9a9a7dbb2e7c25c5d46e41770969259f3d72fd20f0016bd5b1a54229bcbba
    exit status 2
    

    So it seems to me that slsa-verifier is now failing to verify attestations that used to pass. It is true that the latest version of slsa-verifier is able to verify old attestations, but this doesn't seem to help anyone who is stuck with an old version of slsa-verifier.

    Why do you need to use an old version of slsa-verifier?

    This is because my project embeds slsa-verifier in order to provide secure updates. So when slsa-verifier suddenly breaks in this way, it means that any clients with the old version of slsa-verifier become effectively stranded since they cannot upgrade to new versions.

  17. Hayden-IO commented on Mar 24, 2024

    @Hayden-IO
    Hayden-IO
    on Mar 24, 2024
    Collaborator
    More actions

    Probably unrelated to this issue but what is the Sigstore/Cosign solution for revoked root keys and in general how does Sigstore provide backward compatibility with old versions of certificates, and therefore verifying existing legitimate provenances that were signed with revoked keys?

    @behnazh-w Supporting validity windows was the motivation behind the design of the trust root spec. For each root of trust, a validity time period is specified. If a compromise were to occur, rather than revoking the root material entirely and assuming we can determine the window when compromise occurred, the root material would simply be specified as valid only up to the compromise.

    All Sigstore clients (eg sigstore-python, js, etc) but Cosign support ingesting the roots of trust in this format currently. Cosign will be updated to read it soon.

    Reacted by Behnaz Hassanshahi
  18. laurentsimon commented on Mar 25, 2024

    @laurentsimon
    laurentsimon
    on Mar 25, 2024
    Collaborator
    More actions

    So it seems to me that slsa-verifier is now failing to verify attestations that used to pass. It is true that the latest version of slsa-verifier is able to verify old attestations, but this doesn't seem to help anyone who is stuck with an old version of slsa-verifier.

    You're correct. The TUF root updates need an update of slsa-verifier to v2.4.1. We could backport the fixes, but it would still require you to update your slsa-verifier version.

  19. ddworken commented on Mar 26, 2024

    @ddworken
    ddworken
    on Mar 26, 2024
    Contributor
    More actions

    So it seems to me that slsa-verifier is now failing to verify attestations that used to pass. It is true that the latest version of slsa-verifier is able to verify old attestations, but this doesn't seem to help anyone who is stuck with an old version of slsa-verifier.

    You're correct. The TUF root updates need an update of slsa-verifier to v2.4.1. We could backport the fixes, but it would still require you to update your slsa-verifier version.

    Got it, thanks for confirming! I'm wondering: Is this class of breakage something you expect to continue to need to happen with slsa-verifier? If so, it seems like this may be an important caveat to document (maybe under the "Known Isssues" heading) since having a previously working verifier continue to work seems like a reasonable expectation.

  20. laurentsimon commented on Mar 26, 2024

    @laurentsimon
    laurentsimon
    on Mar 26, 2024
    Collaborator
    More actions

    We don't expect this to happen. @haydentherapper can comment on the specifics of cosign.

    Reacted by David Dworken
  21. Hayden-IO commented on Mar 26, 2024

    @Hayden-IO
    Hayden-IO
    on Mar 26, 2024
    Collaborator
    More actions

    Breaking changes are not something that is going to happen frequently and if they do, there will be a significant period of time to have clients migrate over.

    Reacted by Jürgen Kreileder and David Dworken
  22. V0ldek
    added a commit that references this issue on Mar 28, 2024

    Update release.yml

    dbc6f84
  23. rsoberano-ld
    added 4 commits that reference this issue on Apr 2, 2024

    build: bumping slsa-github-generator version to resolve issue with re…

    03449b3

    build: bumping slsa-github-generator version to resolve issue with re…

    6f6597c

    build: bumping slsa-github-generator version to resolve issue with re…

    0a0bee1

    build: bumping slsa-github-generator version to resolve issue with re…

    95d7792
  24. argonui
    added a commit that references this issue on Aug 5, 2024

    Update go-ossf-slsa3-publish.yml

    2758ec6
  25. ddworken
    added a commit that references this issue on Aug 18, 2024

    Upgrade SLSA releaser due to github.com/slsa-framework/slsa-github-ge…

    4c66c42
  26. ddworken
    added a commit that references this issue on Aug 26, 2024

    Optimize imports for extremely large history sizes for #168 (#171)

    8cd1bae
  27. bmflynn
    added a commit that references this issue on Oct 4, 2024

    ci: update slsa-releaser; require go 1.20

    81857ac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:triageIssue that has not been triagedtype:bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.