xref: /aosp_15_r20/external/googleapis/google/cloud/websecurityscanner/v1alpha/finding.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2019 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//
15
16syntax = "proto3";
17
18package google.cloud.websecurityscanner.v1alpha;
19
20import "google/api/resource.proto";
21import "google/cloud/websecurityscanner/v1alpha/finding_addon.proto";
22
23option go_package = "cloud.google.com/go/websecurityscanner/apiv1alpha/websecurityscannerpb;websecurityscannerpb";
24option java_multiple_files = true;
25option java_outer_classname = "FindingProto";
26option java_package = "com.google.cloud.websecurityscanner.v1alpha";
27
28// A Finding resource represents a vulnerability instance identified during a
29// ScanRun.
30message Finding {
31  option (google.api.resource) = {
32    type: "websecurityscanner.googleapis.com/Finding"
33    pattern: "projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}/findings/{finding}"
34  };
35
36  // Types of Findings.
37  enum FindingType {
38    // The invalid finding type.
39    FINDING_TYPE_UNSPECIFIED = 0;
40
41    // A page that was served over HTTPS also resources over HTTP. A
42    // man-in-the-middle attacker could tamper with the HTTP resource and gain
43    // full access to the website that loads the resource or to monitor the
44    // actions taken by the user.
45    MIXED_CONTENT = 1;
46
47    // The version of an included library is known to contain a security issue.
48    // The scanner checks the version of library in use against a known list of
49    // vulnerable libraries. False positives are possible if the version
50    // detection fails or if the library has been manually patched.
51    OUTDATED_LIBRARY = 2;
52
53    // This type of vulnerability occurs when the value of a request parameter
54    // is reflected at the beginning of the response, for example, in requests
55    // using JSONP. Under certain circumstances, an attacker may be able to
56    // supply an alphanumeric-only Flash file in the vulnerable parameter
57    // causing the browser to execute the Flash file as if it originated on the
58    // vulnerable server.
59    ROSETTA_FLASH = 5;
60
61    // A cross-site scripting (XSS) bug is found via JavaScript callback. For
62    // detailed explanations on XSS, see
63    // https://www.google.com/about/appsecurity/learning/xss/.
64    XSS_CALLBACK = 3;
65
66    // A potential cross-site scripting (XSS) bug due to JavaScript breakage.
67    // In some circumstances, the application under test might modify the test
68    // string before it is parsed by the browser. When the browser attempts to
69    // runs this modified test string, it will likely break and throw a
70    // JavaScript execution error, thus an injection issue is occurring.
71    // However, it may not be exploitable. Manual verification is needed to see
72    // if the test string modifications can be evaded and confirm that the issue
73    // is in fact an XSS vulnerability. For detailed explanations on XSS, see
74    // https://www.google.com/about/appsecurity/learning/xss/.
75    XSS_ERROR = 4;
76
77    // An application appears to be transmitting a password field in clear text.
78    // An attacker can eavesdrop network traffic and sniff the password field.
79    CLEAR_TEXT_PASSWORD = 6;
80
81    // An application returns sensitive content with an invalid content type,
82    // or without an 'X-Content-Type-Options: nosniff' header.
83    INVALID_CONTENT_TYPE = 7;
84
85    // A cross-site scripting (XSS) vulnerability in AngularJS module that
86    // occurs when a user-provided string is interpolated by Angular.
87    XSS_ANGULAR_CALLBACK = 8;
88
89    // A malformed or invalid valued header.
90    INVALID_HEADER = 9;
91
92    // Misspelled security header name.
93    MISSPELLED_SECURITY_HEADER_NAME = 10;
94
95    // Mismatching values in a duplicate security header.
96    MISMATCHING_SECURITY_HEADER_VALUES = 11;
97  }
98
99  // The resource name of the Finding. The name follows the format of
100  // 'projects/{projectId}/scanConfigs/{scanConfigId}/scanruns/{scanRunId}/findings/{findingId}'.
101  // The finding IDs are generated by the system.
102  string name = 1;
103
104  // The type of the Finding.
105  FindingType finding_type = 2;
106
107  // The http method of the request that triggered the vulnerability, in
108  // uppercase.
109  string http_method = 3;
110
111  // The URL produced by the server-side fuzzer and used in the request that
112  // triggered the vulnerability.
113  string fuzzed_url = 4;
114
115  // The body of the request that triggered the vulnerability.
116  string body = 5;
117
118  // The description of the vulnerability.
119  string description = 6;
120
121  // The URL containing human-readable payload that user can leverage to
122  // reproduce the vulnerability.
123  string reproduction_url = 7;
124
125  // If the vulnerability was originated from nested IFrame, the immediate
126  // parent IFrame is reported.
127  string frame_url = 8;
128
129  // The URL where the browser lands when the vulnerability is detected.
130  string final_url = 9;
131
132  // The tracking ID uniquely identifies a vulnerability instance across
133  // multiple ScanRuns.
134  string tracking_id = 10;
135
136  // An addon containing information about outdated libraries.
137  OutdatedLibrary outdated_library = 11;
138
139  // An addon containing detailed information regarding any resource causing the
140  // vulnerability such as JavaScript sources, image, audio files, etc.
141  ViolatingResource violating_resource = 12;
142
143  // An addon containing information about vulnerable or missing HTTP headers.
144  VulnerableHeaders vulnerable_headers = 15;
145
146  // An addon containing information about request parameters which were found
147  // to be vulnerable.
148  VulnerableParameters vulnerable_parameters = 13;
149
150  // An addon containing information reported for an XSS, if any.
151  Xss xss = 14;
152}
153