cloudmersive-validate-api-client 2.1.6 → 2.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +26 -4
- data/docs/DomainApi.md +165 -0
- data/docs/HtmlSsrfDetectionResult.md +9 -0
- data/docs/IsAdminPathResponse.md +9 -0
- data/docs/PhishingCheckRequest.md +8 -0
- data/docs/PhishingCheckResponse.md +9 -0
- data/docs/SqlInjectionCheckBatchRequest.md +9 -0
- data/docs/SqlInjectionCheckBatchResponse.md +8 -0
- data/docs/SqlInjectionCheckRequestItem.md +8 -0
- data/docs/SqlInjectionDetectionResult.md +10 -0
- data/docs/TextInputApi.md +288 -1
- data/docs/UrlSafetyCheckRequestFull.md +8 -0
- data/docs/UrlSafetyCheckResponseFull.md +9 -0
- data/docs/XxeDetectionBatchRequest.md +8 -0
- data/docs/XxeDetectionBatchResponse.md +8 -0
- data/docs/XxeDetectionRequestItem.md +11 -0
- data/docs/XxeDetectionResult.md +9 -0
- data/lib/cloudmersive-validate-api-client.rb +14 -0
- data/lib/cloudmersive-validate-api-client/api/domain_api.rb +162 -0
- data/lib/cloudmersive-validate-api-client/api/text_input_api.rb +284 -2
- data/lib/cloudmersive-validate-api-client/models/html_ssrf_detection_result.rb +196 -0
- data/lib/cloudmersive-validate-api-client/models/is_admin_path_response.rb +196 -0
- data/lib/cloudmersive-validate-api-client/models/phishing_check_request.rb +186 -0
- data/lib/cloudmersive-validate-api-client/models/phishing_check_response.rb +196 -0
- data/lib/cloudmersive-validate-api-client/models/sql_injection_check_batch_request.rb +198 -0
- data/lib/cloudmersive-validate-api-client/models/sql_injection_check_batch_response.rb +188 -0
- data/lib/cloudmersive-validate-api-client/models/sql_injection_check_request_item.rb +186 -0
- data/lib/cloudmersive-validate-api-client/models/sql_injection_detection_result.rb +206 -0
- data/lib/cloudmersive-validate-api-client/models/url_safety_check_request_full.rb +186 -0
- data/lib/cloudmersive-validate-api-client/models/url_safety_check_response_full.rb +196 -0
- data/lib/cloudmersive-validate-api-client/models/xxe_detection_batch_request.rb +188 -0
- data/lib/cloudmersive-validate-api-client/models/xxe_detection_batch_response.rb +188 -0
- data/lib/cloudmersive-validate-api-client/models/xxe_detection_request_item.rb +220 -0
- data/lib/cloudmersive-validate-api-client/models/xxe_detection_result.rb +196 -0
- data/lib/cloudmersive-validate-api-client/version.rb +1 -1
- data/spec/api/domain_api_spec.rb +36 -0
- data/spec/api/text_input_api_spec.rb +65 -1
- data/spec/models/html_ssrf_detection_result_spec.rb +47 -0
- data/spec/models/is_admin_path_response_spec.rb +47 -0
- data/spec/models/phishing_check_request_spec.rb +41 -0
- data/spec/models/phishing_check_response_spec.rb +47 -0
- data/spec/models/sql_injection_check_batch_request_spec.rb +47 -0
- data/spec/models/sql_injection_check_batch_response_spec.rb +41 -0
- data/spec/models/sql_injection_check_request_item_spec.rb +41 -0
- data/spec/models/sql_injection_detection_result_spec.rb +53 -0
- data/spec/models/url_safety_check_request_full_spec.rb +41 -0
- data/spec/models/url_safety_check_response_full_spec.rb +47 -0
- data/spec/models/xxe_detection_batch_request_spec.rb +41 -0
- data/spec/models/xxe_detection_batch_response_spec.rb +41 -0
- data/spec/models/xxe_detection_request_item_spec.rb +59 -0
- data/spec/models/xxe_detection_result_spec.rb +47 -0
- metadata +44 -2
@@ -0,0 +1,9 @@
|
|
1
|
+
# CloudmersiveValidateApiClient::UrlSafetyCheckResponseFull
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**clean_url** | **BOOLEAN** | True if the URL is clean, false if it is at risk of containing a safety threat or attack | [optional]
|
7
|
+
**threat_type** | **String** | Threat type identified, if any; possible values are \"ForcedDownload\", \"VirusesAndMalware\", \"Phishing\" | [optional]
|
8
|
+
|
9
|
+
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# CloudmersiveValidateApiClient::XxeDetectionBatchRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**request_items** | [**Array<XxeDetectionRequestItem>**](XxeDetectionRequestItem.md) | Multiple items to protect for XXE | [optional]
|
7
|
+
|
8
|
+
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# CloudmersiveValidateApiClient::XxeDetectionBatchResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**result_items** | [**Array<XxeDetectionResult>**](XxeDetectionResult.md) | Results from performing a batch XSS protection operation | [optional]
|
7
|
+
|
8
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# CloudmersiveValidateApiClient::XxeDetectionRequestItem
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**input_text** | **String** | Individual input text item to protect from XXE | [optional]
|
7
|
+
**allow_internet_urls** | **BOOLEAN** | Optional: Set to true to allow Internet-based dependency URLs for DTDs and other XML External Entitites, set to false to block. Default is false. | [optional]
|
8
|
+
**known_safe_urls** | **Array<String>** | Optional: Comma separated list of fully-qualified URLs that will automatically be considered safe. | [optional]
|
9
|
+
**known_unsafe_urls** | **Array<String>** | Optional: Comma separated list of fully-qualified URLs that will automatically be considered unsafe. | [optional]
|
10
|
+
|
11
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# CloudmersiveValidateApiClient::XxeDetectionResult
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
|
7
|
+
**contained_xxe** | **BOOLEAN** | True if the input contained XXE threats, false otherwise | [optional]
|
8
|
+
|
9
|
+
|
@@ -40,9 +40,11 @@ require 'cloudmersive-validate-api-client/models/get_gender_response'
|
|
40
40
|
require 'cloudmersive-validate-api-client/models/get_public_holidays_request'
|
41
41
|
require 'cloudmersive-validate-api-client/models/get_timezones_request'
|
42
42
|
require 'cloudmersive-validate-api-client/models/get_timezones_response'
|
43
|
+
require 'cloudmersive-validate-api-client/models/html_ssrf_detection_result'
|
43
44
|
require 'cloudmersive-validate-api-client/models/ip_intelligence_response'
|
44
45
|
require 'cloudmersive-validate-api-client/models/ip_reverse_dns_lookup_response'
|
45
46
|
require 'cloudmersive-validate-api-client/models/ip_threat_response'
|
47
|
+
require 'cloudmersive-validate-api-client/models/is_admin_path_response'
|
46
48
|
require 'cloudmersive-validate-api-client/models/last_name_validation_request'
|
47
49
|
require 'cloudmersive-validate-api-client/models/last_name_validation_response'
|
48
50
|
require 'cloudmersive-validate-api-client/models/lead_enrichment_request'
|
@@ -50,14 +52,22 @@ require 'cloudmersive-validate-api-client/models/lead_enrichment_response'
|
|
50
52
|
require 'cloudmersive-validate-api-client/models/normalize_address_response'
|
51
53
|
require 'cloudmersive-validate-api-client/models/parse_address_request'
|
52
54
|
require 'cloudmersive-validate-api-client/models/parse_address_response'
|
55
|
+
require 'cloudmersive-validate-api-client/models/phishing_check_request'
|
56
|
+
require 'cloudmersive-validate-api-client/models/phishing_check_response'
|
53
57
|
require 'cloudmersive-validate-api-client/models/phone_number_validate_request'
|
54
58
|
require 'cloudmersive-validate-api-client/models/phone_number_validation_response'
|
55
59
|
require 'cloudmersive-validate-api-client/models/public_holiday_occurrence'
|
56
60
|
require 'cloudmersive-validate-api-client/models/public_holidays_response'
|
57
61
|
require 'cloudmersive-validate-api-client/models/reverse_geocode_address_request'
|
58
62
|
require 'cloudmersive-validate-api-client/models/reverse_geocode_address_response'
|
63
|
+
require 'cloudmersive-validate-api-client/models/sql_injection_check_batch_request'
|
64
|
+
require 'cloudmersive-validate-api-client/models/sql_injection_check_batch_response'
|
65
|
+
require 'cloudmersive-validate-api-client/models/sql_injection_check_request_item'
|
66
|
+
require 'cloudmersive-validate-api-client/models/sql_injection_detection_result'
|
59
67
|
require 'cloudmersive-validate-api-client/models/timezone'
|
60
68
|
require 'cloudmersive-validate-api-client/models/tor_node_response'
|
69
|
+
require 'cloudmersive-validate-api-client/models/url_safety_check_request_full'
|
70
|
+
require 'cloudmersive-validate-api-client/models/url_safety_check_response_full'
|
61
71
|
require 'cloudmersive-validate-api-client/models/url_ssrf_request_batch'
|
62
72
|
require 'cloudmersive-validate-api-client/models/url_ssrf_request_full'
|
63
73
|
require 'cloudmersive-validate-api-client/models/url_ssrf_response_batch'
|
@@ -87,6 +97,10 @@ require 'cloudmersive-validate-api-client/models/xss_protection_batch_request'
|
|
87
97
|
require 'cloudmersive-validate-api-client/models/xss_protection_batch_response'
|
88
98
|
require 'cloudmersive-validate-api-client/models/xss_protection_request_item'
|
89
99
|
require 'cloudmersive-validate-api-client/models/xss_protection_result'
|
100
|
+
require 'cloudmersive-validate-api-client/models/xxe_detection_batch_request'
|
101
|
+
require 'cloudmersive-validate-api-client/models/xxe_detection_batch_response'
|
102
|
+
require 'cloudmersive-validate-api-client/models/xxe_detection_request_item'
|
103
|
+
require 'cloudmersive-validate-api-client/models/xxe_detection_result'
|
90
104
|
|
91
105
|
# APIs
|
92
106
|
require 'cloudmersive-validate-api-client/api/address_api'
|
@@ -127,6 +127,114 @@ module CloudmersiveValidateApiClient
|
|
127
127
|
end
|
128
128
|
return data, status_code, headers
|
129
129
|
end
|
130
|
+
# Check if path is a high-risk or vulnerable server administration path
|
131
|
+
# Check if the input URL or relative path is a server Administration Path, and therefore a risk or vulnerability for remote access.
|
132
|
+
# @param value URL or relative path to check, e.g. \"/admin/login\". The input is a string so be sure to enclose it in double-quotes.
|
133
|
+
# @param [Hash] opts the optional parameters
|
134
|
+
# @return [IsAdminPathResponse]
|
135
|
+
def domain_is_admin_path(value, opts = {})
|
136
|
+
data, _status_code, _headers = domain_is_admin_path_with_http_info(value, opts)
|
137
|
+
data
|
138
|
+
end
|
139
|
+
|
140
|
+
# Check if path is a high-risk or vulnerable server administration path
|
141
|
+
# Check if the input URL or relative path is a server Administration Path, and therefore a risk or vulnerability for remote access.
|
142
|
+
# @param value URL or relative path to check, e.g. \"/admin/login\". The input is a string so be sure to enclose it in double-quotes.
|
143
|
+
# @param [Hash] opts the optional parameters
|
144
|
+
# @return [Array<(IsAdminPathResponse, Fixnum, Hash)>] IsAdminPathResponse data, response status code and response headers
|
145
|
+
def domain_is_admin_path_with_http_info(value, opts = {})
|
146
|
+
if @api_client.config.debugging
|
147
|
+
@api_client.config.logger.debug 'Calling API: DomainApi.domain_is_admin_path ...'
|
148
|
+
end
|
149
|
+
# verify the required parameter 'value' is set
|
150
|
+
if @api_client.config.client_side_validation && value.nil?
|
151
|
+
fail ArgumentError, "Missing the required parameter 'value' when calling DomainApi.domain_is_admin_path"
|
152
|
+
end
|
153
|
+
# resource path
|
154
|
+
local_var_path = '/validate/domain/url/is-admin-path'
|
155
|
+
|
156
|
+
# query parameters
|
157
|
+
query_params = {}
|
158
|
+
|
159
|
+
# header parameters
|
160
|
+
header_params = {}
|
161
|
+
# HTTP header 'Accept' (if needed)
|
162
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
163
|
+
# HTTP header 'Content-Type'
|
164
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
|
165
|
+
|
166
|
+
# form parameters
|
167
|
+
form_params = {}
|
168
|
+
|
169
|
+
# http body (model)
|
170
|
+
post_body = @api_client.object_to_http_body(value)
|
171
|
+
auth_names = ['Apikey']
|
172
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
173
|
+
:header_params => header_params,
|
174
|
+
:query_params => query_params,
|
175
|
+
:form_params => form_params,
|
176
|
+
:body => post_body,
|
177
|
+
:auth_names => auth_names,
|
178
|
+
:return_type => 'IsAdminPathResponse')
|
179
|
+
if @api_client.config.debugging
|
180
|
+
@api_client.config.logger.debug "API called: DomainApi#domain_is_admin_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
181
|
+
end
|
182
|
+
return data, status_code, headers
|
183
|
+
end
|
184
|
+
# Check a URL for Phishing threats
|
185
|
+
# Checks if an input URL is at risk of being an Phishing (fake login page, or other page designed to collect information via social engineering) threat or attack.
|
186
|
+
# @param request Input URL request
|
187
|
+
# @param [Hash] opts the optional parameters
|
188
|
+
# @return [PhishingCheckResponse]
|
189
|
+
def domain_phishing_check(request, opts = {})
|
190
|
+
data, _status_code, _headers = domain_phishing_check_with_http_info(request, opts)
|
191
|
+
data
|
192
|
+
end
|
193
|
+
|
194
|
+
# Check a URL for Phishing threats
|
195
|
+
# Checks if an input URL is at risk of being an Phishing (fake login page, or other page designed to collect information via social engineering) threat or attack.
|
196
|
+
# @param request Input URL request
|
197
|
+
# @param [Hash] opts the optional parameters
|
198
|
+
# @return [Array<(PhishingCheckResponse, Fixnum, Hash)>] PhishingCheckResponse data, response status code and response headers
|
199
|
+
def domain_phishing_check_with_http_info(request, opts = {})
|
200
|
+
if @api_client.config.debugging
|
201
|
+
@api_client.config.logger.debug 'Calling API: DomainApi.domain_phishing_check ...'
|
202
|
+
end
|
203
|
+
# verify the required parameter 'request' is set
|
204
|
+
if @api_client.config.client_side_validation && request.nil?
|
205
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling DomainApi.domain_phishing_check"
|
206
|
+
end
|
207
|
+
# resource path
|
208
|
+
local_var_path = '/validate/domain/url/phishing-threat-check'
|
209
|
+
|
210
|
+
# query parameters
|
211
|
+
query_params = {}
|
212
|
+
|
213
|
+
# header parameters
|
214
|
+
header_params = {}
|
215
|
+
# HTTP header 'Accept' (if needed)
|
216
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
217
|
+
# HTTP header 'Content-Type'
|
218
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
|
219
|
+
|
220
|
+
# form parameters
|
221
|
+
form_params = {}
|
222
|
+
|
223
|
+
# http body (model)
|
224
|
+
post_body = @api_client.object_to_http_body(request)
|
225
|
+
auth_names = ['Apikey']
|
226
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
227
|
+
:header_params => header_params,
|
228
|
+
:query_params => query_params,
|
229
|
+
:form_params => form_params,
|
230
|
+
:body => post_body,
|
231
|
+
:auth_names => auth_names,
|
232
|
+
:return_type => 'PhishingCheckResponse')
|
233
|
+
if @api_client.config.debugging
|
234
|
+
@api_client.config.logger.debug "API called: DomainApi#domain_phishing_check\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
235
|
+
end
|
236
|
+
return data, status_code, headers
|
237
|
+
end
|
130
238
|
# Get WHOIS information for a domain
|
131
239
|
# Validate whether a domain name exists, and also return the full WHOIS record for that domain name. WHOIS records include all the registration details of the domain name, such as information about the domain's owners.
|
132
240
|
# @param domain Domain name to check, for example \"cloudmersive.com\". The input is a string so be sure to enclose it in double-quotes.
|
@@ -235,6 +343,60 @@ module CloudmersiveValidateApiClient
|
|
235
343
|
end
|
236
344
|
return data, status_code, headers
|
237
345
|
end
|
346
|
+
# Check a URL for safety threats
|
347
|
+
# Checks if an input URL is at risk of being a safety threat through malware, unwanted software, or social engineering threats.
|
348
|
+
# @param request Input URL request
|
349
|
+
# @param [Hash] opts the optional parameters
|
350
|
+
# @return [UrlSafetyCheckResponseFull]
|
351
|
+
def domain_safety_check(request, opts = {})
|
352
|
+
data, _status_code, _headers = domain_safety_check_with_http_info(request, opts)
|
353
|
+
data
|
354
|
+
end
|
355
|
+
|
356
|
+
# Check a URL for safety threats
|
357
|
+
# Checks if an input URL is at risk of being a safety threat through malware, unwanted software, or social engineering threats.
|
358
|
+
# @param request Input URL request
|
359
|
+
# @param [Hash] opts the optional parameters
|
360
|
+
# @return [Array<(UrlSafetyCheckResponseFull, Fixnum, Hash)>] UrlSafetyCheckResponseFull data, response status code and response headers
|
361
|
+
def domain_safety_check_with_http_info(request, opts = {})
|
362
|
+
if @api_client.config.debugging
|
363
|
+
@api_client.config.logger.debug 'Calling API: DomainApi.domain_safety_check ...'
|
364
|
+
end
|
365
|
+
# verify the required parameter 'request' is set
|
366
|
+
if @api_client.config.client_side_validation && request.nil?
|
367
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling DomainApi.domain_safety_check"
|
368
|
+
end
|
369
|
+
# resource path
|
370
|
+
local_var_path = '/validate/domain/url/safety-threat-check'
|
371
|
+
|
372
|
+
# query parameters
|
373
|
+
query_params = {}
|
374
|
+
|
375
|
+
# header parameters
|
376
|
+
header_params = {}
|
377
|
+
# HTTP header 'Accept' (if needed)
|
378
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
379
|
+
# HTTP header 'Content-Type'
|
380
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
|
381
|
+
|
382
|
+
# form parameters
|
383
|
+
form_params = {}
|
384
|
+
|
385
|
+
# http body (model)
|
386
|
+
post_body = @api_client.object_to_http_body(request)
|
387
|
+
auth_names = ['Apikey']
|
388
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
389
|
+
:header_params => header_params,
|
390
|
+
:query_params => query_params,
|
391
|
+
:form_params => form_params,
|
392
|
+
:body => post_body,
|
393
|
+
:auth_names => auth_names,
|
394
|
+
:return_type => 'UrlSafetyCheckResponseFull')
|
395
|
+
if @api_client.config.debugging
|
396
|
+
@api_client.config.logger.debug "API called: DomainApi#domain_safety_check\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
397
|
+
end
|
398
|
+
return data, status_code, headers
|
399
|
+
end
|
238
400
|
# Check a URL for SSRF threats
|
239
401
|
# Checks if an input URL is at risk of being an SSRF (Server-side request forgery) threat or attack.
|
240
402
|
# @param request Input URL request
|
@@ -19,6 +19,171 @@ module CloudmersiveValidateApiClient
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
+
# Protect html input from Server-side Request Forgery (SSRF) attacks
|
23
|
+
# Detects SSRF (Server-side request forgery) attacks and unsafe URL attacks from HTML text input, where attackers can attempt to access unsafe local or network paths in the server environment by injecting them into HTML.
|
24
|
+
# @param value User-facing HTML input.
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [HtmlSsrfDetectionResult]
|
27
|
+
def text_input_check_html_ssrf(value, opts = {})
|
28
|
+
data, _status_code, _headers = text_input_check_html_ssrf_with_http_info(value, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Protect html input from Server-side Request Forgery (SSRF) attacks
|
33
|
+
# Detects SSRF (Server-side request forgery) attacks and unsafe URL attacks from HTML text input, where attackers can attempt to access unsafe local or network paths in the server environment by injecting them into HTML.
|
34
|
+
# @param value User-facing HTML input.
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(HtmlSsrfDetectionResult, Fixnum, Hash)>] HtmlSsrfDetectionResult data, response status code and response headers
|
37
|
+
def text_input_check_html_ssrf_with_http_info(value, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: TextInputApi.text_input_check_html_ssrf ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'value' is set
|
42
|
+
if @api_client.config.client_side_validation && value.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'value' when calling TextInputApi.text_input_check_html_ssrf"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/validate/text-input/html/check/ssrf'
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = {}
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
55
|
+
# HTTP header 'Content-Type'
|
56
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
|
57
|
+
|
58
|
+
# form parameters
|
59
|
+
form_params = {}
|
60
|
+
|
61
|
+
# http body (model)
|
62
|
+
post_body = @api_client.object_to_http_body(value)
|
63
|
+
auth_names = ['Apikey']
|
64
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
65
|
+
:header_params => header_params,
|
66
|
+
:query_params => query_params,
|
67
|
+
:form_params => form_params,
|
68
|
+
:body => post_body,
|
69
|
+
:auth_names => auth_names,
|
70
|
+
:return_type => 'HtmlSsrfDetectionResult')
|
71
|
+
if @api_client.config.debugging
|
72
|
+
@api_client.config.logger.debug "API called: TextInputApi#text_input_check_html_ssrf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
73
|
+
end
|
74
|
+
return data, status_code, headers
|
75
|
+
end
|
76
|
+
# Check text input for SQL Injection (SQLI) attacks
|
77
|
+
# Detects SQL Injection (SQLI) attacks from text input.
|
78
|
+
# @param value User-facing text input.
|
79
|
+
# @param [Hash] opts the optional parameters
|
80
|
+
# @option opts [String] :detection_level Set to Normal to target a high-security SQL Injection detection level with a very low false positive rate; select High to target a very-high security SQL Injection detection level with higher false positives. Default is Normal (recommended).
|
81
|
+
# @return [SqlInjectionDetectionResult]
|
82
|
+
def text_input_check_sql_injection(value, opts = {})
|
83
|
+
data, _status_code, _headers = text_input_check_sql_injection_with_http_info(value, opts)
|
84
|
+
data
|
85
|
+
end
|
86
|
+
|
87
|
+
# Check text input for SQL Injection (SQLI) attacks
|
88
|
+
# Detects SQL Injection (SQLI) attacks from text input.
|
89
|
+
# @param value User-facing text input.
|
90
|
+
# @param [Hash] opts the optional parameters
|
91
|
+
# @option opts [String] :detection_level Set to Normal to target a high-security SQL Injection detection level with a very low false positive rate; select High to target a very-high security SQL Injection detection level with higher false positives. Default is Normal (recommended).
|
92
|
+
# @return [Array<(SqlInjectionDetectionResult, Fixnum, Hash)>] SqlInjectionDetectionResult data, response status code and response headers
|
93
|
+
def text_input_check_sql_injection_with_http_info(value, opts = {})
|
94
|
+
if @api_client.config.debugging
|
95
|
+
@api_client.config.logger.debug 'Calling API: TextInputApi.text_input_check_sql_injection ...'
|
96
|
+
end
|
97
|
+
# verify the required parameter 'value' is set
|
98
|
+
if @api_client.config.client_side_validation && value.nil?
|
99
|
+
fail ArgumentError, "Missing the required parameter 'value' when calling TextInputApi.text_input_check_sql_injection"
|
100
|
+
end
|
101
|
+
# resource path
|
102
|
+
local_var_path = '/validate/text-input/check/sql-injection'
|
103
|
+
|
104
|
+
# query parameters
|
105
|
+
query_params = {}
|
106
|
+
|
107
|
+
# header parameters
|
108
|
+
header_params = {}
|
109
|
+
# HTTP header 'Accept' (if needed)
|
110
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
111
|
+
# HTTP header 'Content-Type'
|
112
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
|
113
|
+
header_params[:'detectionLevel'] = opts[:'detection_level'] if !opts[:'detection_level'].nil?
|
114
|
+
|
115
|
+
# form parameters
|
116
|
+
form_params = {}
|
117
|
+
|
118
|
+
# http body (model)
|
119
|
+
post_body = @api_client.object_to_http_body(value)
|
120
|
+
auth_names = ['Apikey']
|
121
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
122
|
+
:header_params => header_params,
|
123
|
+
:query_params => query_params,
|
124
|
+
:form_params => form_params,
|
125
|
+
:body => post_body,
|
126
|
+
:auth_names => auth_names,
|
127
|
+
:return_type => 'SqlInjectionDetectionResult')
|
128
|
+
if @api_client.config.debugging
|
129
|
+
@api_client.config.logger.debug "API called: TextInputApi#text_input_check_sql_injection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
130
|
+
end
|
131
|
+
return data, status_code, headers
|
132
|
+
end
|
133
|
+
# Check and protect multiple text inputs for SQL Injection (SQLI) attacks in batch
|
134
|
+
# Detects SQL Injection (SQLI) attacks from multiple text inputs. Output preverses order of input items.
|
135
|
+
# @param value User-facing text input.
|
136
|
+
# @param [Hash] opts the optional parameters
|
137
|
+
# @return [SqlInjectionCheckBatchResponse]
|
138
|
+
def text_input_check_sql_injection_batch(value, opts = {})
|
139
|
+
data, _status_code, _headers = text_input_check_sql_injection_batch_with_http_info(value, opts)
|
140
|
+
data
|
141
|
+
end
|
142
|
+
|
143
|
+
# Check and protect multiple text inputs for SQL Injection (SQLI) attacks in batch
|
144
|
+
# Detects SQL Injection (SQLI) attacks from multiple text inputs. Output preverses order of input items.
|
145
|
+
# @param value User-facing text input.
|
146
|
+
# @param [Hash] opts the optional parameters
|
147
|
+
# @return [Array<(SqlInjectionCheckBatchResponse, Fixnum, Hash)>] SqlInjectionCheckBatchResponse data, response status code and response headers
|
148
|
+
def text_input_check_sql_injection_batch_with_http_info(value, opts = {})
|
149
|
+
if @api_client.config.debugging
|
150
|
+
@api_client.config.logger.debug 'Calling API: TextInputApi.text_input_check_sql_injection_batch ...'
|
151
|
+
end
|
152
|
+
# verify the required parameter 'value' is set
|
153
|
+
if @api_client.config.client_side_validation && value.nil?
|
154
|
+
fail ArgumentError, "Missing the required parameter 'value' when calling TextInputApi.text_input_check_sql_injection_batch"
|
155
|
+
end
|
156
|
+
# resource path
|
157
|
+
local_var_path = '/validate/text-input/check/sql-injection/batch'
|
158
|
+
|
159
|
+
# query parameters
|
160
|
+
query_params = {}
|
161
|
+
|
162
|
+
# header parameters
|
163
|
+
header_params = {}
|
164
|
+
# HTTP header 'Accept' (if needed)
|
165
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
166
|
+
# HTTP header 'Content-Type'
|
167
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
|
168
|
+
|
169
|
+
# form parameters
|
170
|
+
form_params = {}
|
171
|
+
|
172
|
+
# http body (model)
|
173
|
+
post_body = @api_client.object_to_http_body(value)
|
174
|
+
auth_names = ['Apikey']
|
175
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
176
|
+
:header_params => header_params,
|
177
|
+
:query_params => query_params,
|
178
|
+
:form_params => form_params,
|
179
|
+
:body => post_body,
|
180
|
+
:auth_names => auth_names,
|
181
|
+
:return_type => 'SqlInjectionCheckBatchResponse')
|
182
|
+
if @api_client.config.debugging
|
183
|
+
@api_client.config.logger.debug "API called: TextInputApi#text_input_check_sql_injection_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
184
|
+
end
|
185
|
+
return data, status_code, headers
|
186
|
+
end
|
22
187
|
# Check text input for Cross-Site-Scripting (XSS) attacks
|
23
188
|
# Detects XSS (Cross-Site-Scripting) attacks from text input.
|
24
189
|
# @param value User-facing text input.
|
@@ -74,7 +239,7 @@ module CloudmersiveValidateApiClient
|
|
74
239
|
return data, status_code, headers
|
75
240
|
end
|
76
241
|
# Check and protect multiple text inputs for Cross-Site-Scripting (XSS) attacks in batch
|
77
|
-
# Detects XSS (Cross-Site-Scripting) attacks from multiple text
|
242
|
+
# Detects XSS (Cross-Site-Scripting) attacks from multiple text inputs. Output preverses order of input items.
|
78
243
|
# @param value User-facing text input.
|
79
244
|
# @param [Hash] opts the optional parameters
|
80
245
|
# @return [XssProtectionBatchResponse]
|
@@ -84,7 +249,7 @@ module CloudmersiveValidateApiClient
|
|
84
249
|
end
|
85
250
|
|
86
251
|
# Check and protect multiple text inputs for Cross-Site-Scripting (XSS) attacks in batch
|
87
|
-
# Detects XSS (Cross-Site-Scripting) attacks from multiple text
|
252
|
+
# Detects XSS (Cross-Site-Scripting) attacks from multiple text inputs. Output preverses order of input items.
|
88
253
|
# @param value User-facing text input.
|
89
254
|
# @param [Hash] opts the optional parameters
|
90
255
|
# @return [Array<(XssProtectionBatchResponse, Fixnum, Hash)>] XssProtectionBatchResponse data, response status code and response headers
|
@@ -127,6 +292,123 @@ module CloudmersiveValidateApiClient
|
|
127
292
|
end
|
128
293
|
return data, status_code, headers
|
129
294
|
end
|
295
|
+
# Protect text input from XML External Entity (XXE) attacks
|
296
|
+
# Detects XXE (XML External Entity) attacks from text input.
|
297
|
+
# @param value User-facing text input.
|
298
|
+
# @param [Hash] opts the optional parameters
|
299
|
+
# @option opts [BOOLEAN] :allow_internet_urls Optional: Set to true to allow Internet-based dependency URLs for DTDs and other XML External Entitites, set to false to block. Default is false.
|
300
|
+
# @option opts [String] :known_safe_urls Optional: Comma separated list of fully-qualified URLs that will automatically be considered safe.
|
301
|
+
# @option opts [String] :known_unsafe_urls Optional: Comma separated list of fully-qualified URLs that will automatically be considered unsafe.
|
302
|
+
# @return [XxeDetectionResult]
|
303
|
+
def text_input_check_xxe(value, opts = {})
|
304
|
+
data, _status_code, _headers = text_input_check_xxe_with_http_info(value, opts)
|
305
|
+
data
|
306
|
+
end
|
307
|
+
|
308
|
+
# Protect text input from XML External Entity (XXE) attacks
|
309
|
+
# Detects XXE (XML External Entity) attacks from text input.
|
310
|
+
# @param value User-facing text input.
|
311
|
+
# @param [Hash] opts the optional parameters
|
312
|
+
# @option opts [BOOLEAN] :allow_internet_urls Optional: Set to true to allow Internet-based dependency URLs for DTDs and other XML External Entitites, set to false to block. Default is false.
|
313
|
+
# @option opts [String] :known_safe_urls Optional: Comma separated list of fully-qualified URLs that will automatically be considered safe.
|
314
|
+
# @option opts [String] :known_unsafe_urls Optional: Comma separated list of fully-qualified URLs that will automatically be considered unsafe.
|
315
|
+
# @return [Array<(XxeDetectionResult, Fixnum, Hash)>] XxeDetectionResult data, response status code and response headers
|
316
|
+
def text_input_check_xxe_with_http_info(value, opts = {})
|
317
|
+
if @api_client.config.debugging
|
318
|
+
@api_client.config.logger.debug 'Calling API: TextInputApi.text_input_check_xxe ...'
|
319
|
+
end
|
320
|
+
# verify the required parameter 'value' is set
|
321
|
+
if @api_client.config.client_side_validation && value.nil?
|
322
|
+
fail ArgumentError, "Missing the required parameter 'value' when calling TextInputApi.text_input_check_xxe"
|
323
|
+
end
|
324
|
+
# resource path
|
325
|
+
local_var_path = '/validate/text-input/check/xxe'
|
326
|
+
|
327
|
+
# query parameters
|
328
|
+
query_params = {}
|
329
|
+
|
330
|
+
# header parameters
|
331
|
+
header_params = {}
|
332
|
+
# HTTP header 'Accept' (if needed)
|
333
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
334
|
+
# HTTP header 'Content-Type'
|
335
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
|
336
|
+
header_params[:'allowInternetUrls'] = opts[:'allow_internet_urls'] if !opts[:'allow_internet_urls'].nil?
|
337
|
+
header_params[:'knownSafeUrls'] = opts[:'known_safe_urls'] if !opts[:'known_safe_urls'].nil?
|
338
|
+
header_params[:'knownUnsafeUrls'] = opts[:'known_unsafe_urls'] if !opts[:'known_unsafe_urls'].nil?
|
339
|
+
|
340
|
+
# form parameters
|
341
|
+
form_params = {}
|
342
|
+
|
343
|
+
# http body (model)
|
344
|
+
post_body = @api_client.object_to_http_body(value)
|
345
|
+
auth_names = ['Apikey']
|
346
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
347
|
+
:header_params => header_params,
|
348
|
+
:query_params => query_params,
|
349
|
+
:form_params => form_params,
|
350
|
+
:body => post_body,
|
351
|
+
:auth_names => auth_names,
|
352
|
+
:return_type => 'XxeDetectionResult')
|
353
|
+
if @api_client.config.debugging
|
354
|
+
@api_client.config.logger.debug "API called: TextInputApi#text_input_check_xxe\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
355
|
+
end
|
356
|
+
return data, status_code, headers
|
357
|
+
end
|
358
|
+
# Protect text input from XML External Entity (XXE) attacks
|
359
|
+
# Detects XXE (XML External Entity) attacks from text input.
|
360
|
+
# @param request
|
361
|
+
# @param [Hash] opts the optional parameters
|
362
|
+
# @return [XxeDetectionBatchResponse]
|
363
|
+
def text_input_check_xxe_batch(request, opts = {})
|
364
|
+
data, _status_code, _headers = text_input_check_xxe_batch_with_http_info(request, opts)
|
365
|
+
data
|
366
|
+
end
|
367
|
+
|
368
|
+
# Protect text input from XML External Entity (XXE) attacks
|
369
|
+
# Detects XXE (XML External Entity) attacks from text input.
|
370
|
+
# @param request
|
371
|
+
# @param [Hash] opts the optional parameters
|
372
|
+
# @return [Array<(XxeDetectionBatchResponse, Fixnum, Hash)>] XxeDetectionBatchResponse data, response status code and response headers
|
373
|
+
def text_input_check_xxe_batch_with_http_info(request, opts = {})
|
374
|
+
if @api_client.config.debugging
|
375
|
+
@api_client.config.logger.debug 'Calling API: TextInputApi.text_input_check_xxe_batch ...'
|
376
|
+
end
|
377
|
+
# verify the required parameter 'request' is set
|
378
|
+
if @api_client.config.client_side_validation && request.nil?
|
379
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling TextInputApi.text_input_check_xxe_batch"
|
380
|
+
end
|
381
|
+
# resource path
|
382
|
+
local_var_path = '/validate/text-input/check/xxe/batch'
|
383
|
+
|
384
|
+
# query parameters
|
385
|
+
query_params = {}
|
386
|
+
|
387
|
+
# header parameters
|
388
|
+
header_params = {}
|
389
|
+
# HTTP header 'Accept' (if needed)
|
390
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
391
|
+
# HTTP header 'Content-Type'
|
392
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
|
393
|
+
|
394
|
+
# form parameters
|
395
|
+
form_params = {}
|
396
|
+
|
397
|
+
# http body (model)
|
398
|
+
post_body = @api_client.object_to_http_body(request)
|
399
|
+
auth_names = ['Apikey']
|
400
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
401
|
+
:header_params => header_params,
|
402
|
+
:query_params => query_params,
|
403
|
+
:form_params => form_params,
|
404
|
+
:body => post_body,
|
405
|
+
:auth_names => auth_names,
|
406
|
+
:return_type => 'XxeDetectionBatchResponse')
|
407
|
+
if @api_client.config.debugging
|
408
|
+
@api_client.config.logger.debug "API called: TextInputApi#text_input_check_xxe_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
409
|
+
end
|
410
|
+
return data, status_code, headers
|
411
|
+
end
|
130
412
|
# Protect text input from Cross-Site-Scripting (XSS) attacks through normalization
|
131
413
|
# Detects and removes XSS (Cross-Site-Scripting) attacks from text input through normalization. Returns the normalized result, as well as information on whether the original input contained an XSS risk.
|
132
414
|
# @param value User-facing text input.
|