Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: chrome/common/safe_browsing/csd.proto

Issue 1414343007: Collect threat details for phishing and UwS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/common/safe_browsing/safebrowsing_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // Client side phishing and malware detection request and response 5 // This proto file includes:
Nathan Parker 2015/11/05 19:43:13 nit: Maybe there's a better name for this proto no
Jialiu Lin 2015/11/05 21:18:57 I feel it makes more sense to call it csd.proto, s
6 // protocol buffers. Those protocol messages should be kept in sync 6 // (1) Client side phishing and malware detection request and response
7 // with the server implementation. 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.
8 // 18 //
9 // If you want to change this protocol definition or you have questions 19 // If you want to change this protocol definition or you have questions
10 // regarding its format please contact chrome-anti-phishing@googlegroups.com. 20 // regarding its format please contact chrome-anti-phishing@googlegroups.com.
11 21
12 syntax = "proto2"; 22 syntax = "proto2";
13 23
14 option optimize_for = LITE_RUNTIME; 24 option optimize_for = LITE_RUNTIME;
15 25
16 package safe_browsing; 26 package safe_browsing;
17 27
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 message EnvironmentRequest { optional int32 dll_index = 1; } 637 message EnvironmentRequest { optional int32 dll_index = 1; }
628 638
629 repeated EnvironmentRequest environment_requests = 3; 639 repeated EnvironmentRequest environment_requests = 3;
630 } 640 }
631 641
632 message DownloadMetadata { 642 message DownloadMetadata {
633 optional uint32 download_id = 1; 643 optional uint32 download_id = 1;
634 644
635 optional ClientIncidentReport.DownloadDetails download = 2; 645 optional ClientIncidentReport.DownloadDetails download = 2;
636 } 646 }
647
648 // A Detailed Safebrowsing Report from clients. Chrome safebrowsing reports are
649 // only sent by Chrome users who have opted into extended Safe Browsing.
650 // This proto is replacing ClientMalwareReportRequest.
651 // Next tag: 12
652 message ClientSafeBrowsingReportRequest {
653 // Note: A lot of the "optional" fields would make sense to be
654 // "required" instead. However, having them as optional allows the
655 // clients to send "stripped down" versions of the message in the
656 // future, if we want to.
657
658 enum ReportType {
659 UNKNOWN = 0;
660 URL_PHISHING = 1;
661 URL_MALWARE = 2;
662 URL_UNWANTED = 3;
663 CLIENT_SIDE_PHISHING_URL = 4;
664 CLIENT_SIDE_MALWARE_URL = 5;
665 MALICIOUS_DOWNLOAD_RECOVERY = 6;
666 }
667
668 message HTTPHeader {
669 required bytes name = 1;
670 optional bytes value = 2;
671 }
672
673 message HTTPRequest {
674 message FirstLine {
675 optional bytes verb = 1;
676 optional bytes uri = 2;
677 optional bytes version = 3;
678 }
679
680 optional FirstLine firstline = 1;
681 repeated HTTPHeader headers = 2;
682 optional bytes body = 3;
683
684 // bodydigest and bodylength can be useful if the report does not
685 // contain the body itself.
686 optional bytes bodydigest = 4; // 32-byte hex md5 digest of body.
687 optional int32 bodylength = 5; // length of body.
688 }
689
690 message HTTPResponse {
691 message FirstLine {
692 optional int32 code = 1;
693 optional bytes reason = 2;
694 optional bytes version = 3;
695 }
696
697 optional FirstLine firstline = 1;
698 repeated HTTPHeader headers = 2;
699 optional bytes body = 3;
700 optional bytes bodydigest = 4; // 32-byte hex md5 digest of body.
701 optional int32 bodylength = 5; // length of body.
702 optional bytes remote_ip = 6; // IP of the server.
703 }
704
705 message Resource {
706 required int32 id = 1;
707 optional string url = 2;
708 optional HTTPRequest request = 3;
709 optional HTTPResponse response = 4;
710 optional int32 parent_id = 5;
711 repeated int32 child_ids = 6;
712 optional string tag_name = 7;
713 }
714
715 optional ReportType type = 10;
716
717 // Only set if ReportType is MALICIOUS_DOWNLOAD_RECOVERY.
718 optional ClientDownloadResponse.Verdict download_verdict = 11;
719
720 // URL of the page in the address bar.
721 optional string url = 1;
722 optional string page_url = 2;
723 optional string referrer_url = 3;
724
725 repeated Resource resources = 4;
726
727 // Whether the report is complete.
728 optional bool complete = 5;
729
730 // The ASN and country of the client IP. These fields are filled up by
731 // csd_frontend
732 repeated string client_asn = 6;
733 optional string client_country = 7;
734
735 // Whether user chose to proceed.
736 optional bool did_proceed = 8;
737
738 // Whether user visited this origin before.
739 optional bool repeat_visit = 9;
740 }
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/common/safe_browsing/safebrowsing_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698