MCPcopy Create free account
hub / github.com/cli/cli / newGitHubVerifierWithTrustedRoot

Function newGitHubVerifierWithTrustedRoot

pkg/cmd/attestation/verification/sigstore.go:362–369  ·  view source on GitHub ↗
(trustedRoot *root.TrustedRoot)

Source from the content-addressed store, hash-verified

360}
361
362func newGitHubVerifierWithTrustedRoot(trustedRoot *root.TrustedRoot) (*verify.Verifier, error) {
363 gv, err := verify.NewVerifier(trustedRoot, verify.WithSignedTimestamps(1))
364 if err != nil {
365 return nil, fmt.Errorf("failed to create GitHub verifier: %v", err)
366 }
367
368 return gv, nil
369}
370
371func newPublicGoodVerifier(tufMetadataDir o.Option[string], hc *http.Client) (*verify.Verifier, error) {
372 opts := DefaultOptionsWithCacheSetting(tufMetadataDir, hc)

Callers 2

createCustomVerifiersFunction · 0.85
newGitHubVerifierFunction · 0.85

Calls 1

ErrorfMethod · 0.65

Tested by

no test coverage detected