tencentcloud-sdk-bsca 1.0.290

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 538cf16d6574995a7c0f2a395a0198e4c700ef3c
4
+ data.tar.gz: 0eb7431b4cc69508da451227086b6e3974825a6b
5
+ SHA512:
6
+ metadata.gz: d34929b6d4daff785715a523917c12c1f632d02032127252393b0760ad2efbb5108b90ebe8865eb2e3ecb0b3304cccded1a5dae2e9954bec102bbf48248189f3
7
+ data.tar.gz: 29d425c65f55ef6a4278c809a7e8f7822c873734b1a5c8f363f89cee821e687da3879b1dd096c36adb9ba6d3e71261ba2f05e15f080c38b59c6b57907bf5bb1c
data/lib/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0.290
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'tencentcloud-sdk-common'
4
+
5
+ require_relative 'v20210811/client'
6
+ require_relative 'v20210811/models'
7
+
8
+ module TencentCloud
9
+ module Bsca
10
+ end
11
+ end
@@ -0,0 +1,132 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ require 'json'
18
+
19
+ module TencentCloud
20
+ module Bsca
21
+ module V20210811
22
+ class Client < TencentCloud::Common::AbstractClient
23
+
24
+ def initialize(credential, region, profile = nil)
25
+ api_version = '2021-08-11'
26
+ api_endpoint = 'bsca.tencentcloudapi.com'
27
+ sdk_version = 'BSCA_' + File.read(File.expand_path('../VERSION', __dir__)).strip
28
+ super(credential, region, api_version, api_endpoint, sdk_version, profile)
29
+ end
30
+
31
+
32
+ # 本接口(DescribeKBComponent)用于在知识库中查询开源组件信息。本接口根据用户输入的PURL在知识库中寻找对应的开源组件,其中Name为必填字段。
33
+
34
+ # @param request: Request instance for DescribeKBComponent.
35
+ # @type request: :class:`Tencentcloud::bsca::V20210811::DescribeKBComponentRequest`
36
+ # @rtype: :class:`Tencentcloud::bsca::V20210811::DescribeKBComponentResponse`
37
+ def DescribeKBComponent(request)
38
+ body = send_request('DescribeKBComponent', request.serialize)
39
+ response = JSON.parse(body)
40
+ if response['Response'].key?('Error') == false
41
+ model = DescribeKBComponentResponse.new
42
+ model.deserialize(response['Response'])
43
+ model
44
+ else
45
+ code = response['Response']['Error']['Code']
46
+ message = response['Response']['Error']['Message']
47
+ reqid = response['Response']['RequestId']
48
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
49
+ end
50
+ rescue TencentCloud::Common::TencentCloudSDKException => e
51
+ raise e
52
+ rescue StandardError => e
53
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
54
+ end
55
+
56
+ # 本接口(DescribeKBComponentVulnerability)用于在知识库中查询开源组件的漏洞信息。
57
+
58
+ # @param request: Request instance for DescribeKBComponentVulnerability.
59
+ # @type request: :class:`Tencentcloud::bsca::V20210811::DescribeKBComponentVulnerabilityRequest`
60
+ # @rtype: :class:`Tencentcloud::bsca::V20210811::DescribeKBComponentVulnerabilityResponse`
61
+ def DescribeKBComponentVulnerability(request)
62
+ body = send_request('DescribeKBComponentVulnerability', request.serialize)
63
+ response = JSON.parse(body)
64
+ if response['Response'].key?('Error') == false
65
+ model = DescribeKBComponentVulnerabilityResponse.new
66
+ model.deserialize(response['Response'])
67
+ model
68
+ else
69
+ code = response['Response']['Error']['Code']
70
+ message = response['Response']['Error']['Message']
71
+ reqid = response['Response']['RequestId']
72
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
73
+ end
74
+ rescue TencentCloud::Common::TencentCloudSDKException => e
75
+ raise e
76
+ rescue StandardError => e
77
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
78
+ end
79
+
80
+ # 本接口(DescribeKBLicense)用于在知识库中查询许可证信息。
81
+
82
+ # @param request: Request instance for DescribeKBLicense.
83
+ # @type request: :class:`Tencentcloud::bsca::V20210811::DescribeKBLicenseRequest`
84
+ # @rtype: :class:`Tencentcloud::bsca::V20210811::DescribeKBLicenseResponse`
85
+ def DescribeKBLicense(request)
86
+ body = send_request('DescribeKBLicense', request.serialize)
87
+ response = JSON.parse(body)
88
+ if response['Response'].key?('Error') == false
89
+ model = DescribeKBLicenseResponse.new
90
+ model.deserialize(response['Response'])
91
+ model
92
+ else
93
+ code = response['Response']['Error']['Code']
94
+ message = response['Response']['Error']['Message']
95
+ reqid = response['Response']['RequestId']
96
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
97
+ end
98
+ rescue TencentCloud::Common::TencentCloudSDKException => e
99
+ raise e
100
+ rescue StandardError => e
101
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
102
+ end
103
+
104
+ # 本接口(DescribeKBVulnerability)用于在知识库中查询漏洞详细信息,支持根据CVE ID查询或者根据Vul ID查询。
105
+
106
+ # @param request: Request instance for DescribeKBVulnerability.
107
+ # @type request: :class:`Tencentcloud::bsca::V20210811::DescribeKBVulnerabilityRequest`
108
+ # @rtype: :class:`Tencentcloud::bsca::V20210811::DescribeKBVulnerabilityResponse`
109
+ def DescribeKBVulnerability(request)
110
+ body = send_request('DescribeKBVulnerability', request.serialize)
111
+ response = JSON.parse(body)
112
+ if response['Response'].key?('Error') == false
113
+ model = DescribeKBVulnerabilityResponse.new
114
+ model.deserialize(response['Response'])
115
+ model
116
+ else
117
+ code = response['Response']['Error']['Code']
118
+ message = response['Response']['Error']['Message']
119
+ reqid = response['Response']['RequestId']
120
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
121
+ end
122
+ rescue TencentCloud::Common::TencentCloudSDKException => e
123
+ raise e
124
+ rescue StandardError => e
125
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
126
+ end
127
+
128
+
129
+ end
130
+ end
131
+ end
132
+ end
@@ -0,0 +1,798 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ module TencentCloud
18
+ module Bsca
19
+ module V20210811
20
+ # CVSSv2.0详细信息。
21
+ class CVSSV2Info < TencentCloud::Common::AbstractModel
22
+ # @param CVSS: CVE评分。
23
+ # @type CVSS: Float
24
+ # @param AccessVector: AccessVector 攻击途径。
25
+ # 取值范围:
26
+ # <li>NETWORK 远程</li>
27
+ # <li>ADJACENT_NETWORK 近邻</li>
28
+ # <li>LOCAL 本地</li>
29
+ # @type AccessVector: String
30
+ # @param AccessComplexity: AccessComplexity 攻击复杂度。
31
+ # 取值范围:
32
+ # <li>HIGH 高</li>
33
+ # <li>MEDIUM 中</li>
34
+ # <li>LOW 低</li>
35
+ # @type AccessComplexity: String
36
+ # @param Authentication: Authentication 身份验证。
37
+ # 取值范围:
38
+ # <li>MULTIPLE 多系统认证</li>
39
+ # <li>SINGLE 单系统认证</li>
40
+ # <li>NONE 无</li>
41
+ # @type Authentication: String
42
+ # @param ConImpact: ConfidentialityImpact 机密性影响。
43
+ # 取值范围:
44
+ # <li>NONE 无</li>
45
+ # <li>PARTIAL 部分</li>
46
+ # <li>COMPLETE 完整</li>
47
+ # @type ConImpact: String
48
+ # @param IntegrityImpact: IntegrityImpact 完整性影响。
49
+ # 取值范围:
50
+ # <li>NONE 无</li>
51
+ # <li>PARTIAL 部分</li>
52
+ # <li>COMPLETE 完整</li>
53
+ # @type IntegrityImpact: String
54
+ # @param AvailabilityImpact: AvailabilityImpact 可用性影响。
55
+ # 取值范围:
56
+ # <li>NONE 无</li>
57
+ # <li>PARTIAL 部分</li>
58
+ # <li>COMPLETE 完整</li>
59
+ # @type AvailabilityImpact: String
60
+
61
+ attr_accessor :CVSS, :AccessVector, :AccessComplexity, :Authentication, :ConImpact, :IntegrityImpact, :AvailabilityImpact
62
+
63
+ def initialize(cvss=nil, accessvector=nil, accesscomplexity=nil, authentication=nil, conimpact=nil, integrityimpact=nil, availabilityimpact=nil)
64
+ @CVSS = cvss
65
+ @AccessVector = accessvector
66
+ @AccessComplexity = accesscomplexity
67
+ @Authentication = authentication
68
+ @ConImpact = conimpact
69
+ @IntegrityImpact = integrityimpact
70
+ @AvailabilityImpact = availabilityimpact
71
+ end
72
+
73
+ def deserialize(params)
74
+ @CVSS = params['CVSS']
75
+ @AccessVector = params['AccessVector']
76
+ @AccessComplexity = params['AccessComplexity']
77
+ @Authentication = params['Authentication']
78
+ @ConImpact = params['ConImpact']
79
+ @IntegrityImpact = params['IntegrityImpact']
80
+ @AvailabilityImpact = params['AvailabilityImpact']
81
+ end
82
+ end
83
+
84
+ # Cvssv3.0详细信息。
85
+ class CVSSV3Info < TencentCloud::Common::AbstractModel
86
+ # @param CVSS: CVE评分。
87
+ # @type CVSS: Float
88
+ # @param AttackVector: AttackVector 攻击途径。
89
+ # 取值范围:
90
+ # <li>NETWORK 远程</li>
91
+ # <li>ADJACENT_NETWORK 近邻</li>
92
+ # <li>LOCAL 本地</li>
93
+ # <li>PHYSICAL 物理</li>
94
+ # @type AttackVector: String
95
+ # @param AttackComplexity: AttackComplexity 攻击复杂度。
96
+ # 取值范围:
97
+ # <li>HIGH 高</li>
98
+ # <li>LOW 低</li>
99
+ # @type AttackComplexity: String
100
+ # @param PrivilegesRequired: PrivilegesRequired 触发特权。
101
+ # 取值范围:
102
+ # <li>HIGH 高</li>
103
+ # <li>LOW 低</li>
104
+ # <li>NONE 无</li>
105
+ # @type PrivilegesRequired: String
106
+ # @param UserInteraction: UserInteraction 交互必要性。
107
+ # 取值范围:
108
+ # <li>NONE 无</li>
109
+ # <li>REQUIRED 需要</li>
110
+ # @type UserInteraction: String
111
+ # @param Scope: Scope 绕过安全边界。
112
+ # 取值范围:
113
+ # <li>UNCHANGED 否</li>
114
+ # <li>CHANGED 能</li>
115
+ # @type Scope: String
116
+ # @param ConImpact: ConfidentialityImpact 机密性影响。
117
+ # 取值范围:
118
+ # <li>NONE 无</li>
119
+ # <li>LOW 低</li>
120
+ # <li>HIGH 高</li>
121
+ # @type ConImpact: String
122
+ # @param IntegrityImpact: IntegrityImpact 完整性影响。
123
+ # 取值范围:
124
+ # <li>NONE 无</li>
125
+ # <li>LOW 低</li>
126
+ # <li>HIGH 高</li>
127
+ # @type IntegrityImpact: String
128
+ # @param AvailabilityImpact: AvailabilityImpact 可用性影响。
129
+ # 取值范围:
130
+ # <li>NONE 无</li>
131
+ # <li>LOW 低</li>
132
+ # <li>HIGH 高</li>
133
+ # @type AvailabilityImpact: String
134
+
135
+ attr_accessor :CVSS, :AttackVector, :AttackComplexity, :PrivilegesRequired, :UserInteraction, :Scope, :ConImpact, :IntegrityImpact, :AvailabilityImpact
136
+
137
+ def initialize(cvss=nil, attackvector=nil, attackcomplexity=nil, privilegesrequired=nil, userinteraction=nil, scope=nil, conimpact=nil, integrityimpact=nil, availabilityimpact=nil)
138
+ @CVSS = cvss
139
+ @AttackVector = attackvector
140
+ @AttackComplexity = attackcomplexity
141
+ @PrivilegesRequired = privilegesrequired
142
+ @UserInteraction = userinteraction
143
+ @Scope = scope
144
+ @ConImpact = conimpact
145
+ @IntegrityImpact = integrityimpact
146
+ @AvailabilityImpact = availabilityimpact
147
+ end
148
+
149
+ def deserialize(params)
150
+ @CVSS = params['CVSS']
151
+ @AttackVector = params['AttackVector']
152
+ @AttackComplexity = params['AttackComplexity']
153
+ @PrivilegesRequired = params['PrivilegesRequired']
154
+ @UserInteraction = params['UserInteraction']
155
+ @Scope = params['Scope']
156
+ @ConImpact = params['ConImpact']
157
+ @IntegrityImpact = params['IntegrityImpact']
158
+ @AvailabilityImpact = params['AvailabilityImpact']
159
+ end
160
+ end
161
+
162
+ # 描述一个第三方组件的源信息。
163
+ class Component < TencentCloud::Common::AbstractModel
164
+ # @param PURL: 第三方组件的PURL
165
+ # @type PURL: :class:`Tencentcloud::Bsca.v20210811.models.PURL`
166
+ # @param Homepage: 第三方组件的主页
167
+ # @type Homepage: String
168
+ # @param Summary: 第三方组件的简介
169
+ # @type Summary: String
170
+ # @param NicknameList: 第三方组件的别名列表
171
+ # 注意:此字段可能返回 null,表示取不到有效值。
172
+ # @type NicknameList: Array
173
+ # @param CodeLocationList: 第三方组件的代码位置列表
174
+ # 注意:此字段可能返回 null,表示取不到有效值。
175
+ # @type CodeLocationList: Array
176
+ # @param LicenseExpression: 第三方组件的许可证表达式
177
+ # @type LicenseExpression: String
178
+
179
+ attr_accessor :PURL, :Homepage, :Summary, :NicknameList, :CodeLocationList, :LicenseExpression
180
+
181
+ def initialize(purl=nil, homepage=nil, summary=nil, nicknamelist=nil, codelocationlist=nil, licenseexpression=nil)
182
+ @PURL = purl
183
+ @Homepage = homepage
184
+ @Summary = summary
185
+ @NicknameList = nicknamelist
186
+ @CodeLocationList = codelocationlist
187
+ @LicenseExpression = licenseexpression
188
+ end
189
+
190
+ def deserialize(params)
191
+ unless params['PURL'].nil?
192
+ @PURL = PURL.new
193
+ @PURL.deserialize(params['PURL'])
194
+ end
195
+ @Homepage = params['Homepage']
196
+ @Summary = params['Summary']
197
+ @NicknameList = params['NicknameList']
198
+ @CodeLocationList = params['CodeLocationList']
199
+ @LicenseExpression = params['LicenseExpression']
200
+ end
201
+ end
202
+
203
+ # 与输入组件相关的漏洞信息摘要信息。
204
+ class ComponentVulnerabilitySummary < TencentCloud::Common::AbstractModel
205
+ # @param PURL: 用于匹配漏洞的PURL
206
+ # 注意:此字段可能返回 null,表示取不到有效值。
207
+ # @type PURL: :class:`Tencentcloud::Bsca.v20210811.models.PURL`
208
+ # @param CanBeFixed: 该组件是否包含修复漏洞的官方补丁
209
+ # @type CanBeFixed: Boolean
210
+ # @param FixedVersion: 修复漏洞的组件版本号
211
+ # @type FixedVersion: String
212
+ # @param AffectedVersion: 漏洞影响的组件版本号
213
+ # @type AffectedVersion: String
214
+ # @param AffectedComponent: 漏洞影响组件
215
+ # @type AffectedComponent: String
216
+ # @param RiskLevel: 漏洞在该产品中的风险等级
217
+ # <li>Critical</li>
218
+ # <li>High</li>
219
+ # <li>Medium</li>
220
+ # <li>Low</li>
221
+ # @type RiskLevel: String
222
+
223
+ attr_accessor :PURL, :CanBeFixed, :FixedVersion, :AffectedVersion, :AffectedComponent, :RiskLevel
224
+
225
+ def initialize(purl=nil, canbefixed=nil, fixedversion=nil, affectedversion=nil, affectedcomponent=nil, risklevel=nil)
226
+ @PURL = purl
227
+ @CanBeFixed = canbefixed
228
+ @FixedVersion = fixedversion
229
+ @AffectedVersion = affectedversion
230
+ @AffectedComponent = affectedcomponent
231
+ @RiskLevel = risklevel
232
+ end
233
+
234
+ def deserialize(params)
235
+ unless params['PURL'].nil?
236
+ @PURL = PURL.new
237
+ @PURL.deserialize(params['PURL'])
238
+ end
239
+ @CanBeFixed = params['CanBeFixed']
240
+ @FixedVersion = params['FixedVersion']
241
+ @AffectedVersion = params['AffectedVersion']
242
+ @AffectedComponent = params['AffectedComponent']
243
+ @RiskLevel = params['RiskLevel']
244
+ end
245
+ end
246
+
247
+ # 描述组件漏洞相关概览信息。
248
+ class ComponentVulnerabilityUnion < TencentCloud::Common::AbstractModel
249
+ # @param Summary: 漏洞概览信息
250
+ # @type Summary: :class:`Tencentcloud::Bsca.v20210811.models.VulnerabilitySummary`
251
+ # @param SummaryInComponent: 与组件相关的漏洞概览信息
252
+ # @type SummaryInComponent: :class:`Tencentcloud::Bsca.v20210811.models.ComponentVulnerabilitySummary`
253
+
254
+ attr_accessor :Summary, :SummaryInComponent
255
+
256
+ def initialize(summary=nil, summaryincomponent=nil)
257
+ @Summary = summary
258
+ @SummaryInComponent = summaryincomponent
259
+ end
260
+
261
+ def deserialize(params)
262
+ unless params['Summary'].nil?
263
+ @Summary = VulnerabilitySummary.new
264
+ @Summary.deserialize(params['Summary'])
265
+ end
266
+ unless params['SummaryInComponent'].nil?
267
+ @SummaryInComponent = ComponentVulnerabilitySummary.new
268
+ @SummaryInComponent.deserialize(params['SummaryInComponent'])
269
+ end
270
+ end
271
+ end
272
+
273
+ # DescribeKBComponent请求参数结构体
274
+ class DescribeKBComponentRequest < TencentCloud::Common::AbstractModel
275
+ # @param PURL: 组件的PURL
276
+ # @type PURL: :class:`Tencentcloud::Bsca.v20210811.models.PURL`
277
+
278
+ attr_accessor :PURL
279
+
280
+ def initialize(purl=nil)
281
+ @PURL = purl
282
+ end
283
+
284
+ def deserialize(params)
285
+ unless params['PURL'].nil?
286
+ @PURL = PURL.new
287
+ @PURL.deserialize(params['PURL'])
288
+ end
289
+ end
290
+ end
291
+
292
+ # DescribeKBComponent返回参数结构体
293
+ class DescribeKBComponentResponse < TencentCloud::Common::AbstractModel
294
+ # @param Component: 匹配的组件信息
295
+ # @type Component: :class:`Tencentcloud::Bsca.v20210811.models.Component`
296
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
297
+ # @type RequestId: String
298
+
299
+ attr_accessor :Component, :RequestId
300
+
301
+ def initialize(component=nil, requestid=nil)
302
+ @Component = component
303
+ @RequestId = requestid
304
+ end
305
+
306
+ def deserialize(params)
307
+ unless params['Component'].nil?
308
+ @Component = Component.new
309
+ @Component.deserialize(params['Component'])
310
+ end
311
+ @RequestId = params['RequestId']
312
+ end
313
+ end
314
+
315
+ # DescribeKBComponentVulnerability请求参数结构体
316
+ class DescribeKBComponentVulnerabilityRequest < TencentCloud::Common::AbstractModel
317
+ # @param PURL: 组件的PURL,其中Name和Version为必填字段
318
+ # @type PURL: :class:`Tencentcloud::Bsca.v20210811.models.PURL`
319
+
320
+ attr_accessor :PURL
321
+
322
+ def initialize(purl=nil)
323
+ @PURL = purl
324
+ end
325
+
326
+ def deserialize(params)
327
+ unless params['PURL'].nil?
328
+ @PURL = PURL.new
329
+ @PURL.deserialize(params['PURL'])
330
+ end
331
+ end
332
+ end
333
+
334
+ # DescribeKBComponentVulnerability返回参数结构体
335
+ class DescribeKBComponentVulnerabilityResponse < TencentCloud::Common::AbstractModel
336
+ # @param VulnerabilityList: 漏洞信息列表
337
+ # 注意:此字段可能返回 null,表示取不到有效值。
338
+ # @type VulnerabilityList: Array
339
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
340
+ # @type RequestId: String
341
+
342
+ attr_accessor :VulnerabilityList, :RequestId
343
+
344
+ def initialize(vulnerabilitylist=nil, requestid=nil)
345
+ @VulnerabilityList = vulnerabilitylist
346
+ @RequestId = requestid
347
+ end
348
+
349
+ def deserialize(params)
350
+ unless params['VulnerabilityList'].nil?
351
+ @VulnerabilityList = []
352
+ params['VulnerabilityList'].each do |i|
353
+ componentvulnerabilityunion_tmp = ComponentVulnerabilityUnion.new
354
+ componentvulnerabilityunion_tmp.deserialize(i)
355
+ @VulnerabilityList << componentvulnerabilityunion_tmp
356
+ end
357
+ end
358
+ @RequestId = params['RequestId']
359
+ end
360
+ end
361
+
362
+ # DescribeKBLicense请求参数结构体
363
+ class DescribeKBLicenseRequest < TencentCloud::Common::AbstractModel
364
+ # @param LicenseExpression: License表达式
365
+ # @type LicenseExpression: String
366
+
367
+ attr_accessor :LicenseExpression
368
+
369
+ def initialize(licenseexpression=nil)
370
+ @LicenseExpression = licenseexpression
371
+ end
372
+
373
+ def deserialize(params)
374
+ @LicenseExpression = params['LicenseExpression']
375
+ end
376
+ end
377
+
378
+ # DescribeKBLicense返回参数结构体
379
+ class DescribeKBLicenseResponse < TencentCloud::Common::AbstractModel
380
+ # @param LicenseList: 许可证列表
381
+ # 注意:此字段可能返回 null,表示取不到有效值。
382
+ # @type LicenseList: Array
383
+ # @param NormalizedLicenseExpression: 用于匹配的License表达式
384
+ # @type NormalizedLicenseExpression: String
385
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
386
+ # @type RequestId: String
387
+
388
+ attr_accessor :LicenseList, :NormalizedLicenseExpression, :RequestId
389
+
390
+ def initialize(licenselist=nil, normalizedlicenseexpression=nil, requestid=nil)
391
+ @LicenseList = licenselist
392
+ @NormalizedLicenseExpression = normalizedlicenseexpression
393
+ @RequestId = requestid
394
+ end
395
+
396
+ def deserialize(params)
397
+ unless params['LicenseList'].nil?
398
+ @LicenseList = []
399
+ params['LicenseList'].each do |i|
400
+ licenseunion_tmp = LicenseUnion.new
401
+ licenseunion_tmp.deserialize(i)
402
+ @LicenseList << licenseunion_tmp
403
+ end
404
+ end
405
+ @NormalizedLicenseExpression = params['NormalizedLicenseExpression']
406
+ @RequestId = params['RequestId']
407
+ end
408
+ end
409
+
410
+ # DescribeKBVulnerability请求参数结构体
411
+ class DescribeKBVulnerabilityRequest < TencentCloud::Common::AbstractModel
412
+ # @param CVEID: CVE ID列表(不能与Vul ID同时存在)
413
+ # @type CVEID: Array
414
+ # @param VulID: Vul ID列表(不能与CVE ID 同时存在)
415
+ # @type VulID: Array
416
+
417
+ attr_accessor :CVEID, :VulID
418
+
419
+ def initialize(cveid=nil, vulid=nil)
420
+ @CVEID = cveid
421
+ @VulID = vulid
422
+ end
423
+
424
+ def deserialize(params)
425
+ @CVEID = params['CVEID']
426
+ @VulID = params['VulID']
427
+ end
428
+ end
429
+
430
+ # DescribeKBVulnerability返回参数结构体
431
+ class DescribeKBVulnerabilityResponse < TencentCloud::Common::AbstractModel
432
+ # @param VulnerabilityDetailList: 漏洞详细信息列表
433
+ # 注意:此字段可能返回 null,表示取不到有效值。
434
+ # @type VulnerabilityDetailList: Array
435
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
436
+ # @type RequestId: String
437
+
438
+ attr_accessor :VulnerabilityDetailList, :RequestId
439
+
440
+ def initialize(vulnerabilitydetaillist=nil, requestid=nil)
441
+ @VulnerabilityDetailList = vulnerabilitydetaillist
442
+ @RequestId = requestid
443
+ end
444
+
445
+ def deserialize(params)
446
+ unless params['VulnerabilityDetailList'].nil?
447
+ @VulnerabilityDetailList = []
448
+ params['VulnerabilityDetailList'].each do |i|
449
+ vulnerabilityunion_tmp = VulnerabilityUnion.new
450
+ vulnerabilityunion_tmp.deserialize(i)
451
+ @VulnerabilityDetailList << vulnerabilityunion_tmp
452
+ end
453
+ end
454
+ @RequestId = params['RequestId']
455
+ end
456
+ end
457
+
458
+ # 描述许可证的详细信息。
459
+ class LicenseDetail < TencentCloud::Common::AbstractModel
460
+ # @param Content: 许可证内容
461
+ # @type Content: String
462
+ # @param ConditionSet: 许可证允许信息列表
463
+ # @type ConditionSet: Array
464
+ # @param ForbiddenSet: 许可证要求信息列表
465
+ # @type ForbiddenSet: Array
466
+ # @param PermissionSet: 许可证禁止信息列表
467
+ # @type PermissionSet: Array
468
+
469
+ attr_accessor :Content, :ConditionSet, :ForbiddenSet, :PermissionSet
470
+
471
+ def initialize(content=nil, conditionset=nil, forbiddenset=nil, permissionset=nil)
472
+ @Content = content
473
+ @ConditionSet = conditionset
474
+ @ForbiddenSet = forbiddenset
475
+ @PermissionSet = permissionset
476
+ end
477
+
478
+ def deserialize(params)
479
+ @Content = params['Content']
480
+ unless params['ConditionSet'].nil?
481
+ @ConditionSet = []
482
+ params['ConditionSet'].each do |i|
483
+ licenserestriction_tmp = LicenseRestriction.new
484
+ licenserestriction_tmp.deserialize(i)
485
+ @ConditionSet << licenserestriction_tmp
486
+ end
487
+ end
488
+ unless params['ForbiddenSet'].nil?
489
+ @ForbiddenSet = []
490
+ params['ForbiddenSet'].each do |i|
491
+ licenserestriction_tmp = LicenseRestriction.new
492
+ licenserestriction_tmp.deserialize(i)
493
+ @ForbiddenSet << licenserestriction_tmp
494
+ end
495
+ end
496
+ unless params['PermissionSet'].nil?
497
+ @PermissionSet = []
498
+ params['PermissionSet'].each do |i|
499
+ licenserestriction_tmp = LicenseRestriction.new
500
+ licenserestriction_tmp.deserialize(i)
501
+ @PermissionSet << licenserestriction_tmp
502
+ end
503
+ end
504
+ end
505
+ end
506
+
507
+ # License约束信息。
508
+ class LicenseRestriction < TencentCloud::Common::AbstractModel
509
+ # @param Name: license约束的名称。
510
+ # @type Name: String
511
+ # @param Description: license约束的描述。
512
+ # @type Description: String
513
+
514
+ attr_accessor :Name, :Description
515
+
516
+ def initialize(name=nil, description=nil)
517
+ @Name = name
518
+ @Description = description
519
+ end
520
+
521
+ def deserialize(params)
522
+ @Name = params['Name']
523
+ @Description = params['Description']
524
+ end
525
+ end
526
+
527
+ # 描述许可证的概览信息。
528
+ class LicenseSummary < TencentCloud::Common::AbstractModel
529
+ # @param Key: 许可证标识符
530
+ # @type Key: String
531
+ # @param SPDXKey: 许可证的SPDX标识符,见 https://spdx.org/licenses/
532
+ # @type SPDXKey: String
533
+ # @param ShortName: 许可证短名称
534
+ # @type ShortName: String
535
+ # @param Name: 许可证完整名称
536
+ # @type Name: String
537
+ # @param Risk: License风险等级
538
+ # <li>NotDefined</li>
539
+ # <li>LowRisk</li>
540
+ # <li>MediumRisk</li>
541
+ # <li>HighRisk</li>
542
+ # @type Risk: String
543
+ # @param Source: 许可证来源URL
544
+ # @type Source: String
545
+
546
+ attr_accessor :Key, :SPDXKey, :ShortName, :Name, :Risk, :Source
547
+
548
+ def initialize(key=nil, spdxkey=nil, shortname=nil, name=nil, risk=nil, source=nil)
549
+ @Key = key
550
+ @SPDXKey = spdxkey
551
+ @ShortName = shortname
552
+ @Name = name
553
+ @Risk = risk
554
+ @Source = source
555
+ end
556
+
557
+ def deserialize(params)
558
+ @Key = params['Key']
559
+ @SPDXKey = params['SPDXKey']
560
+ @ShortName = params['ShortName']
561
+ @Name = params['Name']
562
+ @Risk = params['Risk']
563
+ @Source = params['Source']
564
+ end
565
+ end
566
+
567
+ # 许可证详细信息。
568
+ class LicenseUnion < TencentCloud::Common::AbstractModel
569
+ # @param LicenseSummary: 许可证概览信息
570
+ # @type LicenseSummary: :class:`Tencentcloud::Bsca.v20210811.models.LicenseSummary`
571
+ # @param LicenseDetail: 许可证详细信息
572
+ # @type LicenseDetail: :class:`Tencentcloud::Bsca.v20210811.models.LicenseDetail`
573
+
574
+ attr_accessor :LicenseSummary, :LicenseDetail
575
+
576
+ def initialize(licensesummary=nil, licensedetail=nil)
577
+ @LicenseSummary = licensesummary
578
+ @LicenseDetail = licensedetail
579
+ end
580
+
581
+ def deserialize(params)
582
+ unless params['LicenseSummary'].nil?
583
+ @LicenseSummary = LicenseSummary.new
584
+ @LicenseSummary.deserialize(params['LicenseSummary'])
585
+ end
586
+ unless params['LicenseDetail'].nil?
587
+ @LicenseDetail = LicenseDetail.new
588
+ @LicenseDetail.deserialize(params['LicenseDetail'])
589
+ end
590
+ end
591
+ end
592
+
593
+ # PURL(Package URL)用于定位一个产品或组件,见 https://github.com/package-url/purl-spec。
594
+ class PURL < TencentCloud::Common::AbstractModel
595
+ # @param Name: 组件名称
596
+ # @type Name: String
597
+ # @param Protocol: 组件所属的类型,如:github, gitlab, generic, deb, rpm, maven 等
598
+ # @type Protocol: String
599
+ # @param Namespace: 组件名的前缀名,如github和gitlab的用户名,deb的操作系统,maven包的group id等
600
+ # @type Namespace: String
601
+ # @param Qualifiers: 修饰组件的额外属性
602
+ # 注意:此字段可能返回 null,表示取不到有效值。
603
+ # @type Qualifiers: Array
604
+ # @param Subpath: 相对于组件包根位置的子目录
605
+ # @type Subpath: String
606
+ # @param Version: 组件版本号
607
+ # @type Version: String
608
+
609
+ attr_accessor :Name, :Protocol, :Namespace, :Qualifiers, :Subpath, :Version
610
+
611
+ def initialize(name=nil, protocol=nil, namespace=nil, qualifiers=nil, subpath=nil, version=nil)
612
+ @Name = name
613
+ @Protocol = protocol
614
+ @Namespace = namespace
615
+ @Qualifiers = qualifiers
616
+ @Subpath = subpath
617
+ @Version = version
618
+ end
619
+
620
+ def deserialize(params)
621
+ @Name = params['Name']
622
+ @Protocol = params['Protocol']
623
+ @Namespace = params['Namespace']
624
+ unless params['Qualifiers'].nil?
625
+ @Qualifiers = []
626
+ params['Qualifiers'].each do |i|
627
+ qualifier_tmp = Qualifier.new
628
+ qualifier_tmp.deserialize(i)
629
+ @Qualifiers << qualifier_tmp
630
+ end
631
+ end
632
+ @Subpath = params['Subpath']
633
+ @Version = params['Version']
634
+ end
635
+ end
636
+
637
+ # PURL下的Qualifier属性类型,用于定义第三方组件的额外属性,见 https://github.com/package-url/purl-spec。
638
+ class Qualifier < TencentCloud::Common::AbstractModel
639
+ # @param Key: 额外属性的名称。
640
+ # @type Key: String
641
+ # @param Value: 额外属性的值。
642
+ # @type Value: String
643
+
644
+ attr_accessor :Key, :Value
645
+
646
+ def initialize(key=nil, value=nil)
647
+ @Key = key
648
+ @Value = value
649
+ end
650
+
651
+ def deserialize(params)
652
+ @Key = params['Key']
653
+ @Value = params['Value']
654
+ end
655
+ end
656
+
657
+ # 描述漏洞详细信息。
658
+ class VulnerabilityDetail < TencentCloud::Common::AbstractModel
659
+ # @param Category: 漏洞类别
660
+ # @type Category: String
661
+ # @param CategoryType: 漏洞分类
662
+ # @type CategoryType: String
663
+ # @param Description: 漏洞描述
664
+ # @type Description: String
665
+ # @param OfficialSolution: 漏洞官方解决方案
666
+ # @type OfficialSolution: String
667
+ # @param ReferenceList: 漏洞信息参考列表
668
+ # @type ReferenceList: Array
669
+ # @param DefenseSolution: 漏洞防御方案
670
+ # @type DefenseSolution: String
671
+ # @param CVSSv2Info: 漏洞CVSSv2信息
672
+ # 注意:此字段可能返回 null,表示取不到有效值。
673
+ # @type CVSSv2Info: :class:`Tencentcloud::Bsca.v20210811.models.CVSSV2Info`
674
+ # @param CVSSv3Info: 漏洞CVSSv3信息
675
+ # 注意:此字段可能返回 null,表示取不到有效值。
676
+ # @type CVSSv3Info: :class:`Tencentcloud::Bsca.v20210811.models.CVSSV3Info`
677
+ # @param SubmitTime: 漏洞提交时间
678
+ # @type SubmitTime: String
679
+ # @param CWEID: CWE编号
680
+ # @type CWEID: String
681
+ # @param CVSSv2Vector: 漏洞CVSSv2向量
682
+ # @type CVSSv2Vector: String
683
+ # @param CVSSv3Vector: 漏洞CVSSv3向量
684
+ # @type CVSSv3Vector: String
685
+
686
+ attr_accessor :Category, :CategoryType, :Description, :OfficialSolution, :ReferenceList, :DefenseSolution, :CVSSv2Info, :CVSSv3Info, :SubmitTime, :CWEID, :CVSSv2Vector, :CVSSv3Vector
687
+
688
+ def initialize(category=nil, categorytype=nil, description=nil, officialsolution=nil, referencelist=nil, defensesolution=nil, cvssv2info=nil, cvssv3info=nil, submittime=nil, cweid=nil, cvssv2vector=nil, cvssv3vector=nil)
689
+ @Category = category
690
+ @CategoryType = categorytype
691
+ @Description = description
692
+ @OfficialSolution = officialsolution
693
+ @ReferenceList = referencelist
694
+ @DefenseSolution = defensesolution
695
+ @CVSSv2Info = cvssv2info
696
+ @CVSSv3Info = cvssv3info
697
+ @SubmitTime = submittime
698
+ @CWEID = cweid
699
+ @CVSSv2Vector = cvssv2vector
700
+ @CVSSv3Vector = cvssv3vector
701
+ end
702
+
703
+ def deserialize(params)
704
+ @Category = params['Category']
705
+ @CategoryType = params['CategoryType']
706
+ @Description = params['Description']
707
+ @OfficialSolution = params['OfficialSolution']
708
+ @ReferenceList = params['ReferenceList']
709
+ @DefenseSolution = params['DefenseSolution']
710
+ unless params['CVSSv2Info'].nil?
711
+ @CVSSv2Info = CVSSV2Info.new
712
+ @CVSSv2Info.deserialize(params['CVSSv2Info'])
713
+ end
714
+ unless params['CVSSv3Info'].nil?
715
+ @CVSSv3Info = CVSSV3Info.new
716
+ @CVSSv3Info.deserialize(params['CVSSv3Info'])
717
+ end
718
+ @SubmitTime = params['SubmitTime']
719
+ @CWEID = params['CWEID']
720
+ @CVSSv2Vector = params['CVSSv2Vector']
721
+ @CVSSv3Vector = params['CVSSv3Vector']
722
+ end
723
+ end
724
+
725
+ # 描述漏洞的摘要信息。
726
+ class VulnerabilitySummary < TencentCloud::Common::AbstractModel
727
+ # @param VulID: 漏洞ID
728
+ # @type VulID: String
729
+ # @param CVEID: 漏洞所属CVE编号
730
+ # @type CVEID: String
731
+ # @param CNVDID: 漏洞所属CNVD编号
732
+ # @type CNVDID: String
733
+ # @param CNNVDID: 漏洞所属CNNVD编号
734
+ # @type CNNVDID: String
735
+ # @param Name: 漏洞名称
736
+ # @type Name: String
737
+ # @param IsSuggest: 该漏洞是否是需重点关注的漏洞
738
+ # @type IsSuggest: Boolean
739
+ # @param Severity: 漏洞风险等级
740
+ # <li>Critical</li>
741
+ # <li>High</li>
742
+ # <li>Medium</li>
743
+ # <li>Low</li>
744
+ # @type Severity: String
745
+
746
+ attr_accessor :VulID, :CVEID, :CNVDID, :CNNVDID, :Name, :IsSuggest, :Severity
747
+
748
+ def initialize(vulid=nil, cveid=nil, cnvdid=nil, cnnvdid=nil, name=nil, issuggest=nil, severity=nil)
749
+ @VulID = vulid
750
+ @CVEID = cveid
751
+ @CNVDID = cnvdid
752
+ @CNNVDID = cnnvdid
753
+ @Name = name
754
+ @IsSuggest = issuggest
755
+ @Severity = severity
756
+ end
757
+
758
+ def deserialize(params)
759
+ @VulID = params['VulID']
760
+ @CVEID = params['CVEID']
761
+ @CNVDID = params['CNVDID']
762
+ @CNNVDID = params['CNNVDID']
763
+ @Name = params['Name']
764
+ @IsSuggest = params['IsSuggest']
765
+ @Severity = params['Severity']
766
+ end
767
+ end
768
+
769
+ # 描述漏洞的详细信息。
770
+ class VulnerabilityUnion < TencentCloud::Common::AbstractModel
771
+ # @param Summary: 漏洞概览信息
772
+ # @type Summary: :class:`Tencentcloud::Bsca.v20210811.models.VulnerabilitySummary`
773
+ # @param Detail: 漏洞详细信息
774
+ # @type Detail: :class:`Tencentcloud::Bsca.v20210811.models.VulnerabilityDetail`
775
+
776
+ attr_accessor :Summary, :Detail
777
+
778
+ def initialize(summary=nil, detail=nil)
779
+ @Summary = summary
780
+ @Detail = detail
781
+ end
782
+
783
+ def deserialize(params)
784
+ unless params['Summary'].nil?
785
+ @Summary = VulnerabilitySummary.new
786
+ @Summary.deserialize(params['Summary'])
787
+ end
788
+ unless params['Detail'].nil?
789
+ @Detail = VulnerabilityDetail.new
790
+ @Detail.deserialize(params['Detail'])
791
+ end
792
+ end
793
+ end
794
+
795
+ end
796
+ end
797
+ end
798
+
metadata ADDED
@@ -0,0 +1,66 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tencentcloud-sdk-bsca
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.290
5
+ platform: ruby
6
+ authors:
7
+ - Tencent Cloud
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2022-04-06 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: tencentcloud-sdk-common
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.0'
27
+ description: Tencent Cloud Ruby SDK is the official software development kit, which
28
+ allows Ruby developers to write software that makes use of Tencent Cloud service
29
+ BSCA.
30
+ email:
31
+ - tencentcloudapi@tencent.com
32
+ executables: []
33
+ extensions: []
34
+ extra_rdoc_files: []
35
+ files:
36
+ - lib/VERSION
37
+ - lib/tencentcloud-sdk-bsca.rb
38
+ - lib/v20210811/client.rb
39
+ - lib/v20210811/models.rb
40
+ homepage: https://github.com/TencentCloud/tencentcloud-sdk-ruby
41
+ licenses:
42
+ - Apache-2.0
43
+ metadata:
44
+ source_code_uri: https://github.com/TencentCloud/tencentcloud-sdk-ruby/tencentcloud-sdk-bsca
45
+ changelog_uri: https://github.com/TencentCloud/tencentcloud-sdk-ruby/blob/master/CHANGELOG.md
46
+ post_install_message:
47
+ rdoc_options: []
48
+ require_paths:
49
+ - lib
50
+ required_ruby_version: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ required_rubygems_version: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
60
+ requirements: []
61
+ rubyforge_project:
62
+ rubygems_version: 2.6.14
63
+ signing_key:
64
+ specification_version: 4
65
+ summary: Tencent Cloud SDK for Ruby - BSCA
66
+ test_files: []