1// Copyright 2019 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5syntax = "proto2"; 6 7option optimize_for = LITE_RUNTIME; 8 9package safe_browsing; 10 11// Malware-specific scanning information. 12message MalwareDeepScanningClientRequest { 13 enum Population { 14 POPULATION_UNKNOWN = 0; 15 POPULATION_ENTERPRISE = 1; 16 POPULATION_TITANIUM = 2; 17 } 18 // Identifies the type of client. 19 optional Population population = 1; 20 21 reserved 2; 22} 23 24// DLP-specific scanning information. 25message DlpDeepScanningClientRequest { 26 // Where the content comes from, so that the proper rules can be triggered. 27 enum ContentSource { 28 CONTENT_SOURCE_UNKNOWN = 0; 29 FILE_DOWNLOAD = 1; 30 FILE_UPLOAD = 2; 31 WEB_CONTENT_UPLOAD = 3; 32 } 33 optional ContentSource content_source = 1; 34 35 // The URL containing the file download/upload or to which web content is 36 // being uploaded. 37 optional string url = 2; 38} 39 40// Scanning configuration sent from Chrome. 41message DeepScanningClientRequest { 42 // The DM Token for Enterprise-enrolled devices 43 optional string dm_token = 1; 44 45 // Firebase Cloud Messaging token used to notify client of verdict. 46 optional string fcm_notification_token = 2; 47 48 // Malware scan specific request info. 49 optional MalwareDeepScanningClientRequest malware_scan_request = 3; 50 51 // DLP scan specific request info. 52 optional DlpDeepScanningClientRequest dlp_scan_request = 4; 53 54 // Token used to correlate requests and responses. This is different than the 55 // FCM token, in that it is unique for each request. 56 optional string request_token = 5; 57 58 // Name of file on user system (if applicable). 59 optional string filename = 6; 60 61 // Sha256 digest of file. 62 optional string digest = 7; 63 64 // Server-side only field. 65 reserved 8; 66} 67 68// Malware-specific response given back for scanned content. 69message MalwareDeepScanningVerdict { 70 reserved 2; 71 72 enum Verdict { 73 VERDICT_UNSPECIFIED = 0; 74 CLEAN = 1; 75 UWS = 2; 76 MALWARE = 3; 77 SCAN_FAILURE = 4; 78 } 79 // Verdict given to scanned content. 80 optional Verdict verdict = 1; 81} 82 83message DlpDeepScanningVerdict { 84 // The status of the deep scanning verdict. When status is SUCCESS and 85 // triggered_rules below is empty, then the content is clean. 86 enum Status { 87 STATUS_UNKNOWN = 0; 88 SUCCESS = 1; 89 FAILURE = 2; 90 } 91 optional Status status = 1; 92 93 // Next ID: 4 94 message MatchedDetector { 95 // Unique identifier for this detector. 96 optional string detector_id = 1; 97 98 // Display name of this detector. 99 optional string display_name = 2; 100 101 // Type of this detector. 102 optional string detector_type = 3; 103 } 104 105 // Next ID: 7 106 message TriggeredRule { 107 enum Action { 108 ACTION_UNKNOWN = 0; 109 REPORT_ONLY = 1; 110 WARN = 2; 111 BLOCK = 3; 112 } 113 optional Action action = 1; 114 115 optional string rule_name = 2; 116 117 optional int64 rule_id = 3; 118 119 optional string rule_resource_name = 4; 120 121 optional string rule_severity = 5; 122 123 repeated MatchedDetector matched_detectors = 6; 124 } 125 // Only relevant when status is SUCCESS above. 126 repeated TriggeredRule triggered_rules = 2; 127} 128 129message DeepScanningClientResponse { 130 // Token used to correlate requests and responses. This is different than the 131 // FCM token, in that it is unique for each request. 132 optional string token = 1; 133 134 optional MalwareDeepScanningVerdict malware_scan_verdict = 2; 135 136 optional DlpDeepScanningVerdict dlp_scan_verdict = 3; 137} 138