Skip to content

Commit 11597e7

Browse files
authored
feat: add v1 (#42)
1 parent aed6404 commit 11597e7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+11281
-7
lines changed

packages/google-cloud-websecurityscanner/docs/index.rst

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,27 @@
22

33
.. include:: multiprocessing.rst
44

5-
Api Reference
5+
API Reference
66
-------------
7-
This package includes clients for multiple versions of the Web Security Scanner API. By default, you will get ``v1beta``, the latest version.
7+
This package includes clients for multiple versions of the Web Security Scanner API. By default, you will get ``v1``, the latest version.
88

9+
.. toctree::
10+
:maxdepth: 2
11+
12+
websecurityscanner_v1/services
13+
websecurityscanner_v1/types
14+
15+
The previous releases spelled ``v1beta`` and ``v1alpha`` are provided to continue to support code previously written against it. In order to use it, you will want to import from it e.g., ``google.cloud.websecurityscanner_v1alpha`` in lieu of ``google.cloud.websecurityscanner`` (or the equivalent ``google.cloud.websecurityscanner_v1``).
16+
17+
18+
v1beta
19+
~~~~~~~
920
.. toctree::
1021
:maxdepth: 2
1122

1223
websecurityscanner_v1beta/services
1324
websecurityscanner_v1beta/types
1425

15-
The previous alpha release, spelled ``v1alpha`` is provided to continue to support code previously written against it. In order to use it, you will want to import from it e.g., ``google.cloud.websecurityscanner_v1alpha`` in lieu of ``google.cloud.websecurityscanner`` (or the equivalent ``google.cloud.websecurityscanner_v1beta``).
1626

1727
v1alpha
1828
~~~~~~~
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Services for Google Cloud Websecurityscanner v1 API
2+
===================================================
3+
.. toctree::
4+
:maxdepth: 2
5+
6+
web_security_scanner
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Types for Google Cloud Websecurityscanner v1 API
2+
================================================
3+
4+
.. automodule:: google.cloud.websecurityscanner_v1.types
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
WebSecurityScanner
2+
------------------------------------
3+
4+
.. automodule:: google.cloud.websecurityscanner_v1.services.web_security_scanner
5+
:members:
6+
:inherited-members:
7+
8+
9+
.. automodule:: google.cloud.websecurityscanner_v1.services.web_security_scanner.pagers
10+
:members:
11+
:inherited-members:
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# -*- coding: utf-8 -*-
2+
3+
# Copyright 2020 Google LLC
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
from .services.web_security_scanner import WebSecurityScannerClient
19+
from .types.crawled_url import CrawledUrl
20+
from .types.finding import Finding
21+
from .types.finding_addon import Form
22+
from .types.finding_addon import OutdatedLibrary
23+
from .types.finding_addon import ViolatingResource
24+
from .types.finding_addon import VulnerableHeaders
25+
from .types.finding_addon import VulnerableParameters
26+
from .types.finding_addon import Xss
27+
from .types.finding_type_stats import FindingTypeStats
28+
from .types.scan_config import ScanConfig
29+
from .types.scan_config_error import ScanConfigError
30+
from .types.scan_run import ScanRun
31+
from .types.scan_run_error_trace import ScanRunErrorTrace
32+
from .types.scan_run_warning_trace import ScanRunWarningTrace
33+
from .types.web_security_scanner import CreateScanConfigRequest
34+
from .types.web_security_scanner import DeleteScanConfigRequest
35+
from .types.web_security_scanner import GetFindingRequest
36+
from .types.web_security_scanner import GetScanConfigRequest
37+
from .types.web_security_scanner import GetScanRunRequest
38+
from .types.web_security_scanner import ListCrawledUrlsRequest
39+
from .types.web_security_scanner import ListCrawledUrlsResponse
40+
from .types.web_security_scanner import ListFindingTypeStatsRequest
41+
from .types.web_security_scanner import ListFindingTypeStatsResponse
42+
from .types.web_security_scanner import ListFindingsRequest
43+
from .types.web_security_scanner import ListFindingsResponse
44+
from .types.web_security_scanner import ListScanConfigsRequest
45+
from .types.web_security_scanner import ListScanConfigsResponse
46+
from .types.web_security_scanner import ListScanRunsRequest
47+
from .types.web_security_scanner import ListScanRunsResponse
48+
from .types.web_security_scanner import StartScanRunRequest
49+
from .types.web_security_scanner import StopScanRunRequest
50+
from .types.web_security_scanner import UpdateScanConfigRequest
51+
52+
53+
__all__ = (
54+
"CrawledUrl",
55+
"CreateScanConfigRequest",
56+
"DeleteScanConfigRequest",
57+
"Finding",
58+
"FindingTypeStats",
59+
"Form",
60+
"GetFindingRequest",
61+
"GetScanConfigRequest",
62+
"GetScanRunRequest",
63+
"ListCrawledUrlsRequest",
64+
"ListCrawledUrlsResponse",
65+
"ListFindingTypeStatsRequest",
66+
"ListFindingTypeStatsResponse",
67+
"ListFindingsRequest",
68+
"ListFindingsResponse",
69+
"ListScanConfigsRequest",
70+
"ListScanConfigsResponse",
71+
"ListScanRunsRequest",
72+
"ListScanRunsResponse",
73+
"OutdatedLibrary",
74+
"ScanConfig",
75+
"ScanConfigError",
76+
"ScanRun",
77+
"ScanRunErrorTrace",
78+
"ScanRunWarningTrace",
79+
"StartScanRunRequest",
80+
"StopScanRunRequest",
81+
"UpdateScanConfigRequest",
82+
"ViolatingResource",
83+
"VulnerableHeaders",
84+
"VulnerableParameters",
85+
"Xss",
86+
"WebSecurityScannerClient",
87+
)
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// Copyright 2020 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+
syntax = "proto3";
16+
17+
package google.cloud.websecurityscanner.v1;
18+
19+
option csharp_namespace = "Google.Cloud.WebSecurityScanner.V1";
20+
option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1;websecurityscanner";
21+
option java_multiple_files = true;
22+
option java_outer_classname = "CrawledUrlProto";
23+
option java_package = "com.google.cloud.websecurityscanner.v1";
24+
option php_namespace = "Google\\Cloud\\WebSecurityScanner\\V1";
25+
option ruby_package = "Google::Cloud::WebSecurityScanner::V1";
26+
27+
// A CrawledUrl resource represents a URL that was crawled during a ScanRun. Web
28+
// Security Scanner Service crawls the web applications, following all links
29+
// within the scope of sites, to find the URLs to test against.
30+
message CrawledUrl {
31+
// Output only. The http method of the request that was used to visit the URL, in
32+
// uppercase.
33+
string http_method = 1;
34+
35+
// Output only. The URL that was crawled.
36+
string url = 2;
37+
38+
// Output only. The body of the request that was used to visit the URL.
39+
string body = 3;
40+
}
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
// Copyright 2020 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+
syntax = "proto3";
16+
17+
package google.cloud.websecurityscanner.v1;
18+
19+
import "google/api/field_behavior.proto";
20+
import "google/api/resource.proto";
21+
import "google/cloud/websecurityscanner/v1/finding_addon.proto";
22+
23+
option csharp_namespace = "Google.Cloud.WebSecurityScanner.V1";
24+
option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1;websecurityscanner";
25+
option java_multiple_files = true;
26+
option java_outer_classname = "FindingProto";
27+
option java_package = "com.google.cloud.websecurityscanner.v1";
28+
option php_namespace = "Google\\Cloud\\WebSecurityScanner\\V1";
29+
option ruby_package = "Google::Cloud::WebSecurityScanner::V1";
30+
31+
// A Finding resource represents a vulnerability instance identified during a
32+
// ScanRun.
33+
message Finding {
34+
option (google.api.resource) = {
35+
type: "websecurityscanner.googleapis.com/Finding"
36+
pattern: "projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}/findings/{finding}"
37+
};
38+
39+
// The severity level of a vulnerability.
40+
enum Severity {
41+
// No severity specified. The default value.
42+
SEVERITY_UNSPECIFIED = 0;
43+
44+
// Critical severity.
45+
CRITICAL = 1;
46+
47+
// High severity.
48+
HIGH = 2;
49+
50+
// Medium severity.
51+
MEDIUM = 3;
52+
53+
// Low severity.
54+
LOW = 4;
55+
}
56+
57+
// Output only. The resource name of the Finding. The name follows the format of
58+
// 'projects/{projectId}/scanConfigs/{scanConfigId}/scanruns/{scanRunId}/findings/{findingId}'.
59+
// The finding IDs are generated by the system.
60+
string name = 1;
61+
62+
// Output only. The type of the Finding.
63+
// Detailed and up-to-date information on findings can be found here:
64+
// https://cloud.google.com/security-command-center/docs/how-to-remediate-web-security-scanner-findings
65+
string finding_type = 2;
66+
67+
// Output only. The severity level of the reported vulnerability.
68+
Severity severity = 17 [(google.api.field_behavior) = OUTPUT_ONLY];
69+
70+
// Output only. The http method of the request that triggered the vulnerability, in
71+
// uppercase.
72+
string http_method = 3;
73+
74+
// Output only. The URL produced by the server-side fuzzer and used in the request that
75+
// triggered the vulnerability.
76+
string fuzzed_url = 4;
77+
78+
// Output only. The body of the request that triggered the vulnerability.
79+
string body = 5;
80+
81+
// Output only. The description of the vulnerability.
82+
string description = 6;
83+
84+
// Output only. The URL containing human-readable payload that user can leverage to
85+
// reproduce the vulnerability.
86+
string reproduction_url = 7;
87+
88+
// Output only. If the vulnerability was originated from nested IFrame, the immediate
89+
// parent IFrame is reported.
90+
string frame_url = 8;
91+
92+
// Output only. The URL where the browser lands when the vulnerability is detected.
93+
string final_url = 9;
94+
95+
// Output only. The tracking ID uniquely identifies a vulnerability instance across
96+
// multiple ScanRuns.
97+
string tracking_id = 10;
98+
99+
// Output only. An addon containing information reported for a vulnerability with an HTML
100+
// form, if any.
101+
Form form = 16;
102+
103+
// Output only. An addon containing information about outdated libraries.
104+
OutdatedLibrary outdated_library = 11;
105+
106+
// Output only. An addon containing detailed information regarding any resource causing the
107+
// vulnerability such as JavaScript sources, image, audio files, etc.
108+
ViolatingResource violating_resource = 12;
109+
110+
// Output only. An addon containing information about vulnerable or missing HTTP headers.
111+
VulnerableHeaders vulnerable_headers = 15;
112+
113+
// Output only. An addon containing information about request parameters which were found
114+
// to be vulnerable.
115+
VulnerableParameters vulnerable_parameters = 13;
116+
117+
// Output only. An addon containing information reported for an XSS, if any.
118+
Xss xss = 14;
119+
}

0 commit comments

Comments
 (0)