1*d5c09012SAndroid Build Coastguard Worker// Copyright 2023 The Grafeas Authors. All rights reserved. 2*d5c09012SAndroid Build Coastguard Worker// 3*d5c09012SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License"); 4*d5c09012SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License. 5*d5c09012SAndroid Build Coastguard Worker// You may obtain a copy of the License at 6*d5c09012SAndroid Build Coastguard Worker// 7*d5c09012SAndroid Build Coastguard Worker// http://www.apache.org/licenses/LICENSE-2.0 8*d5c09012SAndroid Build Coastguard Worker// 9*d5c09012SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software 10*d5c09012SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS, 11*d5c09012SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12*d5c09012SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and 13*d5c09012SAndroid Build Coastguard Worker// limitations under the License. 14*d5c09012SAndroid Build Coastguard Worker 15*d5c09012SAndroid Build Coastguard Workersyntax = "proto3"; 16*d5c09012SAndroid Build Coastguard Worker 17*d5c09012SAndroid Build Coastguard Workerpackage grafeas.v1; 18*d5c09012SAndroid Build Coastguard Worker 19*d5c09012SAndroid Build Coastguard Workerimport "grafeas/v1/common.proto"; 20*d5c09012SAndroid Build Coastguard Workerimport "grafeas/v1/intoto_statement.proto"; 21*d5c09012SAndroid Build Coastguard Worker 22*d5c09012SAndroid Build Coastguard Workeroption go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; 23*d5c09012SAndroid Build Coastguard Workeroption java_multiple_files = true; 24*d5c09012SAndroid Build Coastguard Workeroption java_package = "io.grafeas.v1"; 25*d5c09012SAndroid Build Coastguard Workeroption objc_class_prefix = "GRA"; 26*d5c09012SAndroid Build Coastguard Worker 27*d5c09012SAndroid Build Coastguard Worker// The note representing an SBOM reference. 28*d5c09012SAndroid Build Coastguard Workermessage SBOMReferenceNote { 29*d5c09012SAndroid Build Coastguard Worker // The format that SBOM takes. E.g. may be spdx, cyclonedx, etc... 30*d5c09012SAndroid Build Coastguard Worker string format = 1; 31*d5c09012SAndroid Build Coastguard Worker // The version of the format that the SBOM takes. E.g. if the format 32*d5c09012SAndroid Build Coastguard Worker // is spdx, the version may be 2.3. 33*d5c09012SAndroid Build Coastguard Worker string version = 2; 34*d5c09012SAndroid Build Coastguard Worker} 35*d5c09012SAndroid Build Coastguard Worker 36*d5c09012SAndroid Build Coastguard Worker// The occurrence representing an SBOM reference as applied to a specific 37*d5c09012SAndroid Build Coastguard Worker// resource. The occurrence follows the DSSE specification. See 38*d5c09012SAndroid Build Coastguard Worker// https://github.com/secure-systems-lab/dsse/blob/master/envelope.md for more 39*d5c09012SAndroid Build Coastguard Worker// details. 40*d5c09012SAndroid Build Coastguard Workermessage SBOMReferenceOccurrence { 41*d5c09012SAndroid Build Coastguard Worker // The actual payload that contains the SBOM reference data. 42*d5c09012SAndroid Build Coastguard Worker SbomReferenceIntotoPayload payload = 1; 43*d5c09012SAndroid Build Coastguard Worker // The kind of payload that SbomReferenceIntotoPayload takes. Since it's in 44*d5c09012SAndroid Build Coastguard Worker // the intoto format, this value is expected to be 45*d5c09012SAndroid Build Coastguard Worker // 'application/vnd.in-toto+json'. 46*d5c09012SAndroid Build Coastguard Worker string payload_type = 2; 47*d5c09012SAndroid Build Coastguard Worker // The signatures over the payload. 48*d5c09012SAndroid Build Coastguard Worker repeated EnvelopeSignature signatures = 3; 49*d5c09012SAndroid Build Coastguard Worker} 50*d5c09012SAndroid Build Coastguard Worker 51*d5c09012SAndroid Build Coastguard Worker// The actual payload that contains the SBOM Reference data. 52*d5c09012SAndroid Build Coastguard Worker// The payload follows the intoto statement specification. See 53*d5c09012SAndroid Build Coastguard Worker// https://github.com/in-toto/attestation/blob/main/spec/v1.0/statement.md 54*d5c09012SAndroid Build Coastguard Worker// for more details. 55*d5c09012SAndroid Build Coastguard Workermessage SbomReferenceIntotoPayload { 56*d5c09012SAndroid Build Coastguard Worker // Identifier for the schema of the Statement. 57*d5c09012SAndroid Build Coastguard Worker string type = 1 [json_name = "_type"]; 58*d5c09012SAndroid Build Coastguard Worker // URI identifying the type of the Predicate. 59*d5c09012SAndroid Build Coastguard Worker string predicate_type = 2; 60*d5c09012SAndroid Build Coastguard Worker // Set of software artifacts that the attestation applies to. Each element 61*d5c09012SAndroid Build Coastguard Worker // represents a single software artifact. 62*d5c09012SAndroid Build Coastguard Worker repeated Subject subject = 3; 63*d5c09012SAndroid Build Coastguard Worker // Additional parameters of the Predicate. Includes the actual data about the 64*d5c09012SAndroid Build Coastguard Worker // SBOM. 65*d5c09012SAndroid Build Coastguard Worker SbomReferenceIntotoPredicate predicate = 4; 66*d5c09012SAndroid Build Coastguard Worker} 67*d5c09012SAndroid Build Coastguard Worker 68*d5c09012SAndroid Build Coastguard Worker// A predicate which describes the SBOM being referenced. 69*d5c09012SAndroid Build Coastguard Workermessage SbomReferenceIntotoPredicate { 70*d5c09012SAndroid Build Coastguard Worker // The person or system referring this predicate to the consumer. 71*d5c09012SAndroid Build Coastguard Worker string referrer_id = 1; 72*d5c09012SAndroid Build Coastguard Worker // The location of the SBOM. 73*d5c09012SAndroid Build Coastguard Worker string location = 2; 74*d5c09012SAndroid Build Coastguard Worker // The mime type of the SBOM. 75*d5c09012SAndroid Build Coastguard Worker string mime_type = 3; 76*d5c09012SAndroid Build Coastguard Worker // A map of algorithm to digest of the contents of the SBOM. 77*d5c09012SAndroid Build Coastguard Worker map<string, string> digest = 4; 78*d5c09012SAndroid Build Coastguard Worker} 79