1*d5c09012SAndroid Build Coastguard Worker// Copyright 2021 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/severity.proto"; 20*d5c09012SAndroid Build Coastguard Worker 21*d5c09012SAndroid Build Coastguard Workeroption go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; 22*d5c09012SAndroid Build Coastguard Workeroption java_multiple_files = true; 23*d5c09012SAndroid Build Coastguard Workeroption java_package = "io.grafeas.v1"; 24*d5c09012SAndroid Build Coastguard Workeroption objc_class_prefix = "GRA"; 25*d5c09012SAndroid Build Coastguard Worker 26*d5c09012SAndroid Build Coastguard Workermessage ComplianceNote { 27*d5c09012SAndroid Build Coastguard Worker // The title that identifies this compliance check. 28*d5c09012SAndroid Build Coastguard Worker string title = 1; 29*d5c09012SAndroid Build Coastguard Worker // A description about this compliance check. 30*d5c09012SAndroid Build Coastguard Worker string description = 2; 31*d5c09012SAndroid Build Coastguard Worker // The OS and config versions the benchmark applies to. 32*d5c09012SAndroid Build Coastguard Worker repeated grafeas.v1.ComplianceVersion version = 3; 33*d5c09012SAndroid Build Coastguard Worker // A rationale for the existence of this compliance check. 34*d5c09012SAndroid Build Coastguard Worker string rationale = 4; 35*d5c09012SAndroid Build Coastguard Worker // A description of remediation steps if the compliance check fails. 36*d5c09012SAndroid Build Coastguard Worker string remediation = 5; 37*d5c09012SAndroid Build Coastguard Worker // A compliance check that is a CIS benchmark. 38*d5c09012SAndroid Build Coastguard Worker message CisBenchmark { 39*d5c09012SAndroid Build Coastguard Worker int32 profile_level = 1; 40*d5c09012SAndroid Build Coastguard Worker grafeas.v1.Severity severity = 2; 41*d5c09012SAndroid Build Coastguard Worker } 42*d5c09012SAndroid Build Coastguard Worker oneof compliance_type { 43*d5c09012SAndroid Build Coastguard Worker CisBenchmark cis_benchmark = 6; 44*d5c09012SAndroid Build Coastguard Worker } 45*d5c09012SAndroid Build Coastguard Worker // Serialized scan instructions with a predefined format. 46*d5c09012SAndroid Build Coastguard Worker bytes scan_instructions = 7; 47*d5c09012SAndroid Build Coastguard Worker // Potential impact of the suggested remediation 48*d5c09012SAndroid Build Coastguard Worker oneof potential_impact { 49*d5c09012SAndroid Build Coastguard Worker string impact = 8; 50*d5c09012SAndroid Build Coastguard Worker } 51*d5c09012SAndroid Build Coastguard Worker} 52*d5c09012SAndroid Build Coastguard Worker 53*d5c09012SAndroid Build Coastguard Worker// Describes the CIS benchmark version that is applicable to a given OS and 54*d5c09012SAndroid Build Coastguard Worker// os version. 55*d5c09012SAndroid Build Coastguard Workermessage ComplianceVersion { 56*d5c09012SAndroid Build Coastguard Worker // The CPE URI (https://cpe.mitre.org/specification/) this benchmark is 57*d5c09012SAndroid Build Coastguard Worker // applicable to. 58*d5c09012SAndroid Build Coastguard Worker string cpe_uri = 1; 59*d5c09012SAndroid Build Coastguard Worker // The name of the document that defines this benchmark, e.g. "CIS 60*d5c09012SAndroid Build Coastguard Worker // Container-Optimized OS". 61*d5c09012SAndroid Build Coastguard Worker string benchmark_document = 3; 62*d5c09012SAndroid Build Coastguard Worker // The version of the benchmark. This is set to the version of the OS-specific 63*d5c09012SAndroid Build Coastguard Worker // CIS document the benchmark is defined in. 64*d5c09012SAndroid Build Coastguard Worker string version = 2; 65*d5c09012SAndroid Build Coastguard Worker} 66*d5c09012SAndroid Build Coastguard Worker 67*d5c09012SAndroid Build Coastguard Worker// An indication that the compliance checks in the associated ComplianceNote 68*d5c09012SAndroid Build Coastguard Worker// were not satisfied for particular resources or a specified reason. 69*d5c09012SAndroid Build Coastguard Workermessage ComplianceOccurrence { 70*d5c09012SAndroid Build Coastguard Worker repeated NonCompliantFile non_compliant_files = 2; 71*d5c09012SAndroid Build Coastguard Worker string non_compliance_reason = 3; 72*d5c09012SAndroid Build Coastguard Worker} 73*d5c09012SAndroid Build Coastguard Worker 74*d5c09012SAndroid Build Coastguard Worker// Details about files that caused a compliance check to fail. 75*d5c09012SAndroid Build Coastguard Workermessage NonCompliantFile { 76*d5c09012SAndroid Build Coastguard Worker // display_command is a single command that can be used to display a list of 77*d5c09012SAndroid Build Coastguard Worker // non compliant files. When there is no such command, we can also iterate a 78*d5c09012SAndroid Build Coastguard Worker // list of non compliant file using 'path'. 79*d5c09012SAndroid Build Coastguard Worker 80*d5c09012SAndroid Build Coastguard Worker // Empty if `display_command` is set. 81*d5c09012SAndroid Build Coastguard Worker string path = 1; 82*d5c09012SAndroid Build Coastguard Worker // Command to display the non-compliant files. 83*d5c09012SAndroid Build Coastguard Worker string display_command = 2; 84*d5c09012SAndroid Build Coastguard Worker // Explains why a file is non compliant for a CIS check. 85*d5c09012SAndroid Build Coastguard Worker string reason = 3; 86*d5c09012SAndroid Build Coastguard Worker} 87