Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: check root metadata verification before snapshotting #293

Merged

Conversation

asraa
Copy link
Contributor

@asraa asraa commented May 17, 2022

Signed-off-by: Asra Ali asraa@google.com

Details in #292
See sigstore/root-signing#238

Because root.json is not pinned in snapshot.json, it's metadata is not verified before Snapshotting. For robustness, we should verify the root.json is signed correctly, because we're using DB role data from root to verify other manifests that are pinned, e.g. targets.

I'm open to having this just be a warning, because I don't see this mentioned in the spec, but overall repo management lacks in the spec.

Please fill in the fields below to submit a pull request. The more information that is provided, the better.

Fixes #
Release Notes:

* bug fix: Check root.json validity before snapshotting

Types of changes:

  • [ x ] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Description of the changes being introduced by the pull request:

Please verify and check that the pull request fulfills the following requirements:

  • Tests have been added for the bug fix or new feature
  • Docs have been added for the bug fix or new feature

Signed-off-by: Asra Ali <asraa@google.com>
@asraa asraa changed the title Repo: Check root metadata verification before snapshotting fix: check root metadata verification before snapshotting May 17, 2022
@znewman01 znewman01 self-requested a review May 17, 2022 21:01
@JustinCappos
Copy link
Member

JustinCappos commented May 19, 2022 via email

@JustinCappos
Copy link
Member

JustinCappos commented May 19, 2022 via email

@joshuagl
Copy link
Member

I'm open to having the specification make it clear that one should re-validate the root and the current snapshot key before signing a new snapshot.

Indeed, we should probably add sections on generating snapshot, timestamp, and root metadata to the repository operations section of the spec, it currently only describes adding and updating targets.

@asraa
Copy link
Contributor Author

asraa commented May 19, 2022

Indeed, we should probably add sections on generating snapshot, timestamp, and root metadata to the repository operations section of the spec, it currently only describes adding and updating targets.

I can open up a specification PR to add some words on updating snapshot!

If I remember other valuable repo operation stuff, will add too.

@asraa asraa requested a review from mnm678 May 19, 2022 15:14
@rdimitrov rdimitrov merged commit 9a41055 into theupdateframework:master May 25, 2022
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.

Snapshotting doesn't verify the root.json manifest.
5 participants