OLD | NEW |
| (Empty) |
1 // Copyright (c) 2012 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 // | |
5 // This proto file includes: | |
6 // (1) Client side phishing and malware detection request and response | |
7 // protocol buffers. Those protocol messages should be kept in sync | |
8 // with the server implementation. | |
9 // | |
10 // (2) Safe Browsing reporting protocol buffers. | |
11 // A ClientSafeBrowsingReportRequest is sent when a user opts-in to | |
12 // sending detailed threat reports from the safe browsing interstitial page. | |
13 // It is a list of Resource messages, which may contain the url of a | |
14 // resource such as the page in the address bar or any other resource | |
15 // that was loaded for this page. | |
16 // In addition to the url, a resource can contain HTTP request and response | |
17 // headers and bodies. | |
18 // | |
19 // If you want to change this protocol definition or you have questions | |
20 // regarding its format please contact chrome-anti-phishing@googlegroups.com. | |
21 | |
22 syntax = "proto2"; | |
23 | |
24 option optimize_for = LITE_RUNTIME; | |
25 | |
26 package safe_browsing; | |
27 | |
28 // Protocol buffer describing the Chrome user population of the user reporting | |
29 // data. | |
30 message ChromeUserPopulation { | |
31 enum UserPopulation { | |
32 UNKNOWN_USER_POPULATION = 0; | |
33 SAFE_BROWSING = 1; | |
34 EXTENDED_REPORTING = 2; | |
35 } | |
36 optional UserPopulation user_population = 1; | |
37 } | |
38 | |
39 message ClientPhishingRequest { | |
40 // URL that the client visited. The CGI parameters are stripped by the | |
41 // client. | |
42 optional string url = 1; | |
43 | |
44 // A 5-byte SHA-256 hash prefix of the URL. Before hashing the URL is | |
45 // canonicalized, converted to a suffix-prefix expression and broadened | |
46 // (www prefix is removed and everything past the last '/' is stripped). | |
47 // | |
48 // Marked OBSOLETE because the URL is sent for all users, making the hash | |
49 // prefix unnecessary. | |
50 optional bytes OBSOLETE_hash_prefix = 10; | |
51 | |
52 // Score that was computed on the client. Value is between 0.0 and 1.0. | |
53 // The larger the value the more likely the url is phishing. | |
54 required float client_score = 2; | |
55 | |
56 // Note: we're skipping tag 3 because it was previously used. | |
57 | |
58 // Is true if the features for this URL were classified as phishing. | |
59 // Currently, this will always be true for all client-phishing requests | |
60 // that are sent to the server. | |
61 optional bool is_phishing = 4; | |
62 | |
63 message Feature { | |
64 // Feature name. E.g., 'PageHasForms'. | |
65 required string name = 1; | |
66 | |
67 // Feature value is always in the range [0.0, 1.0]. Boolean features | |
68 // have value 1.0. | |
69 required double value = 2; | |
70 } | |
71 | |
72 // List of features that were extracted. Those are the features that were | |
73 // sent to the scorer and which resulted in client_score being computed. | |
74 repeated Feature feature_map = 5; | |
75 | |
76 // The version number of the model that was used to compute the client-score. | |
77 // Copied from ClientSideModel.version(). | |
78 optional int32 model_version = 6; | |
79 | |
80 // Field 7 is only used on the server. | |
81 | |
82 // List of features that are extracted in the client but are not used in the | |
83 // machine learning model. | |
84 repeated Feature non_model_feature_map = 8; | |
85 | |
86 // The referrer URL. This field might not be set, for example, in the case | |
87 // where the referrer uses HTTPs. | |
88 // OBSOLETE: Use feature 'Referrer=<referrer>' instead. | |
89 optional string OBSOLETE_referrer_url = 9; | |
90 | |
91 // Field 11 is only used on the server. | |
92 | |
93 // List of shingle hashes we extracted. | |
94 repeated uint32 shingle_hashes = 12 [packed = true]; | |
95 | |
96 // The model filename (basename) that was used by the client. | |
97 optional string model_filename = 13; | |
98 | |
99 // Population that the reporting user is part of. | |
100 optional ChromeUserPopulation population = 14; | |
101 } | |
102 | |
103 message ClientPhishingResponse { | |
104 required bool phishy = 1; | |
105 | |
106 // A list of SafeBrowsing host-suffix / path-prefix expressions that | |
107 // are whitelisted. The client must match the current top-level URL | |
108 // against these whitelisted expressions and only apply a positive | |
109 // phishing verdict above if the URL does not match any expression | |
110 // on this whitelist. The client must not cache these whitelisted | |
111 // expressions. This whitelist will be empty for the vast majority | |
112 // of the responses but might contain up to 100 entries in emergency | |
113 // situations. | |
114 // | |
115 // Marked OBSOLETE because the URL is sent for all users, so the server | |
116 // can do whitelist matching. | |
117 repeated string OBSOLETE_whitelist_expression = 2; | |
118 } | |
119 | |
120 message ClientMalwareRequest { | |
121 // URL that the client visited. The CGI parameters are stripped by the | |
122 // client. | |
123 required string url = 1; | |
124 | |
125 // Field 2 is deleted and no longer in use. | |
126 | |
127 // Field 3 is only used on the server. | |
128 | |
129 // The referrer URL. This field might not be set, for example, in the case | |
130 // where the referrer uses HTTPS. | |
131 optional string referrer_url = 4; | |
132 | |
133 // Field 5 and 6 are only used on the server. | |
134 | |
135 message UrlInfo { | |
136 required string ip = 1; | |
137 required string url = 2; | |
138 optional string method = 3; | |
139 optional string referrer = 4; | |
140 // Resource type, the int value is a direct cast from the Type enum | |
141 // of ResourceType class defined in //src/webkit/commom/resource_type.h | |
142 optional int32 resource_type = 5; | |
143 } | |
144 | |
145 // List of resource urls that match the malware IP list. | |
146 repeated UrlInfo bad_ip_url_info = 7; | |
147 | |
148 // Population that the reporting user is part of. | |
149 optional ChromeUserPopulation population = 9; | |
150 } | |
151 | |
152 // The message is used for client request to determine whether the provided URL | |
153 // is safe for the purposes of entering user credentials for logging in. | |
154 message LoginReputationClientRequest { | |
155 // The top level frame URL of the webpage that hosts the login form. | |
156 // The client will strip CGI parameters. | |
157 optional string page_url = 1; | |
158 | |
159 // Type for the request. | |
160 // It could be low reputation request or password reuse request. | |
161 enum TriggerType { | |
162 TRIGGER_TYPE_UNSPECIFIED = 0; | |
163 UNFAMILIAR_LOGIN_PAGE = 1; | |
164 PASSWORD_REUSE_EVENT = 2; | |
165 } | |
166 optional TriggerType trigger_type = 2; | |
167 | |
168 // The message contains features which can describe a frame. A frame can be | |
169 // a top level web page or an iframe. | |
170 message Frame { | |
171 // Id of a frame. The frame whose index = 0 is the top level web page. | |
172 optional int32 frame_index = 1; | |
173 | |
174 // Id of the parent frame. | |
175 optional int32 parent_frame_index = 2; | |
176 | |
177 // Url of the frame. If could be top level url (from web page) or url of | |
178 // the iframe. | |
179 optional string url = 3; | |
180 | |
181 // Whether the frame contains password field. | |
182 optional bool has_password_field = 4; | |
183 | |
184 // URLs transitions in reverse chronological order, i.e. the top level url | |
185 // or the url of the iframe comes first in the list. | |
186 repeated ReferrerChainEntry referrer_chain = 5; | |
187 | |
188 // The message contains features of a form. | |
189 message Form { | |
190 // Action url of the form. | |
191 optional string action_url = 1; | |
192 | |
193 // Whether the form contains password field. | |
194 optional bool has_password_field = 2; | |
195 } | |
196 | |
197 repeated Form forms = 6; | |
198 } | |
199 | |
200 repeated Frame frames = 3; | |
201 | |
202 // The message contains fields needed for a password reuse event. | |
203 message PasswordReuseEvent { | |
204 // Origins that the reused password had been used on. The origins are | |
205 // maintained by Chrome password manager. | |
206 // The field is filled in only when TriggerType is PASSWORD_REUSE_EVENT. | |
207 repeated string password_reused_original_origins = 1; | |
208 | |
209 // The frame that the password reuse is detected. | |
210 optional int32 frame_id = 2; | |
211 } | |
212 | |
213 optional PasswordReuseEvent password_reuse_event = 4; | |
214 | |
215 // The number of verdicts stored on the client. | |
216 optional int32 stored_verdict_cnt = 5; | |
217 } | |
218 | |
219 // The message is used for client response for login reputation requests. | |
220 message LoginReputationClientResponse { | |
221 // Type of verdicts issued by the server. | |
222 enum VerdictType { | |
223 VERDICT_TYPE_UNSPECIFIED = 0; | |
224 // No warning will be displayed. | |
225 SAFE = 1; | |
226 // The site has low reputation or low popularity. | |
227 LOW_REPUTATION = 2; | |
228 // The url matches with blacklist entries. | |
229 PHISHING = 3; | |
230 } | |
231 optional VerdictType verdict_type = 1; | |
232 | |
233 // TTL of the verdict in seconds. | |
234 optional int64 cache_duration_sec = 2; | |
235 | |
236 // A host-suffix/path-prefix expression which defines a collections of pages | |
237 // with common ownership from the same domain. | |
238 // Generally, the pattern is defined on the granularity of domains. | |
239 // For domains managed by multiple parties, especially in the case of large | |
240 // hosting sites (e.g., geocities.com), we further divide the domains. | |
241 // | |
242 // Examples: | |
243 // www.google.com/foo/bar?param=val -> google.com | |
244 // www.geocities.com/foo/bar.html -> geocities.com/foo | |
245 // adwords.blogspot.com/index.html -> adwords.blogspot.com | |
246 // | |
247 // The pattern will always match the page_url of the request, and will be | |
248 // a substring of page_url. | |
249 optional string cache_expression = 3; | |
250 } | |
251 | |
252 message ClientMalwareResponse { | |
253 required bool blacklist = 1; | |
254 // The confirmed blacklisted bad IP and its url, which will be shown in | |
255 // malware warning, if the blacklist verdict is true. | |
256 // This IP string could be either in IPv4 or IPv6 format, which is the same | |
257 // as the ones client sent to server. | |
258 optional string bad_ip = 2; | |
259 optional string bad_url = 3; | |
260 } | |
261 | |
262 message ClientDownloadRequest { | |
263 // The final URL of the download (after all redirects). | |
264 required string url = 1; | |
265 | |
266 // This message contains various binary digests of the download payload. | |
267 message Digests { | |
268 optional bytes sha256 = 1; | |
269 optional bytes sha1 = 2; | |
270 optional bytes md5 = 3; | |
271 } | |
272 required Digests digests = 2; | |
273 | |
274 // This is the length in bytes of the download payload. | |
275 required int64 length = 3; | |
276 | |
277 // Type of the resources stored below. | |
278 enum ResourceType { | |
279 // The final URL of the download payload. The resource URL should | |
280 // correspond to the URL field above. | |
281 DOWNLOAD_URL = 0; | |
282 // A redirect URL that was fetched before hitting the final DOWNLOAD_URL. | |
283 DOWNLOAD_REDIRECT = 1; | |
284 // The final top-level URL of the tab that triggered the download. | |
285 TAB_URL = 2; | |
286 // A redirect URL thas was fetched before hitting the final TAB_URL. | |
287 TAB_REDIRECT = 3; | |
288 // The document URL for a PPAPI plugin instance that initiated the download. | |
289 // This is the document.url for the container element for the plugin | |
290 // instance. | |
291 PPAPI_DOCUMENT = 4; | |
292 // The plugin URL for a PPAPI plugin instance that initiated the download. | |
293 PPAPI_PLUGIN = 5; | |
294 } | |
295 | |
296 message Resource { | |
297 required string url = 1; | |
298 required ResourceType type = 2; | |
299 optional bytes remote_ip = 3; | |
300 // This will only be set if the referrer is available and if the | |
301 // resource type is either TAB_URL or DOWNLOAD_URL. | |
302 optional string referrer = 4; | |
303 | |
304 // TODO(noelutz): add the transition type? | |
305 } | |
306 | |
307 // This repeated field will store all the redirects as well as the | |
308 // final URLs for the top-level tab URL (i.e., the URL that | |
309 // triggered the download) as well as for the download URL itself. | |
310 repeated Resource resources = 4; | |
311 | |
312 // A trust chain of certificates. Each chain begins with the signing | |
313 // certificate of the binary, and ends with a self-signed certificate, | |
314 // typically from a trusted root CA. This structure is analogous to | |
315 // CERT_CHAIN_CONTEXT on Windows. | |
316 message CertificateChain { | |
317 // A single link in the chain. | |
318 message Element { | |
319 // DER-encoded X.509 representation of the certificate. | |
320 optional bytes certificate = 1; | |
321 // Fields 2 - 7 are only used on the server. | |
322 } | |
323 repeated Element element = 1; | |
324 } | |
325 | |
326 // This is an OS X only message to report extended attribute informations. | |
327 // Extended attributes on OS X are used for various security mechanisms, | |
328 // which makes them interesting to Chrome. | |
329 message ExtendedAttr { | |
330 // This is the name of the extended attribute. | |
331 required string key = 1; | |
332 // This is the value of the extended attribute. | |
333 optional bytes value = 2; | |
334 } | |
335 | |
336 message SignatureInfo { | |
337 // All certificate chains for each of the binary's signers. Multiple chains | |
338 // may be present if the binary or any certificate has multiple signers. | |
339 // Absence of certificate chains does not imply that the binary is not | |
340 // signed (in that case, SignedData blobs extracted from the binary may be | |
341 // preset), but does mean that trust has not been verified. | |
342 repeated CertificateChain certificate_chain = 1; | |
343 | |
344 // True if the signature was trusted on the client. | |
345 optional bool trusted = 2; | |
346 | |
347 // On Windows, PKCS#7 SignedData blobs extracted from a portable executable | |
348 // image's attribute certificate table. The presence of these does not imply | |
349 // that the signatures were deemed trusted by the client. | |
350 // On Mac, this is the code signature blob referenced by the | |
351 // LC_CODE_SIGNATURE load command. | |
352 repeated bytes signed_data = 3; | |
353 | |
354 // On OS X, code signing data can be contained in the extended attributes of | |
355 // a file. As Gatekeeper respects this signature, we look for it and collect | |
356 // it. | |
357 repeated ExtendedAttr xattr = 4; | |
358 } | |
359 | |
360 // This field will only be set if the binary is signed. | |
361 optional SignatureInfo signature = 5; | |
362 | |
363 // True if the download was user initiated. | |
364 optional bool user_initiated = 6; | |
365 | |
366 // Fields 7 and 8 are only used on the server. | |
367 | |
368 // Name of the file where the download would be stored if the | |
369 // download completes. E.g., "bla.exe". | |
370 optional string file_basename = 9; | |
371 | |
372 // Starting with Chrome M19 we're also sending back pings for Chrome | |
373 // extensions that get downloaded by users. | |
374 enum DownloadType { | |
375 WIN_EXECUTABLE = 0; // Currently all .exe, .cab and .msi files. | |
376 CHROME_EXTENSION = 1; // .crx files. | |
377 ANDROID_APK = 2; // .apk files. | |
378 // .zip files containing one of the other executable types. | |
379 ZIPPED_EXECUTABLE = 3; | |
380 MAC_EXECUTABLE = 4; // .dmg, .pkg, etc. | |
381 ZIPPED_ARCHIVE = 5; // .zip file containing another archive. | |
382 ARCHIVE = 6; // Archive that doesn't have a specific DownloadType. | |
383 // A .zip that Chrome failed to unpack to the point of finding exe/zips. | |
384 INVALID_ZIP = 7; | |
385 // A .dmg, .pkg, etc, that Chrome failed to unpack to the point of finding | |
386 // Mach O's. | |
387 INVALID_MAC_ARCHIVE = 8; | |
388 // A download request initiated via PPAPI. Typically the requestor is | |
389 // a Flash applet. | |
390 PPAPI_SAVE_REQUEST = 9; | |
391 // A file we don't support, but we've decided to sample and send | |
392 // a light-ping. | |
393 SAMPLED_UNSUPPORTED_FILE = 10; | |
394 } | |
395 optional DownloadType download_type = 10 [default = WIN_EXECUTABLE]; | |
396 | |
397 // Locale of the device, eg en, en_US. | |
398 optional string locale = 11; | |
399 | |
400 message PEImageHeaders { | |
401 // IMAGE_DOS_HEADER. | |
402 optional bytes dos_header = 1; | |
403 // IMAGE_FILE_HEADER. | |
404 optional bytes file_header = 2; | |
405 // IMAGE_OPTIONAL_HEADER32. Present only for 32-bit PE images. | |
406 optional bytes optional_headers32 = 3; | |
407 // IMAGE_OPTIONAL_HEADER64. Present only for 64-bit PE images. | |
408 optional bytes optional_headers64 = 4; | |
409 // IMAGE_SECTION_HEADER. | |
410 repeated bytes section_header = 5; | |
411 // Contents of the .edata section. | |
412 optional bytes export_section_data = 6; | |
413 | |
414 message DebugData { | |
415 // IMAGE_DEBUG_DIRECTORY. | |
416 optional bytes directory_entry = 1; | |
417 optional bytes raw_data = 2; | |
418 } | |
419 | |
420 repeated DebugData debug_data = 7; | |
421 } | |
422 | |
423 message MachOHeaders { | |
424 // The mach_header or mach_header_64 struct. | |
425 required bytes mach_header = 1; | |
426 | |
427 message LoadCommand { | |
428 // |command_id| is the first uint32 of |command| as well, but is | |
429 // extracted for easier processing. | |
430 required uint32 command_id = 1; | |
431 // The entire data stream of the load command. | |
432 required bytes command = 2; | |
433 } | |
434 | |
435 // All the load commands of the Mach-O file. | |
436 repeated LoadCommand load_commands = 2; | |
437 } | |
438 | |
439 message ImageHeaders { | |
440 // Windows Portable Executable image headers. | |
441 optional PEImageHeaders pe_headers = 1; | |
442 | |
443 // OS X Mach-O image headers. | |
444 repeated MachOHeaders mach_o_headers = 2; | |
445 }; | |
446 | |
447 // Fields 12-17 are reserved for server-side use and are never sent by the | |
448 // client. | |
449 | |
450 optional ImageHeaders image_headers = 18; | |
451 | |
452 // Fields 19-21 are reserved for server-side use and are never sent by the | |
453 // client. | |
454 | |
455 // A binary contained in an archive (e.g., a .zip archive). | |
456 message ArchivedBinary { | |
457 optional string file_basename = 1; | |
458 optional DownloadType download_type = 2; | |
459 optional Digests digests = 3; | |
460 optional int64 length = 4; | |
461 optional SignatureInfo signature = 5; | |
462 optional ImageHeaders image_headers = 6; | |
463 } | |
464 | |
465 repeated ArchivedBinary archived_binary = 22; | |
466 | |
467 // Population that the reporting user is part of. | |
468 optional ChromeUserPopulation population = 24; | |
469 | |
470 // True if the .zip or DMG, etc, was 100% successfully unpacked. | |
471 optional bool archive_valid = 26; | |
472 | |
473 // True if this ClientDownloadRequest is from a whitelisted domain. | |
474 optional bool skipped_url_whitelist = 28; | |
475 | |
476 // True if this ClientDownloadRequest contains a whitelisted certificate. | |
477 optional bool skipped_certificate_whitelist = 31; | |
478 | |
479 // PPAPI_SAVE_REQUEST type messages may have more than one suggested filetype. | |
480 // Each element in this collection indicates an alternate extension including | |
481 // the leading extension separator. | |
482 repeated string alternate_extensions = 35; | |
483 | |
484 // URLs transitions from landing referrer to download in reverse chronological | |
485 // order, i.e. download url comes first in this list, and landing referrer | |
486 // comes last. | |
487 repeated ReferrerChainEntry referrer_chain = 36; | |
488 | |
489 // Whether DownloadAttribution Finch experiment is enabled for this ping. | |
490 optional bool download_attribution_finch_enabled = 39; | |
491 } | |
492 | |
493 message ReferrerChainEntry { | |
494 enum URLType { | |
495 DOWNLOAD_URL = 1; | |
496 LANDING_PAGE = 2; | |
497 LANDING_REFERRER = 3; | |
498 CLIENT_REDIRECT = 4; | |
499 DEPRECATED_SERVER_REDIRECT = 5; // Deprecated | |
500 } | |
501 | |
502 message ServerRedirect { | |
503 // [required] server redirect url | |
504 optional string url = 1; | |
505 | |
506 // Additional fields for future expansion. | |
507 } | |
508 | |
509 // [required] The url of this Entry. | |
510 optional string url = 1; | |
511 | |
512 // Only set if it is different from |url|. | |
513 optional string main_frame_url = 9; | |
514 | |
515 // Type of URLs, such as download url, download referrer, etc. | |
516 optional URLType type = 2 [default = CLIENT_REDIRECT]; | |
517 | |
518 // IP addresses corresponding to this host. | |
519 repeated string ip_addresses = 3; | |
520 | |
521 // Referrer url of this entry. | |
522 optional string referrer_url = 4; | |
523 | |
524 // Main frame URL of referrer. | |
525 // Only set if it is different from |referrer_url|. | |
526 optional string referrer_main_frame_url = 5; | |
527 | |
528 // If this URL loads in a different tab/frame from previous one. | |
529 optional bool is_retargeting = 6; | |
530 | |
531 optional double navigation_time_msec = 7; | |
532 | |
533 // Set only if server redirects happened in navigation. | |
534 // The first entry in |server_redirect_chain| should be the original request | |
535 // url, and the last entry should be the same as |url|. | |
536 repeated ServerRedirect server_redirect_chain = 8; | |
537 } // End of ReferrerChainEntry | |
538 | |
539 message ClientDownloadResponse { | |
540 enum Verdict { | |
541 // Download is considered safe. | |
542 SAFE = 0; | |
543 // Download is considered dangerous. Chrome should show a warning to the | |
544 // user. | |
545 DANGEROUS = 1; | |
546 // Download is uncommon. Chrome should display a less severe warning. | |
547 UNCOMMON = 2; | |
548 // The download is potentially unwanted. | |
549 POTENTIALLY_UNWANTED = 3; | |
550 // The download is from a dangerous host. | |
551 DANGEROUS_HOST = 4; | |
552 // The backend doesn't have confidence in its verdict of this file. | |
553 // Chrome should show the default warning if configured for this file type. | |
554 UNKNOWN = 5; | |
555 } | |
556 optional Verdict verdict = 1 [default = SAFE]; | |
557 | |
558 message MoreInfo { | |
559 // A human-readable string describing the nature of the warning. | |
560 // Only if verdict != SAFE. Localized based on request.locale. | |
561 optional string description = 1; | |
562 | |
563 // A URL to get more information about this warning, if available. | |
564 optional string url = 2; | |
565 } | |
566 optional MoreInfo more_info = 2; | |
567 | |
568 // An arbitrary token that should be sent along for further server requests. | |
569 optional bytes token = 3; | |
570 | |
571 // Whether the server requests that this binary be uploaded. | |
572 optional bool upload = 5; | |
573 } | |
574 | |
575 // The following protocol buffer holds the feedback report gathered | |
576 // from the user regarding the download. | |
577 message ClientDownloadReport { | |
578 // The information of user who provided the feedback. | |
579 // This is going to be useful for handling appeals. | |
580 message UserInformation { optional string email = 1; } | |
581 | |
582 enum Reason { | |
583 SHARE = 0; | |
584 FALSE_POSITIVE = 1; | |
585 APPEAL = 2; | |
586 } | |
587 | |
588 // The type of feedback for this report. | |
589 optional Reason reason = 1; | |
590 | |
591 // The original download ping | |
592 optional ClientDownloadRequest download_request = 2; | |
593 | |
594 // Stores the information of the user who provided the feedback. | |
595 optional UserInformation user_information = 3; | |
596 | |
597 // Unstructed comments provided by the user. | |
598 optional bytes comment = 4; | |
599 | |
600 // The original download response sent from the verdict server. | |
601 optional ClientDownloadResponse download_response = 5; | |
602 } | |
603 | |
604 // This is used to send back upload status to the client after upload completion | |
605 message ClientUploadResponse { | |
606 enum UploadStatus { | |
607 // The upload was successful and a complete response can be expected | |
608 SUCCESS = 0; | |
609 | |
610 // The upload was unsuccessful and the response is incomplete. | |
611 UPLOAD_FAILURE = 1; | |
612 } | |
613 | |
614 // Holds the upload status | |
615 optional UploadStatus status = 1; | |
616 | |
617 // Holds the permalink where the results of scanning the binary are available | |
618 optional string permalink = 2; | |
619 } | |
620 | |
621 message ClientIncidentReport { | |
622 message IncidentData { | |
623 message TrackedPreferenceIncident { | |
624 enum ValueState { | |
625 UNKNOWN = 0; | |
626 CLEARED = 1; | |
627 WEAK_LEGACY_OBSOLETE = 2; | |
628 CHANGED = 3; | |
629 UNTRUSTED_UNKNOWN_VALUE = 4; | |
630 BYPASS_CLEARED = 5; | |
631 BYPASS_CHANGED = 6; | |
632 } | |
633 | |
634 optional string path = 1; | |
635 optional string atomic_value = 2; | |
636 repeated string split_key = 3; | |
637 optional ValueState value_state = 4; | |
638 } | |
639 | |
640 message BinaryIntegrityIncident { | |
641 optional string file_basename = 1; | |
642 optional ClientDownloadRequest.SignatureInfo signature = 2; | |
643 optional ClientDownloadRequest.ImageHeaders image_headers = 3; | |
644 optional int32 sec_error = 4; | |
645 | |
646 message ContainedFile { | |
647 optional string relative_path = 1; | |
648 optional ClientDownloadRequest.SignatureInfo signature = 2; | |
649 optional ClientDownloadRequest.ImageHeaders image_headers = 3; | |
650 } | |
651 repeated ContainedFile contained_file = 5; | |
652 } | |
653 | |
654 message BlacklistLoadIncident { | |
655 optional string path = 1; | |
656 optional ClientDownloadRequest.Digests digest = 2; | |
657 optional string version = 3; | |
658 optional bool blacklist_initialized = 4; | |
659 optional ClientDownloadRequest.SignatureInfo signature = 5; | |
660 optional ClientDownloadRequest.ImageHeaders image_headers = 6; | |
661 } | |
662 message VariationsSeedSignatureIncident { | |
663 optional string variations_seed_signature = 1; | |
664 } | |
665 message ResourceRequestIncident { | |
666 enum Type { | |
667 UNKNOWN = 0; | |
668 TYPE_PATTERN = 3; | |
669 } | |
670 optional bytes digest = 1; | |
671 optional string origin = 2; | |
672 optional Type type = 3 [default = UNKNOWN]; | |
673 } | |
674 message SuspiciousModuleIncident { | |
675 optional string path = 1; | |
676 optional ClientDownloadRequest.Digests digest = 2; | |
677 optional string version = 3; | |
678 optional ClientDownloadRequest.SignatureInfo signature = 4; | |
679 optional ClientDownloadRequest.ImageHeaders image_headers = 5; | |
680 } | |
681 optional int64 incident_time_msec = 1; | |
682 optional TrackedPreferenceIncident tracked_preference = 2; | |
683 optional BinaryIntegrityIncident binary_integrity = 3; | |
684 optional BlacklistLoadIncident blacklist_load = 4; | |
685 // Note: skip tag 5 because it was previously used. | |
686 optional VariationsSeedSignatureIncident variations_seed_signature = 6; | |
687 optional ResourceRequestIncident resource_request = 7; | |
688 optional SuspiciousModuleIncident suspicious_module = 8; | |
689 } | |
690 | |
691 repeated IncidentData incident = 1; | |
692 | |
693 message DownloadDetails { | |
694 optional bytes token = 1; | |
695 optional ClientDownloadRequest download = 2; | |
696 optional int64 download_time_msec = 3; | |
697 optional int64 open_time_msec = 4; | |
698 } | |
699 | |
700 optional DownloadDetails download = 2; | |
701 | |
702 message EnvironmentData { | |
703 message OS { | |
704 optional string os_name = 1; | |
705 optional string os_version = 2; | |
706 | |
707 message RegistryValue { | |
708 optional string name = 1; | |
709 optional uint32 type = 2; | |
710 optional bytes data = 3; | |
711 } | |
712 | |
713 message RegistryKey { | |
714 optional string name = 1; | |
715 repeated RegistryValue value = 2; | |
716 repeated RegistryKey key = 3; | |
717 } | |
718 | |
719 repeated RegistryKey registry_key = 3; | |
720 | |
721 optional bool is_enrolled_to_domain = 4; | |
722 } | |
723 optional OS os = 1; | |
724 message Machine { | |
725 optional string cpu_architecture = 1; | |
726 optional string cpu_vendor = 2; | |
727 optional uint32 cpuid = 3; | |
728 } | |
729 optional Machine machine = 2; | |
730 message Process { | |
731 optional string version = 1; | |
732 repeated string OBSOLETE_dlls = 2; | |
733 message Patch { | |
734 optional string function = 1; | |
735 optional string target_dll = 2; | |
736 } | |
737 repeated Patch patches = 3; | |
738 message NetworkProvider {} | |
739 repeated NetworkProvider network_providers = 4; | |
740 enum Channel { | |
741 CHANNEL_UNKNOWN = 0; | |
742 CHANNEL_CANARY = 1; | |
743 CHANNEL_DEV = 2; | |
744 CHANNEL_BETA = 3; | |
745 CHANNEL_STABLE = 4; | |
746 } | |
747 optional Channel chrome_update_channel = 5; | |
748 optional int64 uptime_msec = 6; | |
749 optional bool metrics_consent = 7; | |
750 // Obsolete: extended consent is now required for incident reporting. | |
751 optional bool OBSOLETE_extended_consent = 8; | |
752 message Dll { | |
753 enum Feature { | |
754 UNKNOWN = 0; | |
755 LSP = 1; | |
756 } | |
757 optional string path = 1; | |
758 optional uint64 base_address = 2; | |
759 optional uint32 length = 3; | |
760 repeated Feature feature = 4; | |
761 optional ClientDownloadRequest.ImageHeaders image_headers = 5; | |
762 } | |
763 repeated Dll dll = 9; | |
764 repeated string blacklisted_dll = 10; | |
765 message ModuleState { | |
766 enum ModifiedState { | |
767 UNKNOWN = 0; | |
768 MODULE_STATE_UNKNOWN = 1; | |
769 MODULE_STATE_UNMODIFIED = 2; | |
770 MODULE_STATE_MODIFIED = 3; | |
771 } | |
772 optional string name = 1; | |
773 optional ModifiedState modified_state = 2; | |
774 repeated string OBSOLETE_modified_export = 3; | |
775 | |
776 message Modification { | |
777 optional uint32 file_offset = 1; | |
778 optional int32 byte_count = 2; | |
779 optional bytes modified_bytes = 3; | |
780 optional string export_name = 4; | |
781 } | |
782 repeated Modification modification = 4; | |
783 } | |
784 repeated ModuleState module_state = 11; | |
785 // Obsolete: field trials no longer enable incident reporting. | |
786 optional bool OBSOLETE_field_trial_participant = 12; | |
787 } | |
788 optional Process process = 3; | |
789 } | |
790 | |
791 message ExtensionData { | |
792 message ExtensionInfo { | |
793 enum ExtensionState { | |
794 STATE_UNKNOWN = 0; | |
795 STATE_ENABLED = 1; | |
796 STATE_DISABLED = 2; | |
797 STATE_BLACKLISTED = 3; | |
798 STATE_BLOCKED = 4; | |
799 STATE_TERMINATED = 5; | |
800 } | |
801 | |
802 optional string id = 1; | |
803 optional string version = 2; | |
804 optional string name = 3; | |
805 optional string description = 4; | |
806 optional ExtensionState state = 5 [default = STATE_UNKNOWN]; | |
807 optional int32 type = 6; | |
808 optional string update_url = 7; | |
809 optional bool has_signature_validation = 8; | |
810 optional bool signature_is_valid = 9; | |
811 optional bool installed_by_custodian = 10; | |
812 optional bool installed_by_default = 11; | |
813 optional bool installed_by_oem = 12; | |
814 optional bool from_bookmark = 13; | |
815 optional bool from_webstore = 14; | |
816 optional bool converted_from_user_script = 15; | |
817 optional bool may_be_untrusted = 16; | |
818 optional int64 install_time_msec = 17; | |
819 optional int32 manifest_location_type = 18; | |
820 optional string manifest = 19; | |
821 } | |
822 | |
823 optional ExtensionInfo last_installed_extension = 1; | |
824 } | |
825 | |
826 optional EnvironmentData environment = 3; | |
827 | |
828 // Population that the reporting user is part of. | |
829 optional ChromeUserPopulation population = 7; | |
830 | |
831 optional ExtensionData extension_data = 8; | |
832 | |
833 message NonBinaryDownloadDetails { | |
834 optional string file_type = 1; | |
835 optional bytes url_spec_sha256 = 2; | |
836 optional string host = 3; | |
837 optional int64 length = 4; | |
838 } | |
839 | |
840 optional NonBinaryDownloadDetails non_binary_download = 9; | |
841 } | |
842 | |
843 message ClientIncidentResponse { | |
844 optional bytes token = 1; | |
845 optional bool download_requested = 2; | |
846 | |
847 message EnvironmentRequest { optional int32 dll_index = 1; } | |
848 | |
849 repeated EnvironmentRequest environment_requests = 3; | |
850 } | |
851 | |
852 message DownloadMetadata { | |
853 optional uint32 download_id = 1; | |
854 | |
855 optional ClientIncidentReport.DownloadDetails download = 2; | |
856 } | |
857 | |
858 // A Detailed Safebrowsing Report from clients. Chrome safebrowsing reports are | |
859 // only sent by Chrome users who have opted into extended Safe Browsing. | |
860 // This proto is replacing ClientMalwareReportRequest. | |
861 // Next tag: 17 | |
862 message ClientSafeBrowsingReportRequest { | |
863 // Note: A lot of the "optional" fields would make sense to be | |
864 // "required" instead. However, having them as optional allows the | |
865 // clients to send "stripped down" versions of the message in the | |
866 // future, if we want to. | |
867 | |
868 enum ReportType { | |
869 UNKNOWN = 0; | |
870 URL_PHISHING = 1; | |
871 URL_MALWARE = 2; | |
872 URL_UNWANTED = 3; | |
873 CLIENT_SIDE_PHISHING_URL = 4; | |
874 CLIENT_SIDE_MALWARE_URL = 5; | |
875 DANGEROUS_DOWNLOAD_RECOVERY = 6; | |
876 DANGEROUS_DOWNLOAD_WARNING = 7; | |
877 DANGEROUS_DOWNLOAD_BY_API = 10; | |
878 } | |
879 | |
880 message HTTPHeader { | |
881 required bytes name = 1; | |
882 optional bytes value = 2; | |
883 } | |
884 | |
885 message HTTPRequest { | |
886 message FirstLine { | |
887 optional bytes verb = 1; | |
888 optional bytes uri = 2; | |
889 optional bytes version = 3; | |
890 } | |
891 | |
892 optional FirstLine firstline = 1; | |
893 repeated HTTPHeader headers = 2; | |
894 optional bytes body = 3; | |
895 | |
896 // bodydigest and bodylength can be useful if the report does not | |
897 // contain the body itself. | |
898 optional bytes bodydigest = 4; // 32-byte hex md5 digest of body. | |
899 optional int32 bodylength = 5; // length of body. | |
900 } | |
901 | |
902 message HTTPResponse { | |
903 message FirstLine { | |
904 optional int32 code = 1; | |
905 optional bytes reason = 2; | |
906 optional bytes version = 3; | |
907 } | |
908 | |
909 optional FirstLine firstline = 1; | |
910 repeated HTTPHeader headers = 2; | |
911 optional bytes body = 3; | |
912 optional bytes bodydigest = 4; // 32-byte hex md5 digest of body. | |
913 optional int32 bodylength = 5; // length of body. | |
914 optional bytes remote_ip = 6; // IP of the server. | |
915 } | |
916 | |
917 message Resource { | |
918 required int32 id = 1; | |
919 optional string url = 2; | |
920 optional HTTPRequest request = 3; | |
921 optional HTTPResponse response = 4; | |
922 optional int32 parent_id = 5; | |
923 repeated int32 child_ids = 6; | |
924 optional string tag_name = 7; | |
925 } | |
926 | |
927 optional ReportType type = 10; | |
928 | |
929 // Only set if ReportType is DANGEROUS_DOWNLOAD_RECOVERY, | |
930 // DANGEROUS_DOWNLOAD_WARNING or DANGEROUS_DOWNLOAD_BY_API. | |
931 optional ClientDownloadResponse.Verdict download_verdict = 11; | |
932 | |
933 // URL of the page in the address bar. | |
934 optional string url = 1; | |
935 optional string page_url = 2; | |
936 optional string referrer_url = 3; | |
937 | |
938 repeated Resource resources = 4; | |
939 | |
940 // Contains the hierarchy of elements on the page (ie: the DOM). Some | |
941 // elements can be Resources and will refer to the resources list (above). | |
942 repeated HTMLElement dom = 16; | |
943 | |
944 // Whether the report is complete. | |
945 optional bool complete = 5; | |
946 | |
947 // The ASN and country of the client IP. These fields are filled up by | |
948 // csd_frontend | |
949 repeated string client_asn = 6; | |
950 optional string client_country = 7; | |
951 | |
952 // Whether user chose to proceed. | |
953 optional bool did_proceed = 8; | |
954 | |
955 // Whether user visited this origin before. | |
956 optional bool repeat_visit = 9; | |
957 | |
958 // The same token in ClientDownloadResponse. This field is only set if its | |
959 // report type is DANGEROUS_DOWNLOAD_RECOVERY, DANGEROUS_DOWNLOAD_WARNING or | |
960 // DANGEROUS_DOWNLOAD_BY_API. | |
961 optional bytes token = 15; | |
962 } | |
963 | |
964 // An HTML Element on the page (eg: iframe, div, script, etc). | |
965 message HTMLElement { | |
966 // Id of this element. | |
967 optional int32 id = 1; | |
968 | |
969 // The tag type of this element (eg: iframe, div, script, etc). | |
970 optional string tag = 2; | |
971 | |
972 // IDs of elements that are children of this element. | |
973 repeated int32 child_ids = 3; | |
974 | |
975 // If this element represents a Resource then this is the id of the | |
976 // Resource, which contains additional data about the Resource. Otherwise | |
977 // unset. | |
978 optional int32 resource_id = 5; | |
979 | |
980 // An Attribute of the element (eg: id, border, foo etc) and its value. | |
981 message Attribute { | |
982 optional string name = 1; | |
983 optional string value = 2; | |
984 } | |
985 repeated Attribute attribute = 6; | |
986 } | |
987 | |
988 // Canonical representation of raster image data. | |
989 message ImageData { | |
990 // Image bitmap, after downscaling to <= 512x512. | |
991 optional bytes data = 1; | |
992 | |
993 // Encoding scheme for the bitmap. | |
994 optional string mime_type = 2; | |
995 | |
996 message Dimensions { | |
997 optional int32 width = 1; | |
998 optional int32 height = 2; | |
999 } | |
1000 | |
1001 // Dimensions of the image stored in |data|. | |
1002 optional Dimensions dimensions = 3; | |
1003 optional Dimensions original_dimensions = 4; // iff downscaled | |
1004 } | |
1005 | |
1006 // Reporting protobuf for an image served as part of a browser notification. | |
1007 // There is no response (an empty body) to this request. | |
1008 message NotificationImageReportRequest { | |
1009 optional string notification_origin = 1; // Src-origin of the notification. | |
1010 optional ImageData image = 2; // The bitmap of the image. | |
1011 | |
1012 // Note that the image URL is deliberately omitted as it would be untrusted, | |
1013 // since the notification image fetch may be intercepted by a Service Worker | |
1014 // (even if the image URL is cross-origin). Otherwise a website could mislead | |
1015 // Safe Browsing into associating phishing image bitmaps with safe image URLs. | |
1016 } | |
OLD | NEW |