cloudmersive-virus-scan-api-client 2.1.1 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d95b3fdf4de55c144335fcfaef9465d6068a90901b6e97d3bc45aa0aedda8c6
4
- data.tar.gz: 3cb7f7c6402819bc2a1af6beef79455f53d54c5c2dd7db18fbe21171ab1e8991
3
+ metadata.gz: 1c4fe8316f17ad8deea480acb1c0bf2f845d6e964f63f03c98a9c77a6799825d
4
+ data.tar.gz: 55367f0441cf9db6d8b6c271655c2fc7489bbf92dcf31a8daac69cedb1e11375
5
5
  SHA512:
6
- metadata.gz: 277aaa1ed6c9e2780dd3b8a39561449587b7f91beefdb734a550d4cfde68512aba1ffe006970e83db751852e4420c8698ba2f149f50f585690a615f346cf4fb4
7
- data.tar.gz: 28e8f9891589552a72f6b5e58e3f6f691974f59fd30d7120323f87fc742d232709d752ef8883695902f54790a8c2172ca1d6c396ec33cc1ca930a2c1cc5dabe2
6
+ metadata.gz: a3d0c53313e3e68ecd12127272622c1d1e39a02069dd8016854fa8f8c5bee2939e669b90b51019596d9eada1253bf59310f9d0efee1afc8649566be0a7c1d69a
7
+ data.tar.gz: 15df472b55a1741f009a60204cebb554372ab650e65f379ad02a38a0ddd95ec98c09bf93022862f163b57cd8fd56d4d7abc2f38b7065657692b2798060e55b36
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.1.1
10
+ - Package version: 2.2.0
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.1.1.gem
26
+ gem install ./cloudmersive-virus-scan-api-client-2.2.0.gem
27
27
  ```
28
- (for development, run `gem install --dev ./cloudmersive-virus-scan-api-client-2.1.1.gem` to install the development dependencies)
28
+ (for development, run `gem install --dev ./cloudmersive-virus-scan-api-client-2.2.0.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.1.1'
34
+ gem 'cloudmersive-virus-scan-api-client', '~> 2.2.0'
35
35
 
36
36
  ### Install from Git
37
37
 
@@ -6,5 +6,6 @@ Name | Type | Description | Notes
6
6
  **contains_json** | **BOOLEAN** | True if the input file contains JSON data, false otherwise; this is not a threat signal | [optional]
7
7
  **contains_xml** | **BOOLEAN** | True if the input file contains XML data, false otherwise; this is not a threat signal | [optional]
8
8
  **contains_image** | **BOOLEAN** | True if the input file contains an image | [optional]
9
+ **relevant_subfile_name** | **String** | Relevant subfile name in an archive format for identified threats, if any | [optional]
9
10
 
10
11
 
data/docs/ScanApi.md CHANGED
@@ -87,6 +87,7 @@ api_instance = CloudmersiveVirusScanApiClient::ScanApi.new
87
87
  input_file = File.new('/path/to/file.txt') # File | Input file to perform the operation on.
88
88
 
89
89
  opts = {
90
+ file_name: 'file_name_example', # String | Optional: specify the original file name of the file being scanned. By default the file name is taken from inputFile parameter, but if this is not provided, or you wish to override it, you can specify the original file name using this parameter.
90
91
  allow_executables: true, # BOOLEAN | Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
91
92
  allow_invalid_files: true, # BOOLEAN | Set to false to block invalid files, such as a PDF file that is not really a valid PDF file, or a Word Document that is not a valid Word Document. Default is false (recommended).
92
93
  allow_scripts: true, # BOOLEAN | Set to false to block script files, such as a PHP files, Python scripts, and other malicious content or security threats that can be embedded in the file. Set to true to allow these file types. Default is false (recommended).
@@ -95,6 +96,9 @@ opts = {
95
96
  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
97
  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
98
  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]. If set to true, HTML files containing script tags will be allowed, but ContainsScript will be set to true if script tags are present.
99
+ allow_unsafe_archives: true, # BOOLEAN | Set to false to block unsafe archives such as Zip Bombs, and other archives that can cause unsafe extraction outcomes. Default is false (recommended). If set to true, unsafe archives will be allowed.
100
+ allow_ole_embedded_object: true, # BOOLEAN | Set to false to block OLE embedded objects, which can contain vulnerabilities and executable code. Default is false (recommended). If set to true, OLE embedded objects will be allowed.
101
+ options: 'options_example', # String | Comma separated set of configuration operations. Include permitJavascriptAndHtmlInPDFs to allow JavaScript and HTML in PDF files. Default is no options.
98
102
  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.
99
103
  }
100
104
 
@@ -112,6 +116,7 @@ end
112
116
  Name | Type | Description | Notes
113
117
  ------------- | ------------- | ------------- | -------------
114
118
  **input_file** | **File**| Input file to perform the operation on. |
119
+ **file_name** | **String**| Optional: specify the original file name of the file being scanned. By default the file name is taken from inputFile parameter, but if this is not provided, or you wish to override it, you can specify the original file name using this parameter. | [optional]
115
120
  **allow_executables** | **BOOLEAN**| Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended). | [optional]
116
121
  **allow_invalid_files** | **BOOLEAN**| Set to false to block invalid files, such as a PDF file that is not really a valid PDF file, or a Word Document that is not a valid Word Document. Default is false (recommended). | [optional]
117
122
  **allow_scripts** | **BOOLEAN**| Set to false to block script files, such as a PHP files, Python scripts, and other malicious content or security threats that can be embedded in the file. Set to true to allow these file types. Default is false (recommended). | [optional]
@@ -120,6 +125,9 @@ Name | Type | Description | Notes
120
125
  **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
126
  **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
127
  **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]. If set to true, HTML files containing script tags will be allowed, but ContainsScript will be set to true if script tags are present. | [optional]
128
+ **allow_unsafe_archives** | **BOOLEAN**| Set to false to block unsafe archives such as Zip Bombs, and other archives that can cause unsafe extraction outcomes. Default is false (recommended). If set to true, unsafe archives will be allowed. | [optional]
129
+ **allow_ole_embedded_object** | **BOOLEAN**| Set to false to block OLE embedded objects, which can contain vulnerabilities and executable code. Default is false (recommended). If set to true, OLE embedded objects will be allowed. | [optional]
130
+ **options** | **String**| Comma separated set of configuration operations. Include permitJavascriptAndHtmlInPDFs to allow JavaScript and HTML in PDF files. Default is no options. | [optional]
123
131
  **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]
124
132
 
125
133
  ### Return type
@@ -15,7 +15,7 @@ Method | HTTP request | Description
15
15
 
16
16
 
17
17
  # **scan_cloud_storage_scan_aws_s3_file**
18
- > CloudStorageVirusScanResult scan_cloud_storage_scan_aws_s3_file(access_key, secret_key, bucket_region, bucket_name, key_name)
18
+ > CloudStorageVirusScanResult scan_cloud_storage_scan_aws_s3_file(access_key, secret_key, bucket_region, bucket_name, key_name, opts)
19
19
 
20
20
  Scan an AWS S3 file for viruses
21
21
 
@@ -45,10 +45,13 @@ bucket_name = 'bucket_name_example' # String | Name of the S3 bucket
45
45
 
46
46
  key_name = 'key_name_example' # String | Key name (also called file name) of the file in S3 that you wish to scan for viruses. If the key name contains Unicode characters, you must base64 encode the key name and prepend it with 'base64:', such as: 'base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV'.
47
47
 
48
+ opts = {
49
+ role_arn: 'role_arn_example' # String | Optional: Role ARN for STS Credential-based access. This is for advanced access using the Security Token Service and is not required. If the roleArn contains Unicode characters, you must base64 encode the key name and prepend it with 'base64:', such as: 'base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV'.
50
+ }
48
51
 
49
52
  begin
50
53
  #Scan an AWS S3 file for viruses
51
- result = api_instance.scan_cloud_storage_scan_aws_s3_file(access_key, secret_key, bucket_region, bucket_name, key_name)
54
+ result = api_instance.scan_cloud_storage_scan_aws_s3_file(access_key, secret_key, bucket_region, bucket_name, key_name, opts)
52
55
  p result
53
56
  rescue CloudmersiveVirusScanApiClient::ApiError => e
54
57
  puts "Exception when calling ScanCloudStorageApi->scan_cloud_storage_scan_aws_s3_file: #{e}"
@@ -64,6 +67,7 @@ Name | Type | Description | Notes
64
67
  **bucket_region** | **String**| Name of the region of the S3 bucket, such as 'US-East-1' |
65
68
  **bucket_name** | **String**| Name of the S3 bucket |
66
69
  **key_name** | **String**| Key name (also called file name) of the file in S3 that you wish to scan for viruses. If the key name contains Unicode characters, you must base64 encode the key name and prepend it with 'base64:', such as: 'base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV'. |
70
+ **role_arn** | **String**| Optional: Role ARN for STS Credential-based access. This is for advanced access using the Security Token Service and is not required. If the roleArn contains Unicode characters, you must base64 encode the key name and prepend it with 'base64:', such as: 'base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV'. | [optional]
67
71
 
68
72
  ### Return type
69
73
 
@@ -112,6 +116,7 @@ bucket_name = 'bucket_name_example' # String | Name of the S3 bucket
112
116
  key_name = 'key_name_example' # String | Key name (also called file name) of the file in S3 that you wish to scan for viruses. If the key name contains Unicode characters, you must base64 encode the key name and prepend it with 'base64:', such as: 'base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV'.
113
117
 
114
118
  opts = {
119
+ role_arn: 'role_arn_example', # String | Optional: Role ARN for STS Credential-based access. This is for advanced access using the Security Token Service and is not required. If the roleArn contains Unicode characters, you must base64 encode the key name and prepend it with 'base64:', such as: 'base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV'.
115
120
  allow_executables: true, # BOOLEAN | Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
116
121
  allow_invalid_files: true, # BOOLEAN | Set to false to block invalid files, such as a PDF file that is not really a valid PDF file, or a Word Document that is not a valid Word Document. Default is false (recommended).
117
122
  allow_scripts: true, # BOOLEAN | Set to false to block script files, such as a PHP files, Python scripts, and other malicious content or security threats that can be embedded in the file. Set to true to allow these file types. Default is false (recommended).
@@ -141,6 +146,7 @@ Name | Type | Description | Notes
141
146
  **bucket_region** | **String**| Name of the region of the S3 bucket, such as 'US-East-1' |
142
147
  **bucket_name** | **String**| Name of the S3 bucket |
143
148
  **key_name** | **String**| Key name (also called file name) of the file in S3 that you wish to scan for viruses. If the key name contains Unicode characters, you must base64 encode the key name and prepend it with 'base64:', such as: 'base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV'. |
149
+ **role_arn** | **String**| Optional: Role ARN for STS Credential-based access. This is for advanced access using the Security Token Service and is not required. If the roleArn contains Unicode characters, you must base64 encode the key name and prepend it with 'base64:', such as: 'base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV'. | [optional]
144
150
  **allow_executables** | **BOOLEAN**| Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended). | [optional]
145
151
  **allow_invalid_files** | **BOOLEAN**| Set to false to block invalid files, such as a PDF file that is not really a valid PDF file, or a Word Document that is not a valid Word Document. Default is false (recommended). | [optional]
146
152
  **allow_scripts** | **BOOLEAN**| Set to false to block script files, such as a PHP files, Python scripts, and other malicious content or security threats that can be embedded in the file. Set to true to allow these file types. Default is false (recommended). | [optional]
@@ -13,6 +13,8 @@ Name | Type | Description | Notes
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
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
15
  **contains_html** | **BOOLEAN** | True if the uploaded file contains HTML, which can be a significant risk factor | [optional]
16
+ **contains_unsafe_archive** | **BOOLEAN** | True if the uploaded file contains unsafe archive (e.g. zip) content, such as a Zip Bomb, or other configurations of a zip file that could lead to an unsafe extraction | [optional]
17
+ **contains_ole_embedded_object** | **BOOLEAN** | True if the uploaded file contains an OLE embedded object, which can be a significant risk factor | [optional]
16
18
  **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]
17
19
  **found_viruses** | [**Array<VirusFound>**](VirusFound.md) | Array of viruses found, if any | [optional]
18
20
  **content_information** | [**AdditionalAdvancedScanInformation**](AdditionalAdvancedScanInformation.md) | Contains additional non-threat content verification information | [optional]
@@ -78,6 +78,7 @@ module CloudmersiveVirusScanApiClient
78
78
  # Advanced Scan files with 360-degree Content Protection across Viruses and Malware, executables, invalid files, scripts, and even restrictions on accepted file types with complete content verification. Customize threat rules to your needs. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Block threats beyond viruses including executables, scripts, invalid files, and more. Optionally limit input files to a specific set of file types (e.g. PDF and Word Documents only). Wide file format support including Office, PDF, HTML, Flash, MSG, and a wide range of image file formats. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time.
79
79
  # @param input_file Input file to perform the operation on.
80
80
  # @param [Hash] opts the optional parameters
81
+ # @option opts [String] :file_name Optional: specify the original file name of the file being scanned. By default the file name is taken from inputFile parameter, but if this is not provided, or you wish to override it, you can specify the original file name using this parameter.
81
82
  # @option opts [BOOLEAN] :allow_executables Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
82
83
  # @option opts [BOOLEAN] :allow_invalid_files Set to false to block invalid files, such as a PDF file that is not really a valid PDF file, or a Word Document that is not a valid Word Document. Default is false (recommended).
83
84
  # @option opts [BOOLEAN] :allow_scripts Set to false to block script files, such as a PHP files, Python scripts, and other malicious content or security threats that can be embedded in the file. Set to true to allow these file types. Default is false (recommended).
@@ -86,6 +87,9 @@ module CloudmersiveVirusScanApiClient
86
87
  # @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
88
  # @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
89
  # @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]. If set to true, HTML files containing script tags will be allowed, but ContainsScript will be set to true if script tags are present.
90
+ # @option opts [BOOLEAN] :allow_unsafe_archives Set to false to block unsafe archives such as Zip Bombs, and other archives that can cause unsafe extraction outcomes. Default is false (recommended). If set to true, unsafe archives will be allowed.
91
+ # @option opts [BOOLEAN] :allow_ole_embedded_object Set to false to block OLE embedded objects, which can contain vulnerabilities and executable code. Default is false (recommended). If set to true, OLE embedded objects will be allowed.
92
+ # @option opts [String] :options Comma separated set of configuration operations. Include permitJavascriptAndHtmlInPDFs to allow JavaScript and HTML in PDF files. Default is no options.
89
93
  # @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.
90
94
  # @return [VirusScanAdvancedResult]
91
95
  def scan_file_advanced(input_file, opts = {})
@@ -97,6 +101,7 @@ module CloudmersiveVirusScanApiClient
97
101
  # Advanced Scan files with 360-degree Content Protection across Viruses and Malware, executables, invalid files, scripts, and even restrictions on accepted file types with complete content verification. Customize threat rules to your needs. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Block threats beyond viruses including executables, scripts, invalid files, and more. Optionally limit input files to a specific set of file types (e.g. PDF and Word Documents only). Wide file format support including Office, PDF, HTML, Flash, MSG, and a wide range of image file formats. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time.
98
102
  # @param input_file Input file to perform the operation on.
99
103
  # @param [Hash] opts the optional parameters
104
+ # @option opts [String] :file_name Optional: specify the original file name of the file being scanned. By default the file name is taken from inputFile parameter, but if this is not provided, or you wish to override it, you can specify the original file name using this parameter.
100
105
  # @option opts [BOOLEAN] :allow_executables Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
101
106
  # @option opts [BOOLEAN] :allow_invalid_files Set to false to block invalid files, such as a PDF file that is not really a valid PDF file, or a Word Document that is not a valid Word Document. Default is false (recommended).
102
107
  # @option opts [BOOLEAN] :allow_scripts Set to false to block script files, such as a PHP files, Python scripts, and other malicious content or security threats that can be embedded in the file. Set to true to allow these file types. Default is false (recommended).
@@ -105,6 +110,9 @@ module CloudmersiveVirusScanApiClient
105
110
  # @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
111
  # @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
112
  # @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]. If set to true, HTML files containing script tags will be allowed, but ContainsScript will be set to true if script tags are present.
113
+ # @option opts [BOOLEAN] :allow_unsafe_archives Set to false to block unsafe archives such as Zip Bombs, and other archives that can cause unsafe extraction outcomes. Default is false (recommended). If set to true, unsafe archives will be allowed.
114
+ # @option opts [BOOLEAN] :allow_ole_embedded_object Set to false to block OLE embedded objects, which can contain vulnerabilities and executable code. Default is false (recommended). If set to true, OLE embedded objects will be allowed.
115
+ # @option opts [String] :options Comma separated set of configuration operations. Include permitJavascriptAndHtmlInPDFs to allow JavaScript and HTML in PDF files. Default is no options.
108
116
  # @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.
109
117
  # @return [Array<(VirusScanAdvancedResult, Fixnum, Hash)>] VirusScanAdvancedResult data, response status code and response headers
110
118
  def scan_file_advanced_with_http_info(input_file, opts = {})
@@ -127,6 +135,7 @@ module CloudmersiveVirusScanApiClient
127
135
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
128
136
  # HTTP header 'Content-Type'
129
137
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
138
+ header_params[:'fileName'] = opts[:'file_name'] if !opts[:'file_name'].nil?
130
139
  header_params[:'allowExecutables'] = opts[:'allow_executables'] if !opts[:'allow_executables'].nil?
131
140
  header_params[:'allowInvalidFiles'] = opts[:'allow_invalid_files'] if !opts[:'allow_invalid_files'].nil?
132
141
  header_params[:'allowScripts'] = opts[:'allow_scripts'] if !opts[:'allow_scripts'].nil?
@@ -135,6 +144,9 @@ module CloudmersiveVirusScanApiClient
135
144
  header_params[:'allowXmlExternalEntities'] = opts[:'allow_xml_external_entities'] if !opts[:'allow_xml_external_entities'].nil?
136
145
  header_params[:'allowInsecureDeserialization'] = opts[:'allow_insecure_deserialization'] if !opts[:'allow_insecure_deserialization'].nil?
137
146
  header_params[:'allowHtml'] = opts[:'allow_html'] if !opts[:'allow_html'].nil?
147
+ header_params[:'allowUnsafeArchives'] = opts[:'allow_unsafe_archives'] if !opts[:'allow_unsafe_archives'].nil?
148
+ header_params[:'allowOleEmbeddedObject'] = opts[:'allow_ole_embedded_object'] if !opts[:'allow_ole_embedded_object'].nil?
149
+ header_params[:'options'] = opts[:'options'] if !opts[:'options'].nil?
138
150
  header_params[:'restrictFileTypes'] = opts[:'restrict_file_types'] if !opts[:'restrict_file_types'].nil?
139
151
 
140
152
  # form parameters
@@ -27,6 +27,7 @@ module CloudmersiveVirusScanApiClient
27
27
  # @param bucket_name Name of the S3 bucket
28
28
  # @param key_name Key name (also called file name) of the file in S3 that you wish to scan for viruses. If the key name contains Unicode characters, you must base64 encode the key name and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.
29
29
  # @param [Hash] opts the optional parameters
30
+ # @option opts [String] :role_arn Optional: Role ARN for STS Credential-based access. This is for advanced access using the Security Token Service and is not required. If the roleArn contains Unicode characters, you must base64 encode the key name and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.
30
31
  # @return [CloudStorageVirusScanResult]
31
32
  def scan_cloud_storage_scan_aws_s3_file(access_key, secret_key, bucket_region, bucket_name, key_name, opts = {})
32
33
  data, _status_code, _headers = scan_cloud_storage_scan_aws_s3_file_with_http_info(access_key, secret_key, bucket_region, bucket_name, key_name, opts)
@@ -41,6 +42,7 @@ module CloudmersiveVirusScanApiClient
41
42
  # @param bucket_name Name of the S3 bucket
42
43
  # @param key_name Key name (also called file name) of the file in S3 that you wish to scan for viruses. If the key name contains Unicode characters, you must base64 encode the key name and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.
43
44
  # @param [Hash] opts the optional parameters
45
+ # @option opts [String] :role_arn Optional: Role ARN for STS Credential-based access. This is for advanced access using the Security Token Service and is not required. If the roleArn contains Unicode characters, you must base64 encode the key name and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.
44
46
  # @return [Array<(CloudStorageVirusScanResult, Fixnum, Hash)>] CloudStorageVirusScanResult data, response status code and response headers
45
47
  def scan_cloud_storage_scan_aws_s3_file_with_http_info(access_key, secret_key, bucket_region, bucket_name, key_name, opts = {})
46
48
  if @api_client.config.debugging
@@ -83,6 +85,7 @@ module CloudmersiveVirusScanApiClient
83
85
  header_params[:'bucketRegion'] = bucket_region
84
86
  header_params[:'bucketName'] = bucket_name
85
87
  header_params[:'keyName'] = key_name
88
+ header_params[:'roleArn'] = opts[:'role_arn'] if !opts[:'role_arn'].nil?
86
89
 
87
90
  # form parameters
88
91
  form_params = {}
@@ -110,6 +113,7 @@ module CloudmersiveVirusScanApiClient
110
113
  # @param bucket_name Name of the S3 bucket
111
114
  # @param key_name Key name (also called file name) of the file in S3 that you wish to scan for viruses. If the key name contains Unicode characters, you must base64 encode the key name and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.
112
115
  # @param [Hash] opts the optional parameters
116
+ # @option opts [String] :role_arn Optional: Role ARN for STS Credential-based access. This is for advanced access using the Security Token Service and is not required. If the roleArn contains Unicode characters, you must base64 encode the key name and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.
113
117
  # @option opts [BOOLEAN] :allow_executables Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
114
118
  # @option opts [BOOLEAN] :allow_invalid_files Set to false to block invalid files, such as a PDF file that is not really a valid PDF file, or a Word Document that is not a valid Word Document. Default is false (recommended).
115
119
  # @option opts [BOOLEAN] :allow_scripts Set to false to block script files, such as a PHP files, Python scripts, and other malicious content or security threats that can be embedded in the file. Set to true to allow these file types. Default is false (recommended).
@@ -133,6 +137,7 @@ module CloudmersiveVirusScanApiClient
133
137
  # @param bucket_name Name of the S3 bucket
134
138
  # @param key_name Key name (also called file name) of the file in S3 that you wish to scan for viruses. If the key name contains Unicode characters, you must base64 encode the key name and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.
135
139
  # @param [Hash] opts the optional parameters
140
+ # @option opts [String] :role_arn Optional: Role ARN for STS Credential-based access. This is for advanced access using the Security Token Service and is not required. If the roleArn contains Unicode characters, you must base64 encode the key name and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.
136
141
  # @option opts [BOOLEAN] :allow_executables Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
137
142
  # @option opts [BOOLEAN] :allow_invalid_files Set to false to block invalid files, such as a PDF file that is not really a valid PDF file, or a Word Document that is not a valid Word Document. Default is false (recommended).
138
143
  # @option opts [BOOLEAN] :allow_scripts Set to false to block script files, such as a PHP files, Python scripts, and other malicious content or security threats that can be embedded in the file. Set to true to allow these file types. Default is false (recommended).
@@ -184,6 +189,7 @@ module CloudmersiveVirusScanApiClient
184
189
  header_params[:'bucketRegion'] = bucket_region
185
190
  header_params[:'bucketName'] = bucket_name
186
191
  header_params[:'keyName'] = key_name
192
+ header_params[:'roleArn'] = opts[:'role_arn'] if !opts[:'role_arn'].nil?
187
193
  header_params[:'allowExecutables'] = opts[:'allow_executables'] if !opts[:'allow_executables'].nil?
188
194
  header_params[:'allowInvalidFiles'] = opts[:'allow_invalid_files'] if !opts[:'allow_invalid_files'].nil?
189
195
  header_params[:'allowScripts'] = opts[:'allow_scripts'] if !opts[:'allow_scripts'].nil?
@@ -24,12 +24,16 @@ module CloudmersiveVirusScanApiClient
24
24
  # True if the input file contains an image
25
25
  attr_accessor :contains_image
26
26
 
27
+ # Relevant subfile name in an archive format for identified threats, if any
28
+ attr_accessor :relevant_subfile_name
29
+
27
30
  # Attribute mapping from ruby-style variable name to JSON key.
28
31
  def self.attribute_map
29
32
  {
30
33
  :'contains_json' => :'ContainsJSON',
31
34
  :'contains_xml' => :'ContainsXML',
32
- :'contains_image' => :'ContainsImage'
35
+ :'contains_image' => :'ContainsImage',
36
+ :'relevant_subfile_name' => :'RelevantSubfileName'
33
37
  }
34
38
  end
35
39
 
@@ -38,7 +42,8 @@ module CloudmersiveVirusScanApiClient
38
42
  {
39
43
  :'contains_json' => :'BOOLEAN',
40
44
  :'contains_xml' => :'BOOLEAN',
41
- :'contains_image' => :'BOOLEAN'
45
+ :'contains_image' => :'BOOLEAN',
46
+ :'relevant_subfile_name' => :'String'
42
47
  }
43
48
  end
44
49
 
@@ -61,6 +66,10 @@ module CloudmersiveVirusScanApiClient
61
66
  if attributes.has_key?(:'ContainsImage')
62
67
  self.contains_image = attributes[:'ContainsImage']
63
68
  end
69
+
70
+ if attributes.has_key?(:'RelevantSubfileName')
71
+ self.relevant_subfile_name = attributes[:'RelevantSubfileName']
72
+ end
64
73
  end
65
74
 
66
75
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -83,7 +92,8 @@ module CloudmersiveVirusScanApiClient
83
92
  self.class == o.class &&
84
93
  contains_json == o.contains_json &&
85
94
  contains_xml == o.contains_xml &&
86
- contains_image == o.contains_image
95
+ contains_image == o.contains_image &&
96
+ relevant_subfile_name == o.relevant_subfile_name
87
97
  end
88
98
 
89
99
  # @see the `==` method
@@ -95,7 +105,7 @@ module CloudmersiveVirusScanApiClient
95
105
  # Calculates hash code according to all attributes.
96
106
  # @return [Fixnum] Hash code
97
107
  def hash
98
- [contains_json, contains_xml, contains_image].hash
108
+ [contains_json, contains_xml, contains_image, relevant_subfile_name].hash
99
109
  end
100
110
 
101
111
  # Builds the object from hash
@@ -45,6 +45,12 @@ module CloudmersiveVirusScanApiClient
45
45
  # True if the uploaded file contains HTML, which can be a significant risk factor
46
46
  attr_accessor :contains_html
47
47
 
48
+ # True if the uploaded file contains unsafe archive (e.g. zip) content, such as a Zip Bomb, or other configurations of a zip file that could lead to an unsafe extraction
49
+ attr_accessor :contains_unsafe_archive
50
+
51
+ # True if the uploaded file contains an OLE embedded object, which can be a significant risk factor
52
+ attr_accessor :contains_ole_embedded_object
53
+
48
54
  # 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.
49
55
  attr_accessor :verified_file_format
50
56
 
@@ -67,6 +73,8 @@ module CloudmersiveVirusScanApiClient
67
73
  :'contains_xml_external_entities' => :'ContainsXmlExternalEntities',
68
74
  :'contains_insecure_deserialization' => :'ContainsInsecureDeserialization',
69
75
  :'contains_html' => :'ContainsHtml',
76
+ :'contains_unsafe_archive' => :'ContainsUnsafeArchive',
77
+ :'contains_ole_embedded_object' => :'ContainsOleEmbeddedObject',
70
78
  :'verified_file_format' => :'VerifiedFileFormat',
71
79
  :'found_viruses' => :'FoundViruses',
72
80
  :'content_information' => :'ContentInformation'
@@ -86,6 +94,8 @@ module CloudmersiveVirusScanApiClient
86
94
  :'contains_xml_external_entities' => :'BOOLEAN',
87
95
  :'contains_insecure_deserialization' => :'BOOLEAN',
88
96
  :'contains_html' => :'BOOLEAN',
97
+ :'contains_unsafe_archive' => :'BOOLEAN',
98
+ :'contains_ole_embedded_object' => :'BOOLEAN',
89
99
  :'verified_file_format' => :'String',
90
100
  :'found_viruses' => :'Array<VirusFound>',
91
101
  :'content_information' => :'AdditionalAdvancedScanInformation'
@@ -140,6 +150,14 @@ module CloudmersiveVirusScanApiClient
140
150
  self.contains_html = attributes[:'ContainsHtml']
141
151
  end
142
152
 
153
+ if attributes.has_key?(:'ContainsUnsafeArchive')
154
+ self.contains_unsafe_archive = attributes[:'ContainsUnsafeArchive']
155
+ end
156
+
157
+ if attributes.has_key?(:'ContainsOleEmbeddedObject')
158
+ self.contains_ole_embedded_object = attributes[:'ContainsOleEmbeddedObject']
159
+ end
160
+
143
161
  if attributes.has_key?(:'VerifiedFileFormat')
144
162
  self.verified_file_format = attributes[:'VerifiedFileFormat']
145
163
  end
@@ -183,6 +201,8 @@ module CloudmersiveVirusScanApiClient
183
201
  contains_xml_external_entities == o.contains_xml_external_entities &&
184
202
  contains_insecure_deserialization == o.contains_insecure_deserialization &&
185
203
  contains_html == o.contains_html &&
204
+ contains_unsafe_archive == o.contains_unsafe_archive &&
205
+ contains_ole_embedded_object == o.contains_ole_embedded_object &&
186
206
  verified_file_format == o.verified_file_format &&
187
207
  found_viruses == o.found_viruses &&
188
208
  content_information == o.content_information
@@ -197,7 +217,7 @@ module CloudmersiveVirusScanApiClient
197
217
  # Calculates hash code according to all attributes.
198
218
  # @return [Fixnum] Hash code
199
219
  def 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
220
+ [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, contains_unsafe_archive, contains_ole_embedded_object, verified_file_format, found_viruses, content_information].hash
201
221
  end
202
222
 
203
223
  # Builds the object from hash
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.14
11
11
  =end
12
12
 
13
13
  module CloudmersiveVirusScanApiClient
14
- VERSION = '2.1.1'
14
+ VERSION = '2.2.0'
15
15
  end
@@ -49,6 +49,7 @@ describe 'ScanApi' do
49
49
  # Advanced Scan files with 360-degree Content Protection across Viruses and Malware, executables, invalid files, scripts, and even restrictions on accepted file types with complete content verification. Customize threat rules to your needs. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Block threats beyond viruses including executables, scripts, invalid files, and more. Optionally limit input files to a specific set of file types (e.g. PDF and Word Documents only). Wide file format support including Office, PDF, HTML, Flash, MSG, and a wide range of image file formats. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time.
50
50
  # @param input_file Input file to perform the operation on.
51
51
  # @param [Hash] opts the optional parameters
52
+ # @option opts [String] :file_name Optional: specify the original file name of the file being scanned. By default the file name is taken from inputFile parameter, but if this is not provided, or you wish to override it, you can specify the original file name using this parameter.
52
53
  # @option opts [BOOLEAN] :allow_executables Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
53
54
  # @option opts [BOOLEAN] :allow_invalid_files Set to false to block invalid files, such as a PDF file that is not really a valid PDF file, or a Word Document that is not a valid Word Document. Default is false (recommended).
54
55
  # @option opts [BOOLEAN] :allow_scripts Set to false to block script files, such as a PHP files, Python scripts, and other malicious content or security threats that can be embedded in the file. Set to true to allow these file types. Default is false (recommended).
@@ -57,6 +58,9 @@ describe 'ScanApi' do
57
58
  # @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
59
  # @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
60
  # @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]. If set to true, HTML files containing script tags will be allowed, but ContainsScript will be set to true if script tags are present.
61
+ # @option opts [BOOLEAN] :allow_unsafe_archives Set to false to block unsafe archives such as Zip Bombs, and other archives that can cause unsafe extraction outcomes. Default is false (recommended). If set to true, unsafe archives will be allowed.
62
+ # @option opts [BOOLEAN] :allow_ole_embedded_object Set to false to block OLE embedded objects, which can contain vulnerabilities and executable code. Default is false (recommended). If set to true, OLE embedded objects will be allowed.
63
+ # @option opts [String] :options Comma separated set of configuration operations. Include permitJavascriptAndHtmlInPDFs to allow JavaScript and HTML in PDF files. Default is no options.
60
64
  # @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&#x3D;false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled.
61
65
  # @return [VirusScanAdvancedResult]
62
66
  describe 'scan_file_advanced test' do
@@ -41,6 +41,7 @@ describe 'ScanCloudStorageApi' do
41
41
  # @param bucket_name Name of the S3 bucket
42
42
  # @param key_name Key name (also called file name) of the file in S3 that you wish to scan for viruses. If the key name contains Unicode characters, you must base64 encode the key name and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.
43
43
  # @param [Hash] opts the optional parameters
44
+ # @option opts [String] :role_arn Optional: Role ARN for STS Credential-based access. This is for advanced access using the Security Token Service and is not required. If the roleArn contains Unicode characters, you must base64 encode the key name and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.
44
45
  # @return [CloudStorageVirusScanResult]
45
46
  describe 'scan_cloud_storage_scan_aws_s3_file test' do
46
47
  it 'should work' do
@@ -57,6 +58,7 @@ describe 'ScanCloudStorageApi' do
57
58
  # @param bucket_name Name of the S3 bucket
58
59
  # @param key_name Key name (also called file name) of the file in S3 that you wish to scan for viruses. If the key name contains Unicode characters, you must base64 encode the key name and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.
59
60
  # @param [Hash] opts the optional parameters
61
+ # @option opts [String] :role_arn Optional: Role ARN for STS Credential-based access. This is for advanced access using the Security Token Service and is not required. If the roleArn contains Unicode characters, you must base64 encode the key name and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.
60
62
  # @option opts [BOOLEAN] :allow_executables Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
61
63
  # @option opts [BOOLEAN] :allow_invalid_files Set to false to block invalid files, such as a PDF file that is not really a valid PDF file, or a Word Document that is not a valid Word Document. Default is false (recommended).
62
64
  # @option opts [BOOLEAN] :allow_scripts Set to false to block script files, such as a PHP files, Python scripts, and other malicious content or security threats that can be embedded in the file. Set to true to allow these file types. Default is false (recommended).
@@ -50,4 +50,10 @@ describe 'AdditionalAdvancedScanInformation' do
50
50
  end
51
51
  end
52
52
 
53
+ describe 'test attribute "relevant_subfile_name"' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
53
59
  end
@@ -92,6 +92,18 @@ describe 'VirusScanAdvancedResult' do
92
92
  end
93
93
  end
94
94
 
95
+ describe 'test attribute "contains_unsafe_archive"' do
96
+ it 'should work' do
97
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
98
+ end
99
+ end
100
+
101
+ describe 'test attribute "contains_ole_embedded_object"' do
102
+ it 'should work' do
103
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
104
+ end
105
+ end
106
+
95
107
  describe 'test attribute "verified_file_format"' do
96
108
  it 'should work' do
97
109
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
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.1.1
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cloudmersive
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-11 00:00:00.000000000 Z
11
+ date: 2023-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus