Skip to content

Conversation

jku
Copy link
Member

@jku jku commented Feb 10, 2025

  • Add make update-embedded-root rule
  • Add workflow that files an issue if root is not up-to-date

I'm not sure if the workflow is really needed but I decided to include it. I think automatically making a PR might be a bad idea (since there are no test suite tests for this we'd be trusting CI 100% and that doesn't sound right in this case).


Makefile rule uses the "plumbing" command to ensure the newest root has been downloaded and verified. Then it copies the newest TUF root and the trusted_root.json into the sources. The benefit here is that one does not need to manually find the cache directories when an update should be done.

Makefile rule hard codes XDG_DATA_HOME and XDG_CACHE_HOME for simplicity.

The workflow adds a new CI-dependency (github-script) but I believe the currently used actions do not provide the capabilities needed here.

I've created the "embedded-root-update" label manually in this project already so this should just work.

jku added 2 commits February 14, 2025 11:24
This uses the "plumbing" command to ensure the newest root has been
downloaded and verified. Then it copies the newest TUF root and the
trusted_root.json into the sources. The benefit here is that one does
not need to manually find the cache directories when an update should
be done.

This hard codes XDG_DATA_HOME and XDG_CACHE_HOME for simplicity.

We could later add a workflow that runs this on cron and files an
issue if the sources changed as a result.

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
Creates a new issue once a week if
* the embedded TUF root (or trusted_root.json) differs from the
  current one served by root-signing
* and there is no open issue with same label already

This does add a new CI-dependency (github-script) but I believe the
currently used actions do not provide the capabilities needed here.

The "embedded-root-update" label likely needs to be created by a
maintainer manually.

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
@jku jku force-pushed the add-make-rule-for-tuf-root-update branch from 361859f to 3bfc067 Compare February 14, 2025 09:24
@jku jku marked this pull request as ready for review February 14, 2025 09:24
Comment on lines +34 to +36
- if: failure()
name: Create an issue if embedded root is not up-to-date
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're also using peter-evans/create-issue-from-file for this in the staging-tests.yml workflow, although I like this approach better, especially since it avoids duplicate issue filing!

Copy link
Member

@woodruffw woodruffw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @jku! For full generality I suppose we could also override the XDG vars and do this in a scratch directory, but I'm also content with leaving it as is 🙂

Copy link
Member

@woodruffw woodruffw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @jku! For full generality I suppose we could also override the XDG vars and do this in a scratch directory, but I'm also content with leaving it as is 🙂

@woodruffw woodruffw merged commit 988af30 into sigstore:main Feb 14, 2025
23 checks passed
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.

2 participants