1. 接口描述
接口请求域名: tcss.tencentcloudapi.com 。
查询最近一次任务发现的风险项的信息列表,支持根据特殊字段进行过滤
默认接口请求频率限制:20次/秒。
推荐使用 API Explorer
点击调试
API Explorer 提供了在线调用、签名验证、SDK 代码生成和快速检索接口等能力。您可查看每次调用的请求内容和返回结果以及自动生成 SDK 调用示例。
2. 输入参数
以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见 公共请求参数。
参数名称 | 必选 | 类型 | 描述 |
---|---|---|---|
Action | 是 | String | 公共参数,本接口取值:DescribeRiskList。 |
Version | 是 | String | 公共参数,本接口取值:2020-11-01。 |
Region | 否 | String | 公共参数,此参数为可选参数。 |
ClusterId | 否 | String | 要查询的集群ID,如果不指定,则查询用户所有的风险项 示例值:"cls-0zmsjvko" |
Offset | 否 | Integer | 偏移量 示例值:0 |
Limit | 否 | Integer | 每次查询的最大记录数量 示例值:20 |
Filters.N | 否 | Array of ComplianceFilters | Name - String Name 可取值:RiskLevel风险等级, RiskTarget检查对象,风险对象,RiskType风险类别,RiskAttribute检测项所属的风险类型,Name |
By | 否 | String | 排序字段 |
Order | 否 | String | 排序方式 asc,desc |
3. 输出参数
参数名称 | 类型 | 描述 |
---|---|---|
ClusterRiskItems | Array of ClusterRiskItem | 风险详情数组 |
TotalCount | Integer | 风险项的总数 示例值:30 |
RequestId | String | 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 |
4. 示例
示例1 查询集群风险项列表示例
输入示例
POST / HTTP/1.1
Host: tcss.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeRiskList
<公共请求参数>
{
"ClusterId": "cls-0zmsjvko",
"Limit": "2",
"Offset": "0"
}
输出示例
{
"Response": {
"RequestId": "ada3da6c-7aa9-48a7-9bdd-c9ae192fef65",
"TotalCount": 18,
"ClusterRiskItems": [
{
"CheckItem": {
"CheckItemId": 1,
"Name": "runc 安全漏洞",
"ItemDetail": "runc是一款用于根据OCI规范生成和运行容器的CLI(命令行界面)工具。runc存在安全漏洞,攻击者可利用该漏洞将主机文件系统绑定到容器中。",
"RiskLevel": "Serious",
"RiskTarget": "runC",
"RiskType": "CVERisk",
"RiskAttribute": "PrivilegePromotion",
"RiskProperty": "ExistPOC ExistEXP RemoteExploit ServerRestart",
"CVENumber": "CVE-2021-30465",
"DiscoverTime": "2021-05-27 21:15:00",
"Solution": "目前厂商已发布升级补丁以修复漏洞,补丁获取链接:https://github.com/opencontainers/runc/security/advisories/GHSA-c3xm-pvg7-gh7r",
"CVSS": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H",
"CVSSScore": "8.5",
"RelateLink": "https://github.com/opencontainers/runc/security/advisories/GHSA-c3xm-pvg7-gh7r https://github.com/opencontainers/runc/releases http://www.openwall.com/lists/oss-security/2021/05/19/2",
"AffectedType": "Node",
"AffectedVersion": ""
},
"VerifyInfo": "",
"ErrorMessage": "",
"AffectedClusterCount": 1,
"AffectedNodeCount": 2
},
{
"CheckItem": {
"CheckItemId": 2,
"Name": "Apache containerd 安全漏洞",
"ItemDetail": "containerd是美国阿帕奇(Apache)基金会的一个容器守护进程。该进程根据RunCOCI规范负责控制宿主机上容器的完整周期。containerd1.3.9之前版本和1.4.3版本存在安全漏洞,该漏洞源于containerd-shimAPI被不正确地公开给主机网络容器。shimsAPI套接字的访问控制验证了连接进程的有效UID为0,但是没有限制对抽象Unix域套接字的访问。这将允许在与shim相同的网络名称空间中运行的恶意容器,其有效UID为0,但在其他方面减少了特权,从而导致使用elevat运行新进程。",
"RiskLevel": "Middle",
"RiskTarget": "Containerd",
"RiskType": "CVERisk",
"RiskAttribute": "PrivilegePromotion",
"RiskProperty": "ExistPOC ExistEXP ServerRestart",
"CVENumber": "CVE-2020-15257",
"DiscoverTime": "2020-12-01 11:15:00",
"Solution": "目前厂商已发布升级补丁以修复漏洞,补丁获取链接:https://github.com/containerd/containerd/commit/4a4bb851f5da563ff6e68a83dc837c7699c469ad",
"CVSS": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N",
"CVSSScore": "5.2",
"RelateLink": "https://github.com/containerd/containerd/commit/4a4bb851f5da563ff6e68a83dc837c7699c469ad https://github.com/containerd/containerd/releases/tag/v1.4.3 https://github.com/containerd/containerd/security/advisories/GHSA-36xw-fx78-c5r4",
"AffectedType": "Node",
"AffectedVersion": ""
},
"VerifyInfo": "",
"ErrorMessage": "",
"AffectedClusterCount": 1,
"AffectedNodeCount": 2
}
]
}
}
5. 开发者资源
腾讯云 API 平台
腾讯云 API 平台 是综合 API 文档、错误码、API Explorer 及 SDK 等资源的统一查询平台,方便您从同一入口查询及使用腾讯云提供的所有 API 服务。
API Inspector
用户可通过 API Inspector 查看控制台每一步操作关联的 API 调用情况,并自动生成各语言版本的 API 代码,也可前往 API Explorer 进行在线调试。
SDK
云 API 3.0 提供了配套的开发工具集(SDK),支持多种编程语言,能更方便的调用 API。
- Tencent Cloud SDK 3.0 for Python: GitHub Gitee
- Tencent Cloud SDK 3.0 for Java: GitHub Gitee
- Tencent Cloud SDK 3.0 for PHP: GitHub Gitee
- Tencent Cloud SDK 3.0 for Go: GitHub Gitee
- Tencent Cloud SDK 3.0 for Node.js: GitHub Gitee
- Tencent Cloud SDK 3.0 for .NET: GitHub Gitee
- Tencent Cloud SDK 3.0 for C++: GitHub Gitee
- Tencent Cloud SDK 3.0 for Ruby: GitHub Gitee
命令行工具
6. 错误码
以下仅列出了接口业务逻辑相关的错误码,其他错误码详见 公共错误码。
错误码 | 描述 |
---|---|
AuthFailure | CAM签名/鉴权错误。 |
FailedOperation | 操作失败。 |
InternalError | 内部错误。 |
InvalidParameter | 参数错误。 |
OperationDenied | 操作被拒绝。 |
RequestLimitExceeded | 请求的次数超过了频率限制。 |
UnauthorizedOperation | 未授权操作。 |