-
Notifications
You must be signed in to change notification settings - Fork 27
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
Fetch Sigstore trust root through TUF #605
Comments
To clarify, are you referring to this sort of workflow?
|
I should probably delete that section, I would not recommend using the TUF client directly. Instead I'd recommend the Sigstore TUF client linked above, as it handles both the TUF verification and extracting the relevant Sigstore metadata. See https://github.com/sigstore/sigstore-go/blob/main/cmd/sigstore-go/main.go#L126-L187. |
Gotcha. So something like: client, err := tuf.DefaultClient()
if err != nil {
return err
}
trustedRootJSON, err := client.GetTarget("trusted_root.json")
if err != nil {
return err
}
trustedRoot, err := root.NewTrustedRootFromJSON(trustedRootJSON)
if err != nil {
return err
}
ca := trustedRoot.FulcioCertificateAuthorities()
for _, c := range ca {
log.Println(c.Root)
for _, intermediate := range c.Intermediates {
log.Println(intermediate)
}
} |
Exactly! And |
Looking at https://github.com/ossf/scorecard-webapp/tree/f55dfbf0ddc1620a716f571636569e01e2e222c5/app/server, it appears that the Sigstore trust root metadata,
rekor.pub
andfulcio_v1.crt
and the intermediate, are embedded in the repository. If the metadata were rotated, this would break verification.I would recommend dynamically fetching the TUF metadata using a TUF client such as https://github.com/sigstore/sigstore-go/blob/main/pkg/tuf/client.go.
The text was updated successfully, but these errors were encountered: