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

Function BuildMockResult

pkg/cmd/attestation/verification/mock_verifier.go:68–89  ·  view source on GitHub ↗
(b *bundle.Bundle, buildConfigURI, buildSignerURI, sourceRepoOwnerURI, sourceRepoURI, issuer string)

Source from the content-addressed store, hash-verified

66}
67
68func BuildMockResult(b *bundle.Bundle, buildConfigURI, buildSignerURI, sourceRepoOwnerURI, sourceRepoURI, issuer string) AttestationProcessingResult {
69 statement := &in_toto.Statement{}
70 statement.PredicateType = SLSAPredicateV1
71
72 return AttestationProcessingResult{
73 Attestation: &api.Attestation{
74 Bundle: b,
75 },
76 VerificationResult: &verify.VerificationResult{
77 Statement: statement,
78 Signature: &verify.SignatureVerificationResult{
79 Certificate: &certificate.Summary{
80 BuildConfigURI: buildConfigURI,
81 BuildSignerURI: buildSignerURI,
82 Issuer: issuer,
83 SourceRepositoryOwnerURI: sourceRepoOwnerURI,
84 SourceRepositoryURI: sourceRepoURI,
85 },
86 },
87 },
88 }
89}
90
91func BuildSigstoreJsMockResult(t *testing.T) AttestationProcessingResult {
92 bundle := data.SigstoreBundle(t)

Callers 2

TestVerifyAttestationsFunction · 0.92

Calls

no outgoing calls

Tested by 1

TestVerifyAttestationsFunction · 0.74