-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
Copy pathattestations.go
27 lines (23 loc) · 1006 Bytes
/
attestations.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright 2024 The go-github AUTHORS. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package github
import (
"encoding/json"
)
// Attestation represents an artifact attestation associated with a repository.
// The provided bundle can be used to verify the provenance of artifacts.
//
// https://docs.github.com/en/actions/security-for-github-actions/using-artifact-attestations/using-artifact-attestations-to-establish-provenance-for-builds
type Attestation struct {
// The attestation's Sigstore Bundle.
// Refer to the sigstore bundle specification for more info:
// https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto
Bundle json.RawMessage `json:"bundle"`
RepositoryID int64 `json:"repository_id"`
}
// AttestationsResponse represents a collection of artifact attestations.
type AttestationsResponse struct {
Attestations []*Attestation `json:"attestations"`
}