1// Copyright 2019 The Grafeas Authors. All rights reserved. 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package grafeas.v1; 18 19import "grafeas/v1/intoto_provenance.proto"; 20import "grafeas/v1/intoto_statement.proto"; 21import "grafeas/v1/provenance.proto"; 22 23option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; 24option java_multiple_files = true; 25option java_package = "io.grafeas.v1"; 26option objc_class_prefix = "GRA"; 27 28// Note holding the version of the provider's builder and the signature of the 29// provenance message in the build details occurrence. 30message BuildNote { 31 // Required. Immutable. Version of the builder which produced this build. 32 string builder_version = 1; 33} 34 35// Details of a build occurrence. 36message BuildOccurrence { 37 // The actual provenance for the build. 38 grafeas.v1.BuildProvenance provenance = 1; 39 40 // Serialized JSON representation of the provenance, used in generating the 41 // build signature in the corresponding build note. After verifying the 42 // signature, `provenance_bytes` can be unmarshalled and compared to the 43 // provenance to confirm that it is unchanged. A base64-encoded string 44 // representation of the provenance bytes is used for the signature in order 45 // to interoperate with openssl which expects this format for signature 46 // verification. 47 // 48 // The serialized form is captured both to avoid ambiguity in how the 49 // provenance is marshalled to json as well to prevent incompatibilities with 50 // future changes. 51 string provenance_bytes = 2; 52 53 // Deprecated. See InTotoStatement for the replacement. 54 // In-toto Provenance representation as defined in spec. 55 InTotoProvenance intoto_provenance = 3; 56 57 // In-toto Statement representation as defined in spec. 58 // The intoto_statement can contain any type of provenance. The serialized 59 // payload of the statement can be stored and signed in the Occurrence's 60 // envelope. 61 InTotoStatement intoto_statement = 4; 62} 63