Skip to content

Import cosign_checksum.txt and parse with jq for cosign bootstrap env setup - #234

Open
eshattow wants to merge 1 commit into
sigstore:mainfrom
eshattow:importchecksums
Open

eshattow wants to merge 1 commit into
sigstore:mainfrom
eshattow:importchecksums

Conversation

@eshattow

@eshattow eshattow commented Apr 18, 2026

Copy link
Copy Markdown
Contributor

Streamline the cosign version bump process by importing cosign_checksum.txt as a heredoc, validate inputs with jq regex, and output variables.

Side-effect is this allows support for all OS and ARCHITECTURE releases published by upstream cosign. Adds a configuration JSON formatted snippet for env overrides on valid release filenames, by OS and ARCHITECTURE. If either OS or ARCHITECTURE are not matched in the configuration then assume to use ascii_downcase processed runner OS and runner ARCHITECTURE names to match within cosign_checksums.txt data.

Resolves: #228
Resolves: #233

@eshattow
eshattow marked this pull request as ready for review May 6, 2026 13:04
@eshattow

eshattow commented May 7, 2026

Copy link
Copy Markdown
Contributor Author

This PR does work as intended but it is more noisy on GitHub Actions logging output than desired, and I would like some advice what are the threat models we're addressing?

Why not just checkout cosign_checksums.txt asset at runtime, and query GitHub Actions API directly the sha256 sum of sigstore/cosign cosign_checksums.txt to include with cosign-installer release ?

In any event, I hope the jq strategy is interesting and useful.

…setup

Streamline the cosign version bump process by importing cosign_checksum.txt
as a heredoc, validate inputs with jq regex, and output variables.

Side-effect is this allows support for all OS and ARCHITECTURE releases
published by upstream cosign. Adds a configuration JSON formatted snippet
for env overrides on valid release filenames, by OS and ARCHITECTURE. If
either OS or ARCHITECTURE are not matched in the configuration then assume
to use ascii_downcase processed runner OS and runner ARCHITECTURE names to
match within cosign_checksums.txt data.

Signed-off-by: E Shattow <eshattow@users.noreply.github.com>
@eshattow
eshattow force-pushed the importchecksums branch from 5d640bf to e638f60 Compare May 7, 2026 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Import cosign_checksum.txt for cosign release checksum bootstrap Support RISC-V

1 participant