cloudmersive-virus-scan-api-client 2.0.8 → 2.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -4
- data/docs/AdditionalAdvancedScanInformation.md +9 -0
- data/docs/ScanApi.md +4 -0
- data/docs/VirusScanAdvancedResult.md +3 -0
- data/lib/cloudmersive-virus-scan-api-client/api/scan_api.rb +6 -0
- data/lib/cloudmersive-virus-scan-api-client/models/additional_advanced_scan_information.rb +196 -0
- data/lib/cloudmersive-virus-scan-api-client/models/virus_scan_advanced_result.rb +34 -4
- data/lib/cloudmersive-virus-scan-api-client/version.rb +1 -1
- data/lib/cloudmersive-virus-scan-api-client.rb +1 -0
- data/spec/api/scan_api_spec.rb +2 -0
- data/spec/models/additional_advanced_scan_information_spec.rb +47 -0
- data/spec/models/virus_scan_advanced_result_spec.rb +18 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 137bd7763b18f850e5041a72ce7d0b47f5aa314a99c78feb1639c21fa54bb782
|
4
|
+
data.tar.gz: 6380f584c660cf63ddbc8ab1715031b59607446775cb0ed70e1bca82b0d987ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af3451faa07d54652ef015cf871889e8d4ded02e389140f117f1ef4206267bd0309d30005507d1036b6378744c114e52ebe5c99ede84cfc69feaa5945138ec57
|
7
|
+
data.tar.gz: bf5de355966f1ca791cd085ec6956f8bdd97d675cb5c96cdad416e7f879407646afeed6c5cefbc32b4e896c655adb01bceea90a64c387b43f4798987ada6bf6a
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ The Cloudmersive Virus Scan API lets you scan files and content for viruses and
|
|
7
7
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
8
|
|
9
9
|
- API version: v1
|
10
|
-
- Package version: 2.0.
|
10
|
+
- Package version: 2.0.9
|
11
11
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
12
12
|
|
13
13
|
## Installation
|
@@ -23,15 +23,15 @@ gem build cloudmersive-virus-scan-api-client.gemspec
|
|
23
23
|
Then either install the gem locally:
|
24
24
|
|
25
25
|
```shell
|
26
|
-
gem install ./cloudmersive-virus-scan-api-client-2.0.
|
26
|
+
gem install ./cloudmersive-virus-scan-api-client-2.0.9.gem
|
27
27
|
```
|
28
|
-
(for development, run `gem install --dev ./cloudmersive-virus-scan-api-client-2.0.
|
28
|
+
(for development, run `gem install --dev ./cloudmersive-virus-scan-api-client-2.0.9.gem` to install the development dependencies)
|
29
29
|
|
30
30
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
31
31
|
|
32
32
|
Finally add this to the Gemfile:
|
33
33
|
|
34
|
-
gem 'cloudmersive-virus-scan-api-client', '~> 2.0.
|
34
|
+
gem 'cloudmersive-virus-scan-api-client', '~> 2.0.9'
|
35
35
|
|
36
36
|
### Install from Git
|
37
37
|
|
@@ -98,6 +98,7 @@ Class | Method | HTTP request | Description
|
|
98
98
|
|
99
99
|
## Documentation for Models
|
100
100
|
|
101
|
+
- [CloudmersiveVirusScanApiClient::AdditionalAdvancedScanInformation](docs/AdditionalAdvancedScanInformation.md)
|
101
102
|
- [CloudmersiveVirusScanApiClient::CloudStorageAdvancedVirusScanResult](docs/CloudStorageAdvancedVirusScanResult.md)
|
102
103
|
- [CloudmersiveVirusScanApiClient::CloudStorageVirusFound](docs/CloudStorageVirusFound.md)
|
103
104
|
- [CloudmersiveVirusScanApiClient::CloudStorageVirusScanResult](docs/CloudStorageVirusScanResult.md)
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# CloudmersiveVirusScanApiClient::AdditionalAdvancedScanInformation
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**contains_json** | **BOOLEAN** | True if the input file contains JSON data, false otherwise; this is not a threat signal | [optional]
|
7
|
+
**contains_xml** | **BOOLEAN** | True if the input file contains XML data, false otherwise; this is not a threat signal | [optional]
|
8
|
+
|
9
|
+
|
data/docs/ScanApi.md
CHANGED
@@ -93,6 +93,8 @@ opts = {
|
|
93
93
|
allow_password_protected_files: true, # BOOLEAN | Set to false to block password protected and encrypted files, such as encrypted zip and rar files, and other files that seek to circumvent scanning through passwords. Set to true to allow these file types. Default is false (recommended).
|
94
94
|
allow_macros: true, # BOOLEAN | Set to false to block macros and other threats embedded in document files, such as Word, Excel and PowerPoint embedded Macros, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
|
95
95
|
allow_xml_external_entities: true, # BOOLEAN | Set to false to block XML External Entities and other threats embedded in XML files, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
|
96
|
+
allow_insecure_deserialization: true, # BOOLEAN | Set to false to block Insecure Deserialization and other threats embedded in JSON and other object serialization files, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
|
97
|
+
allow_html: true, # BOOLEAN | Set to false to block HTML input in the top level file; HTML can contain XSS, scripts, local file accesses and other threats. Set to true to allow these file types. Default is false (recommended) [for API keys created prior to the release of this feature default is true for backward compatability].
|
96
98
|
restrict_file_types: 'restrict_file_types_example' # String | Specify a restricted set of file formats to allow as clean as a comma-separated list of file formats, such as .pdf,.docx,.png would allow only PDF, PNG and Word document files. All files must pass content verification against this list of file formats, if they do not, then the result will be returned as CleanResult=false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled.
|
97
99
|
}
|
98
100
|
|
@@ -116,6 +118,8 @@ Name | Type | Description | Notes
|
|
116
118
|
**allow_password_protected_files** | **BOOLEAN**| Set to false to block password protected and encrypted files, such as encrypted zip and rar files, and other files that seek to circumvent scanning through passwords. Set to true to allow these file types. Default is false (recommended). | [optional]
|
117
119
|
**allow_macros** | **BOOLEAN**| Set to false to block macros and other threats embedded in document files, such as Word, Excel and PowerPoint embedded Macros, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended). | [optional]
|
118
120
|
**allow_xml_external_entities** | **BOOLEAN**| Set to false to block XML External Entities and other threats embedded in XML files, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended). | [optional]
|
121
|
+
**allow_insecure_deserialization** | **BOOLEAN**| Set to false to block Insecure Deserialization and other threats embedded in JSON and other object serialization files, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended). | [optional]
|
122
|
+
**allow_html** | **BOOLEAN**| Set to false to block HTML input in the top level file; HTML can contain XSS, scripts, local file accesses and other threats. Set to true to allow these file types. Default is false (recommended) [for API keys created prior to the release of this feature default is true for backward compatability]. | [optional]
|
119
123
|
**restrict_file_types** | **String**| Specify a restricted set of file formats to allow as clean as a comma-separated list of file formats, such as .pdf,.docx,.png would allow only PDF, PNG and Word document files. All files must pass content verification against this list of file formats, if they do not, then the result will be returned as CleanResult=false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled. | [optional]
|
120
124
|
|
121
125
|
### Return type
|
@@ -11,7 +11,10 @@ Name | Type | Description | Notes
|
|
11
11
|
**contains_restricted_file_format** | **BOOLEAN** | True if the uploaded file is of a type that is not allowed based on the optional restrictFileTypes parameter, false otherwise; if restrictFileTypes is not set, this will always be false | [optional]
|
12
12
|
**contains_macros** | **BOOLEAN** | True if the uploaded file contains embedded Macros of other embedded threats within the document, which can be a significant risk factor | [optional]
|
13
13
|
**contains_xml_external_entities** | **BOOLEAN** | True if the uploaded file contains embedded XML External Entity threats of other embedded threats within the document, which can be a significant risk factor | [optional]
|
14
|
+
**contains_insecure_deserialization** | **BOOLEAN** | True if the uploaded file contains embedded Insecure Deserialization threats of other embedded threats within the document, which can be a significant risk factor | [optional]
|
15
|
+
**contains_html** | **BOOLEAN** | True if the uploaded file contains HTML, which can be a significant risk factor | [optional]
|
14
16
|
**verified_file_format** | **String** | For file format verification-supported file formats, the contents-verified file format of the file. Null indicates that the file format is not supported for contents verification. If a Virus or Malware is found, this field will always be set to Null. | [optional]
|
15
17
|
**found_viruses** | [**Array<VirusFound>**](VirusFound.md) | Array of viruses found, if any | [optional]
|
18
|
+
**content_information** | [**AdditionalAdvancedScanInformation**](AdditionalAdvancedScanInformation.md) | Contains additional non-threat content verification information | [optional]
|
16
19
|
|
17
20
|
|
@@ -84,6 +84,8 @@ module CloudmersiveVirusScanApiClient
|
|
84
84
|
# @option opts [BOOLEAN] :allow_password_protected_files Set to false to block password protected and encrypted files, such as encrypted zip and rar files, and other files that seek to circumvent scanning through passwords. Set to true to allow these file types. Default is false (recommended).
|
85
85
|
# @option opts [BOOLEAN] :allow_macros Set to false to block macros and other threats embedded in document files, such as Word, Excel and PowerPoint embedded Macros, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
|
86
86
|
# @option opts [BOOLEAN] :allow_xml_external_entities Set to false to block XML External Entities and other threats embedded in XML files, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
|
87
|
+
# @option opts [BOOLEAN] :allow_insecure_deserialization Set to false to block Insecure Deserialization and other threats embedded in JSON and other object serialization files, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
|
88
|
+
# @option opts [BOOLEAN] :allow_html Set to false to block HTML input in the top level file; HTML can contain XSS, scripts, local file accesses and other threats. Set to true to allow these file types. Default is false (recommended) [for API keys created prior to the release of this feature default is true for backward compatability].
|
87
89
|
# @option opts [String] :restrict_file_types Specify a restricted set of file formats to allow as clean as a comma-separated list of file formats, such as .pdf,.docx,.png would allow only PDF, PNG and Word document files. All files must pass content verification against this list of file formats, if they do not, then the result will be returned as CleanResult=false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled.
|
88
90
|
# @return [VirusScanAdvancedResult]
|
89
91
|
def scan_file_advanced(input_file, opts = {})
|
@@ -101,6 +103,8 @@ module CloudmersiveVirusScanApiClient
|
|
101
103
|
# @option opts [BOOLEAN] :allow_password_protected_files Set to false to block password protected and encrypted files, such as encrypted zip and rar files, and other files that seek to circumvent scanning through passwords. Set to true to allow these file types. Default is false (recommended).
|
102
104
|
# @option opts [BOOLEAN] :allow_macros Set to false to block macros and other threats embedded in document files, such as Word, Excel and PowerPoint embedded Macros, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
|
103
105
|
# @option opts [BOOLEAN] :allow_xml_external_entities Set to false to block XML External Entities and other threats embedded in XML files, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
|
106
|
+
# @option opts [BOOLEAN] :allow_insecure_deserialization Set to false to block Insecure Deserialization and other threats embedded in JSON and other object serialization files, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
|
107
|
+
# @option opts [BOOLEAN] :allow_html Set to false to block HTML input in the top level file; HTML can contain XSS, scripts, local file accesses and other threats. Set to true to allow these file types. Default is false (recommended) [for API keys created prior to the release of this feature default is true for backward compatability].
|
104
108
|
# @option opts [String] :restrict_file_types Specify a restricted set of file formats to allow as clean as a comma-separated list of file formats, such as .pdf,.docx,.png would allow only PDF, PNG and Word document files. All files must pass content verification against this list of file formats, if they do not, then the result will be returned as CleanResult=false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled.
|
105
109
|
# @return [Array<(VirusScanAdvancedResult, Fixnum, Hash)>] VirusScanAdvancedResult data, response status code and response headers
|
106
110
|
def scan_file_advanced_with_http_info(input_file, opts = {})
|
@@ -129,6 +133,8 @@ module CloudmersiveVirusScanApiClient
|
|
129
133
|
header_params[:'allowPasswordProtectedFiles'] = opts[:'allow_password_protected_files'] if !opts[:'allow_password_protected_files'].nil?
|
130
134
|
header_params[:'allowMacros'] = opts[:'allow_macros'] if !opts[:'allow_macros'].nil?
|
131
135
|
header_params[:'allowXmlExternalEntities'] = opts[:'allow_xml_external_entities'] if !opts[:'allow_xml_external_entities'].nil?
|
136
|
+
header_params[:'allowInsecureDeserialization'] = opts[:'allow_insecure_deserialization'] if !opts[:'allow_insecure_deserialization'].nil?
|
137
|
+
header_params[:'allowHtml'] = opts[:'allow_html'] if !opts[:'allow_html'].nil?
|
132
138
|
header_params[:'restrictFileTypes'] = opts[:'restrict_file_types'] if !opts[:'restrict_file_types'].nil?
|
133
139
|
|
134
140
|
# form parameters
|
@@ -0,0 +1,196 @@
|
|
1
|
+
=begin
|
2
|
+
#virusapi
|
3
|
+
|
4
|
+
#The Cloudmersive Virus Scan API lets you scan files and content for viruses and identify security issues with content.
|
5
|
+
|
6
|
+
OpenAPI spec version: v1
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module CloudmersiveVirusScanApiClient
|
16
|
+
# Additional non-threat content verification information
|
17
|
+
class AdditionalAdvancedScanInformation
|
18
|
+
# True if the input file contains JSON data, false otherwise; this is not a threat signal
|
19
|
+
attr_accessor :contains_json
|
20
|
+
|
21
|
+
# True if the input file contains XML data, false otherwise; this is not a threat signal
|
22
|
+
attr_accessor :contains_xml
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'contains_json' => :'ContainsJSON',
|
28
|
+
:'contains_xml' => :'ContainsXML'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Attribute type mapping.
|
33
|
+
def self.swagger_types
|
34
|
+
{
|
35
|
+
:'contains_json' => :'BOOLEAN',
|
36
|
+
:'contains_xml' => :'BOOLEAN'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# Initializes the object
|
41
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
42
|
+
def initialize(attributes = {})
|
43
|
+
return unless attributes.is_a?(Hash)
|
44
|
+
|
45
|
+
# convert string to symbol for hash key
|
46
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
47
|
+
|
48
|
+
if attributes.has_key?(:'ContainsJSON')
|
49
|
+
self.contains_json = attributes[:'ContainsJSON']
|
50
|
+
end
|
51
|
+
|
52
|
+
if attributes.has_key?(:'ContainsXML')
|
53
|
+
self.contains_xml = attributes[:'ContainsXML']
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
58
|
+
# @return Array for valid properties with the reasons
|
59
|
+
def list_invalid_properties
|
60
|
+
invalid_properties = Array.new
|
61
|
+
invalid_properties
|
62
|
+
end
|
63
|
+
|
64
|
+
# Check to see if the all the properties in the model are valid
|
65
|
+
# @return true if the model is valid
|
66
|
+
def valid?
|
67
|
+
true
|
68
|
+
end
|
69
|
+
|
70
|
+
# Checks equality by comparing each attribute.
|
71
|
+
# @param [Object] Object to be compared
|
72
|
+
def ==(o)
|
73
|
+
return true if self.equal?(o)
|
74
|
+
self.class == o.class &&
|
75
|
+
contains_json == o.contains_json &&
|
76
|
+
contains_xml == o.contains_xml
|
77
|
+
end
|
78
|
+
|
79
|
+
# @see the `==` method
|
80
|
+
# @param [Object] Object to be compared
|
81
|
+
def eql?(o)
|
82
|
+
self == o
|
83
|
+
end
|
84
|
+
|
85
|
+
# Calculates hash code according to all attributes.
|
86
|
+
# @return [Fixnum] Hash code
|
87
|
+
def hash
|
88
|
+
[contains_json, contains_xml].hash
|
89
|
+
end
|
90
|
+
|
91
|
+
# Builds the object from hash
|
92
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
93
|
+
# @return [Object] Returns the model itself
|
94
|
+
def build_from_hash(attributes)
|
95
|
+
return nil unless attributes.is_a?(Hash)
|
96
|
+
self.class.swagger_types.each_pair do |key, type|
|
97
|
+
if type =~ /\AArray<(.*)>/i
|
98
|
+
# check to ensure the input is an array given that the attribute
|
99
|
+
# is documented as an array but the input is not
|
100
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
101
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
102
|
+
end
|
103
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
104
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
105
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
106
|
+
end
|
107
|
+
|
108
|
+
self
|
109
|
+
end
|
110
|
+
|
111
|
+
# Deserializes the data based on type
|
112
|
+
# @param string type Data type
|
113
|
+
# @param string value Value to be deserialized
|
114
|
+
# @return [Object] Deserialized data
|
115
|
+
def _deserialize(type, value)
|
116
|
+
case type.to_sym
|
117
|
+
when :DateTime
|
118
|
+
DateTime.parse(value)
|
119
|
+
when :Date
|
120
|
+
Date.parse(value)
|
121
|
+
when :String
|
122
|
+
value.to_s
|
123
|
+
when :Integer
|
124
|
+
value.to_i
|
125
|
+
when :Float
|
126
|
+
value.to_f
|
127
|
+
when :BOOLEAN
|
128
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
129
|
+
true
|
130
|
+
else
|
131
|
+
false
|
132
|
+
end
|
133
|
+
when :Object
|
134
|
+
# generic object (usually a Hash), return directly
|
135
|
+
value
|
136
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
137
|
+
inner_type = Regexp.last_match[:inner_type]
|
138
|
+
value.map { |v| _deserialize(inner_type, v) }
|
139
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
140
|
+
k_type = Regexp.last_match[:k_type]
|
141
|
+
v_type = Regexp.last_match[:v_type]
|
142
|
+
{}.tap do |hash|
|
143
|
+
value.each do |k, v|
|
144
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
145
|
+
end
|
146
|
+
end
|
147
|
+
else # model
|
148
|
+
temp_model = CloudmersiveVirusScanApiClient.const_get(type).new
|
149
|
+
temp_model.build_from_hash(value)
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
# Returns the string representation of the object
|
154
|
+
# @return [String] String presentation of the object
|
155
|
+
def to_s
|
156
|
+
to_hash.to_s
|
157
|
+
end
|
158
|
+
|
159
|
+
# to_body is an alias to to_hash (backward compatibility)
|
160
|
+
# @return [Hash] Returns the object in the form of hash
|
161
|
+
def to_body
|
162
|
+
to_hash
|
163
|
+
end
|
164
|
+
|
165
|
+
# Returns the object in the form of hash
|
166
|
+
# @return [Hash] Returns the object in the form of hash
|
167
|
+
def to_hash
|
168
|
+
hash = {}
|
169
|
+
self.class.attribute_map.each_pair do |attr, param|
|
170
|
+
value = self.send(attr)
|
171
|
+
next if value.nil?
|
172
|
+
hash[param] = _to_hash(value)
|
173
|
+
end
|
174
|
+
hash
|
175
|
+
end
|
176
|
+
|
177
|
+
# Outputs non-array value in the form of hash
|
178
|
+
# For object, use to_hash. Otherwise, just return the value
|
179
|
+
# @param [Object] value Any valid value
|
180
|
+
# @return [Hash] Returns the value in the form of hash
|
181
|
+
def _to_hash(value)
|
182
|
+
if value.is_a?(Array)
|
183
|
+
value.compact.map { |v| _to_hash(v) }
|
184
|
+
elsif value.is_a?(Hash)
|
185
|
+
{}.tap do |hash|
|
186
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
187
|
+
end
|
188
|
+
elsif value.respond_to? :to_hash
|
189
|
+
value.to_hash
|
190
|
+
else
|
191
|
+
value
|
192
|
+
end
|
193
|
+
end
|
194
|
+
|
195
|
+
end
|
196
|
+
end
|
@@ -39,12 +39,21 @@ module CloudmersiveVirusScanApiClient
|
|
39
39
|
# True if the uploaded file contains embedded XML External Entity threats of other embedded threats within the document, which can be a significant risk factor
|
40
40
|
attr_accessor :contains_xml_external_entities
|
41
41
|
|
42
|
+
# True if the uploaded file contains embedded Insecure Deserialization threats of other embedded threats within the document, which can be a significant risk factor
|
43
|
+
attr_accessor :contains_insecure_deserialization
|
44
|
+
|
45
|
+
# True if the uploaded file contains HTML, which can be a significant risk factor
|
46
|
+
attr_accessor :contains_html
|
47
|
+
|
42
48
|
# For file format verification-supported file formats, the contents-verified file format of the file. Null indicates that the file format is not supported for contents verification. If a Virus or Malware is found, this field will always be set to Null.
|
43
49
|
attr_accessor :verified_file_format
|
44
50
|
|
45
51
|
# Array of viruses found, if any
|
46
52
|
attr_accessor :found_viruses
|
47
53
|
|
54
|
+
# Contains additional non-threat content verification information
|
55
|
+
attr_accessor :content_information
|
56
|
+
|
48
57
|
# Attribute mapping from ruby-style variable name to JSON key.
|
49
58
|
def self.attribute_map
|
50
59
|
{
|
@@ -56,8 +65,11 @@ module CloudmersiveVirusScanApiClient
|
|
56
65
|
:'contains_restricted_file_format' => :'ContainsRestrictedFileFormat',
|
57
66
|
:'contains_macros' => :'ContainsMacros',
|
58
67
|
:'contains_xml_external_entities' => :'ContainsXmlExternalEntities',
|
68
|
+
:'contains_insecure_deserialization' => :'ContainsInsecureDeserialization',
|
69
|
+
:'contains_html' => :'ContainsHtml',
|
59
70
|
:'verified_file_format' => :'VerifiedFileFormat',
|
60
|
-
:'found_viruses' => :'FoundViruses'
|
71
|
+
:'found_viruses' => :'FoundViruses',
|
72
|
+
:'content_information' => :'ContentInformation'
|
61
73
|
}
|
62
74
|
end
|
63
75
|
|
@@ -72,8 +84,11 @@ module CloudmersiveVirusScanApiClient
|
|
72
84
|
:'contains_restricted_file_format' => :'BOOLEAN',
|
73
85
|
:'contains_macros' => :'BOOLEAN',
|
74
86
|
:'contains_xml_external_entities' => :'BOOLEAN',
|
87
|
+
:'contains_insecure_deserialization' => :'BOOLEAN',
|
88
|
+
:'contains_html' => :'BOOLEAN',
|
75
89
|
:'verified_file_format' => :'String',
|
76
|
-
:'found_viruses' => :'Array<VirusFound>'
|
90
|
+
:'found_viruses' => :'Array<VirusFound>',
|
91
|
+
:'content_information' => :'AdditionalAdvancedScanInformation'
|
77
92
|
}
|
78
93
|
end
|
79
94
|
|
@@ -117,6 +132,14 @@ module CloudmersiveVirusScanApiClient
|
|
117
132
|
self.contains_xml_external_entities = attributes[:'ContainsXmlExternalEntities']
|
118
133
|
end
|
119
134
|
|
135
|
+
if attributes.has_key?(:'ContainsInsecureDeserialization')
|
136
|
+
self.contains_insecure_deserialization = attributes[:'ContainsInsecureDeserialization']
|
137
|
+
end
|
138
|
+
|
139
|
+
if attributes.has_key?(:'ContainsHtml')
|
140
|
+
self.contains_html = attributes[:'ContainsHtml']
|
141
|
+
end
|
142
|
+
|
120
143
|
if attributes.has_key?(:'VerifiedFileFormat')
|
121
144
|
self.verified_file_format = attributes[:'VerifiedFileFormat']
|
122
145
|
end
|
@@ -126,6 +149,10 @@ module CloudmersiveVirusScanApiClient
|
|
126
149
|
self.found_viruses = value
|
127
150
|
end
|
128
151
|
end
|
152
|
+
|
153
|
+
if attributes.has_key?(:'ContentInformation')
|
154
|
+
self.content_information = attributes[:'ContentInformation']
|
155
|
+
end
|
129
156
|
end
|
130
157
|
|
131
158
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -154,8 +181,11 @@ module CloudmersiveVirusScanApiClient
|
|
154
181
|
contains_restricted_file_format == o.contains_restricted_file_format &&
|
155
182
|
contains_macros == o.contains_macros &&
|
156
183
|
contains_xml_external_entities == o.contains_xml_external_entities &&
|
184
|
+
contains_insecure_deserialization == o.contains_insecure_deserialization &&
|
185
|
+
contains_html == o.contains_html &&
|
157
186
|
verified_file_format == o.verified_file_format &&
|
158
|
-
found_viruses == o.found_viruses
|
187
|
+
found_viruses == o.found_viruses &&
|
188
|
+
content_information == o.content_information
|
159
189
|
end
|
160
190
|
|
161
191
|
# @see the `==` method
|
@@ -167,7 +197,7 @@ module CloudmersiveVirusScanApiClient
|
|
167
197
|
# Calculates hash code according to all attributes.
|
168
198
|
# @return [Fixnum] Hash code
|
169
199
|
def hash
|
170
|
-
[clean_result, contains_executable, contains_invalid_file, contains_script, contains_password_protected_file, contains_restricted_file_format, contains_macros, contains_xml_external_entities, verified_file_format, found_viruses].hash
|
200
|
+
[clean_result, contains_executable, contains_invalid_file, contains_script, contains_password_protected_file, contains_restricted_file_format, contains_macros, contains_xml_external_entities, contains_insecure_deserialization, contains_html, verified_file_format, found_viruses, content_information].hash
|
171
201
|
end
|
172
202
|
|
173
203
|
# Builds the object from hash
|
@@ -17,6 +17,7 @@ require 'cloudmersive-virus-scan-api-client/version'
|
|
17
17
|
require 'cloudmersive-virus-scan-api-client/configuration'
|
18
18
|
|
19
19
|
# Models
|
20
|
+
require 'cloudmersive-virus-scan-api-client/models/additional_advanced_scan_information'
|
20
21
|
require 'cloudmersive-virus-scan-api-client/models/cloud_storage_advanced_virus_scan_result'
|
21
22
|
require 'cloudmersive-virus-scan-api-client/models/cloud_storage_virus_found'
|
22
23
|
require 'cloudmersive-virus-scan-api-client/models/cloud_storage_virus_scan_result'
|
data/spec/api/scan_api_spec.rb
CHANGED
@@ -55,6 +55,8 @@ describe 'ScanApi' do
|
|
55
55
|
# @option opts [BOOLEAN] :allow_password_protected_files Set to false to block password protected and encrypted files, such as encrypted zip and rar files, and other files that seek to circumvent scanning through passwords. Set to true to allow these file types. Default is false (recommended).
|
56
56
|
# @option opts [BOOLEAN] :allow_macros Set to false to block macros and other threats embedded in document files, such as Word, Excel and PowerPoint embedded Macros, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
|
57
57
|
# @option opts [BOOLEAN] :allow_xml_external_entities Set to false to block XML External Entities and other threats embedded in XML files, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
|
58
|
+
# @option opts [BOOLEAN] :allow_insecure_deserialization Set to false to block Insecure Deserialization and other threats embedded in JSON and other object serialization files, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
|
59
|
+
# @option opts [BOOLEAN] :allow_html Set to false to block HTML input in the top level file; HTML can contain XSS, scripts, local file accesses and other threats. Set to true to allow these file types. Default is false (recommended) [for API keys created prior to the release of this feature default is true for backward compatability].
|
58
60
|
# @option opts [String] :restrict_file_types Specify a restricted set of file formats to allow as clean as a comma-separated list of file formats, such as .pdf,.docx,.png would allow only PDF, PNG and Word document files. All files must pass content verification against this list of file formats, if they do not, then the result will be returned as CleanResult=false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled.
|
59
61
|
# @return [VirusScanAdvancedResult]
|
60
62
|
describe 'scan_file_advanced test' do
|
@@ -0,0 +1,47 @@
|
|
1
|
+
=begin
|
2
|
+
#virusapi
|
3
|
+
|
4
|
+
#The Cloudmersive Virus Scan API lets you scan files and content for viruses and identify security issues with content.
|
5
|
+
|
6
|
+
OpenAPI spec version: v1
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for CloudmersiveVirusScanApiClient::AdditionalAdvancedScanInformation
|
18
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'AdditionalAdvancedScanInformation' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = CloudmersiveVirusScanApiClient::AdditionalAdvancedScanInformation.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of AdditionalAdvancedScanInformation' do
|
31
|
+
it 'should create an instance of AdditionalAdvancedScanInformation' do
|
32
|
+
expect(@instance).to be_instance_of(CloudmersiveVirusScanApiClient::AdditionalAdvancedScanInformation)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "contains_json"' do
|
36
|
+
it 'should work' do
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe 'test attribute "contains_xml"' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
@@ -80,6 +80,18 @@ describe 'VirusScanAdvancedResult' do
|
|
80
80
|
end
|
81
81
|
end
|
82
82
|
|
83
|
+
describe 'test attribute "contains_insecure_deserialization"' do
|
84
|
+
it 'should work' do
|
85
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
describe 'test attribute "contains_html"' do
|
90
|
+
it 'should work' do
|
91
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
83
95
|
describe 'test attribute "verified_file_format"' do
|
84
96
|
it 'should work' do
|
85
97
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -92,4 +104,10 @@ describe 'VirusScanAdvancedResult' do
|
|
92
104
|
end
|
93
105
|
end
|
94
106
|
|
107
|
+
describe 'test attribute "content_information"' do
|
108
|
+
it 'should work' do
|
109
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
95
113
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloudmersive-virus-scan-api-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cloudmersive
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -202,6 +202,7 @@ files:
|
|
202
202
|
- "./README.md"
|
203
203
|
- "./Rakefile"
|
204
204
|
- "./cloudmersive-virus-scan-api-client.gemspec"
|
205
|
+
- "./docs/AdditionalAdvancedScanInformation.md"
|
205
206
|
- "./docs/CloudStorageAdvancedVirusScanResult.md"
|
206
207
|
- "./docs/CloudStorageVirusFound.md"
|
207
208
|
- "./docs/CloudStorageVirusScanResult.md"
|
@@ -219,6 +220,7 @@ files:
|
|
219
220
|
- "./lib/cloudmersive-virus-scan-api-client/api_client.rb"
|
220
221
|
- "./lib/cloudmersive-virus-scan-api-client/api_error.rb"
|
221
222
|
- "./lib/cloudmersive-virus-scan-api-client/configuration.rb"
|
223
|
+
- "./lib/cloudmersive-virus-scan-api-client/models/additional_advanced_scan_information.rb"
|
222
224
|
- "./lib/cloudmersive-virus-scan-api-client/models/cloud_storage_advanced_virus_scan_result.rb"
|
223
225
|
- "./lib/cloudmersive-virus-scan-api-client/models/cloud_storage_virus_found.rb"
|
224
226
|
- "./lib/cloudmersive-virus-scan-api-client/models/cloud_storage_virus_scan_result.rb"
|
@@ -232,6 +234,7 @@ files:
|
|
232
234
|
- "./spec/api/scan_cloud_storage_api_spec.rb"
|
233
235
|
- "./spec/api_client_spec.rb"
|
234
236
|
- "./spec/configuration_spec.rb"
|
237
|
+
- "./spec/models/additional_advanced_scan_information_spec.rb"
|
235
238
|
- "./spec/models/cloud_storage_advanced_virus_scan_result_spec.rb"
|
236
239
|
- "./spec/models/cloud_storage_virus_found_spec.rb"
|
237
240
|
- "./spec/models/cloud_storage_virus_scan_result_spec.rb"
|