1// Copyright 2023 Google LLC 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 google.cloud.securitycenter.v1; 18 19option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; 20option go_package = "cloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb"; 21option java_multiple_files = true; 22option java_outer_classname = "FileProto"; 23option java_package = "com.google.cloud.securitycenter.v1"; 24option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; 25option ruby_package = "Google::Cloud::SecurityCenter::V1"; 26 27// File information about the related binary/library used by an executable, or 28// the script used by a script interpreter 29message File { 30 // Path of the file in terms of underlying disk/partition identifiers. 31 message DiskPath { 32 // UUID of the partition (format 33 // https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid) 34 string partition_uuid = 1; 35 36 // Relative path of the file in the partition as a JSON encoded string. 37 // Example: /home/user1/executable_file.sh 38 string relative_path = 2; 39 } 40 41 // Absolute path of the file as a JSON encoded string. 42 string path = 1; 43 44 // Size of the file in bytes. 45 int64 size = 2; 46 47 // SHA256 hash of the first hashed_size bytes of the file encoded as a 48 // hex string. If hashed_size == size, sha256 represents the SHA256 hash 49 // of the entire file. 50 string sha256 = 3; 51 52 // The length in bytes of the file prefix that was hashed. If 53 // hashed_size == size, any hashes reported represent the entire 54 // file. 55 int64 hashed_size = 4; 56 57 // True when the hash covers only a prefix of the file. 58 bool partially_hashed = 5; 59 60 // Prefix of the file contents as a JSON-encoded string. 61 string contents = 6; 62 63 // Path of the file in terms of underlying disk/partition identifiers. 64 DiskPath disk_path = 7; 65} 66