GET /cspm/checks
此API返回您公司扫描账户的检查信息。
请求
格式
GET /cspm/checks?results=<字符串>&severities=<字符串>&statuses=<字符串>&scans=<字符串>&scan_groups=<字符串>&rules=<字符串>&resources=<字符串>&resource_types=<字符串>&system_compliance=<字符串>
参数
|
参数 |
类型 |
可选 |
描述 |
|---|---|---|---|
|
|
字符串数组 |
是 |
您想要显示信息的检查项ID。 如果请求中未指定此参数,响应将包含对您扫描账户执行的所有检查信息。 |
|
|
字符串数组 |
是 |
返回具有这些结果的检查项。
可选值:
|
|
|
字符串数组 |
是 |
返回导致生成具有这些严重性级别的发现的检查项。
可选值:
|
|
|
字符串数组 |
是 |
返回导致生成具有这些状态的发现的检查项。
可选值:
|
|
|
字符串数组 |
是 |
返回在这些扫描账户上执行的检查。 |
|
|
字符串数组 |
是 |
返回在这些扫描组上执行的检查。 |
|
|
字符串数组 |
是 |
返回基于这些规则的检查。 |
|
|
字符串数组 |
是 |
返回涉及这些资源的检查。 |
|
|
字符串数组 |
是 |
返回涉及这些类型资源的检查。 |
|
|
字符串数组 |
是 |
返回与这些合规标准相关的检查。 |
示例
请求获取您云扫描中所有最近检查的信息:
GET /cspm/checks
请求获取检查信息
0015c4a9-82b9-4a40-9bf4-55130c******
:
GET /cspm/checks/0015c4a9-82b9-4a40-9bf4-55130c******
请求所有导致发现结果为
高
严重性评分且涉及
配置记录器
资源类型的检查。
GET /cspm/checks?severities=high&resource_types=Configuration Recorder
响应
格式
{
"data": [
{
"id": "字符串",
"type": "检查",
"attributes": {
"resource_region": "字符串",
"resource_id": "字符串",
"resource_name": "字符串",
"resource_type": "字符串",
"result": "通过",
"severity": "信息性",
"status": "开放",
"created_at": "2024-01-04T16:23:10.219Z",
"scan_name": "字符串",
"scan_group_name": "字符串",
"title": "字符串",
"description": "字符串",
"original_severity": "信息性"
},
"relationships": {
"scan": {
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f******",
"type": "扫描"
}
},
"scan_group": {
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f******",
"type": "扫描组"
}
},
"rule": {
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f******",
"type": "规则",
"meta": {
"name": "字符串",
"version": 0
}
}
},
"controls": {
"data": [
{
"id": "字符串",
"type": "控制",
"meta": {
"compliance_type": "system_compliance",
"compliance_id": "字符串",
"section_id": "字符串"
}
}
]
}
},
"links": {
"self": "字符串"
}
}
],
"links": {
"self": "字符串",
"next": "字符串"
},
"meta": {
"total": 0,
"elapsed": 0
}
}
属性
此端点返回包含多个属性的对象:
|
属性 |
类型 |
描述 |
|---|---|---|
|
|
数组 |
包含特定检查信息的属性列表。 |
|
|
字符串 |
检查项的ID。 |
|
|
字符串 |
对象所描述的实体类型。
可选值:
|
|
|
数组 |
提供检查信息。 |
|
|
字符串 |
扫描涉及的资源所在区域。 |
|
|
字符串 |
扫描涉及的资源ID。 |
|
|
字符串 |
扫描涉及的资源名称。 |
|
|
字符串 |
扫描涉及的资源类型。 |
|
|
字符串 |
扫描结果。
可选值:
A
|
|
|
String |
为扫描结果生成的发现项分配的严重性等级。
可选值:
|
|
|
String |
扫描结果生成的发现项的当前状态。
可选值:
|
|
|
字符串 |
发现项被创建的时间和日期。 |
|
|
字符串 |
被扫描的扫描账户名称。 |
|
|
字符串 |
被扫描的扫描账户所属的扫描组名称。 |
|
|
字符串 |
扫描结果所创建发现项的标题。 |
|
|
字符串 |
扫描结果所创建发现项的描述。 |
|
|
字符串 |
扫描结果所创建发现项最初分配的严重性等级。
可选值:
|
|
|
对象 |
相关实体的列表。 |
|
|
对象 |
包含执行检查的扫描账户信息。 |
|
|
字符串数组 |
提供相关扫描账户信息的列表。 |
|
|
字符串 |
相关扫描账户的ID。 |
|
|
字符串 |
相关实体的类型。
可能取值:
|
|
|
对象 |
包含执行检查的扫描组信息。 |
|
|
字符串数组 |
提供相关扫描组信息的列表。 |
|
|
字符串 |
相关扫描组的ID。 |
|
|
字符串 |
关联实体的类型。
可能取值:
|
|
|
Object |
包含扫描所依据规则的信息。 |
|
|
Object |
提供关联规则信息的列表。 |
|
|
String |
关联规则的ID。 |
|
|
String |
关联实体的类型。
可能取值:
|
|
|
Object |
提供关联规则的整体信息。 |
|
|
String |
关联规则的名称。 |
|
|
Integer |
请求时关联规则的版本号。 |
|
|
Object |
扫描所依据的控件列表。 |
|
|
Object |
提供相关实体信息的列表。 |
|
|
String |
相关控制的ID。 |
|
|
String |
相关实体的类型。
可选值:
|
|
|
字符串数组 |
提供相关控制的整体信息。 |
|
|
String |
相关实体的类型。
可选值:
|
|
|
String |
控制所属标准的ID。 |
|
|
String |
控制所属章节的ID。 |
|
|
数组 |
提供与本章节相关的链接。 |
|
|
字符串 |
本部分的直接链接。 |
|
以下属性仅在请求扫描账户所有检查信息时返回(请求中未指定
|
||
|
|
数组 |
提供可在页面间导航的链接。 |
|
|
字符串 |
本检查信息的直接链接。 |
|
|
字符串 |
请求返回的下一个检查信息的直接链接。 |
|
|
整数数组 |
提供与请求返回信息相关的总体信息。 |
|
|
整数 |
请求返回的结果总数。 |
|
|
整数 |
已查看的结果数量(包括当前显示的结果)。 |
示例
请求获取扫描账户所有检查信息:
{
"data": [
{
"id": "0015c4a9-82b9-4a40-9bf4-55130c******",
"type": "check",
"attributes": {
"resource_region": "ap-southeast-1",
"resource_id": "arn:aws:ec2:ap-southeast-1:829960215***:security-group/sg-06c75b15c86d92***",
"resource_name": "sg-06c75b15c86d92***",
"resource_type": "EC2安全组",
"result": "通过",
"severity": "中危",
"status": null,
"created_at": "2023-12-31T17:08:45+00:00",
"scan_name": "[Staging] ****** AWS账户",
"scan_group_name": "demo-group",
"title": "EC2安全组入口规则无限制 - MSSQL访问",
"description": "发现一个或多个AWS EC2安全组声明了对MSSQL的无限制入口访问。默认情况下MSSQL运行于TCP 1433端口。\n\n安全组作为实例的虚拟防火墙,用于控制出入流量。在VPC中启动实例时,最多可为实例分配五个安全组。安全组作用于实例级别而非子网级别。",
"original_severity": "中危"
},
"relationships": {
"scan": {
"data": {
"id": "3c807067-4097-43ac-82d7-4ee2ef******",
"type": "scan"
}
},
"scan_group": {
"data": {
"id": "16beea3e-d011-4c0c-932c-8d8e53******",
"type": "scan_group"
}
},
"rule": {
"data": {
"id": "407928a2-6539-4eb2-abe5-959613******",
"type": "rule",
"meta": {
"name": "cloud_scan/aws/ec2/security_group_unrestricted_ingress_access_mssql",
"version": 1
}
}
},
"controls": {
"data": [
{
"id": "CM-7",
"type": "control",
"meta": {
"compliance_type": "system_compliance",
"compliance_id": "nist-sp-800-53-r5",
"section_id": "CM"
}
},
{
"id": "I.c.2.h",
"type": "control",
"meta": {
"compliance_type": "system_compliance",
"compliance_id": "seojk-29-2022",
"section_id": "I"
}
},
{
"...": "..."
}
]
}
},
"links": {
"self": "https://api.staging.cs.gravityzone.bitdefender.com/v1/cspm/checks/0015c4a9-82b9-4a40-9bf4-55130c******"
}
},
{
"id": "001c7b5e-26c3-41e3-94f3-f88360******",
"type": "check",
"attributes": {
"resource_region": "eu-north-1",
"resource_id": null,
"resource_name": null,
"resource_type": "配置记录器",
"result": "通过",
"severity": "中危",
"status": null,
"created_at": "2023-12-31T17:08:45+00:00",
"scan_name": "[Staging] ****** AWS账户",
"scan_group_name": "demo-group",
"title": "配置日志文件投递失败",
"description": "发现一个或多个Config配置记录器未能将日志文件投递至分配的S3存储桶。\n\nAWS Config是一项用于评估、审计和评价AWS资源配置的服务。Config持续监控并记录资源配置,支持根据预期配置自动评估记录配置。\n\nAWS Config将所记录资源的配置项投递至配置交付通道时指定的Amazon S3存储桶。\n\n通常AWS Config投递失败的原因包括:\n- S3存储桶不存在\n- 使用的IAM角色缺失或无权访问S3存储桶",
"original_severity": "中危"
},
"relationships": {
"scan": {
"data": {
"id": "3c807067-4097-43ac-82d7-4ee2ef******",
"type": "scan"
}
},
"scan_group": {
"data": {
"id": "16beea3e-d011-4c0c-932c-8d8e53******",
"type": "scan_group"
} },
"rule": {
"data": {
"id": "d660659c-acea-4b0d-bc7a-fa2acd******",
"type": "rule",
"meta": {
"name": "cloud_scan/aws/config/log_files_delivery_failing",
"version": 1
}
}
},
"controls": {
"data": [
{
"id": "7.3.2",
"type": "control",
"meta": {
"compliance_type": "system_compliance",
"compliance_id": "seojk-21",
"section_id": "7"
}
},
{
"id": "2.9.4",
"type": "control",
"meta": {
"compliance_type": "system_compliance",
"compliance_id": "korean-isms-p",
"section_id": "2.9"
}
},
{
"...": "..."
}
]
}
},
"links": {
"self": "https://api.staging.cs.gravityzone.bitdefender.com/v1/cspm/checks/001c7b5e-26c3-41e3-94f3-f88360******"
}
},
{
"...": "..."
}
],
"links": {
"self": "https://api.staging.cs.gravityzone.bitdefender.com/v1/cspm/checks?page_limit=500",
"next": "https://api.staging.cs.gravityzone.bitdefender.com/v1/cspm/checks?page_cursor=eyJ0b3RhbCI6IDMwODE3LCAiZWxhcHNlZCI6IDUwMCwgIm5vX2xhdGVyX3RoYW4iOiAiMjAyNC0wMS0xNFQwNjo0NzoxNS40OTQwNDAiLCAibmV4dF9iZWdpbl91aWQiOiAiMTIwMzQyODctYjdkZC00NmZhLWE5Y2YtMmY2OTdiYmZlNGRjIn0%3D&page_limit=500"
},
"meta": {
"total": 30817,
"elapsed": 500
}
}
已请求检查相关信息
0015c4a9-82b9-4a40-9bf4-55130c******
:
{
"data": {
"id": "0015c4a9-82b9-4a40-9bf4-55130c******",
"type": "check",
"attributes": {
"resource_region": "ap-southeast-1",
"resource_id": "arn:aws:ec2:ap-southeast-1:829960215***:security-group/sg-06c75b15c86d92***",
"resource_name": "sg-06c75b15c86d92***",
"resource_type": "EC2安全组",
"result": "通过",
"severity": "中危",
"status": null,
"created_at": "2023-12-31T17:08:45+00:00",
"scan_name": "[预发布环境] ****** AWS账户",
"scan_group_name": "演示组",
"title": "EC2安全组无限制入站规则 - MSSQL访问",
"description": "发现一个或多个AWS EC2安全组声明允许无限制访问MSSQL的入站规则。MSSQL默认运行在TCP端口1433。\n\n安全组作为实例的虚拟防火墙,用于控制入站和出站流量。在VPC中启动实例时,最多可为实例分配五个安全组。安全组作用于实例级别而非子网级别。",
"original_severity": "中危"
},
"relationships": {
"scan": {
"data": {
"id": "3c807067-4097-43ac-82d7-4ee2ef******",
"type": "scan"
}
},
"scan_group": {
"data": {
"id": "16beea3e-d011-4c0c-932c-8d8e53******",
"type": "scan_group"
}
},
"rule": {
"data": {
"id": "407928a2-6539-4eb2-abe5-959613******",
"type": "rule",
"meta": {
"name": "cloud_scan/aws/ec2/security_group_unrestricted_ingress_access_mssql",
"version": 1
}
}
},
"controls": {
"data": [
{
"id": "CC6.0.24",
"type": "control",
"meta": {
"compliance_type": "system_compliance",
"compliance_id": "sg-pdpa-26-2012",
"section_id": "CC6"
}
},
{
"id": "IV.2.17",
"type": "control",
"meta": {
"compliance_type": "system_compliance",
"compliance_id": "pojk-11-2022",
"section_id": "IV"
}
},
{
"...": "..."
}
]
}
},
"links": {
"self": "https://api.staging.cs.gravityzone.bitdefender.com/v1/cspm/checks/0015c4a9-82b9-4a40-9bf4-55130c******"
}
}
}
已请求关于检查结果中
高危
严重性评分且涉及
配置记录器
资源类型的检查信息:
{
"data": [
{
"id": "05dcf14e-8ef5-470b-811b-b27052******",
"type": "check",
"attributes": {
"resource_region": "ap-south-1",
"resource_id": null,
"resource_name": null,
"resource_type": "配置记录器",
"result": "失败",
"severity": "高危",
"status": "待处理",
"created_at": "2024-01-04T17:06:14+00:00",
"scan_name": "赤峰后院",
"scan_group_name": "测试扫描组1",
"title": "AWS配置未启用",
"description": "发现AWS配置服务未在一个或多个区域启用和记录。AWS配置服务可跟踪对选定关键AWS资源所做配置的变更。",
"original_severity": "高危"
},
"relationships": {
"scan": {
"data": {
"id": "a76b1756-fde2-4754-8019-af82d9******",
"type": "scan"
}
},
"scan_group": {
"data": {
"id": "87b1da1d-9ce4-4924-b8b2-5f0b06******",
"type": "scan_group"
}
},
"rule": {
"data": {
"id": "c4b1c0f5-85d7-42d2-aee1-bb11a7******",
"type": "rule",
"meta": {
"name": "cloud_scan/aws/config/not_in_use",
"version": 1
}
}
},
"controls": {
"data": [
{
"id": "4.1.1",
"type": "control",
"meta": {
"compliance_type": "system_compliance",
"compliance_id": "ccop-v2",
"section_id": "4"
}
},
{
"id": "CM-8(2)",
"type": "control",
"meta": {
"compliance_type": "system_compliance",
"compliance_id": "nist-sp-800-53-r5",
"section_id": "CM"
}
},
{
"...": "..."
}
]
}
},
"links": {
"self": "https://api.staging.cs.gravityzone.bitdefender.com/v1/cspm/checks/05dcf14e-8ef5-470b-811b-b27052******"
}
},
{
"id": "14c592c3-1b3f-4b1f-ae62-e77dc810b79f",
"type": "check",
"attributes": {
"resource_region": "eu-west-3",
"resource_id": null,
"resource_name": null,
"resource_type": "配置记录器",
"result": "失败",
"severity": "高危",
"status": "待处理",
"created_at": "2024-01-04T17:06:14+00:00",
"scan_name": "赤峰后院",
"scan_group_name": "测试扫描组1",
"title": "AWS配置未启用",
"description": "发现AWS配置服务未在一个或多个区域启用和记录。AWS配置服务可跟踪对选定关键AWS资源所做配置的变更。",
"original_severity": "高危"
},
"relationships": {
"scan": {
"data": {
"id": "a76b1756-fde2-4754-8019-af82d9******",
"type": "scan"
}
},
"scan_group": {
"data": {
"id": "87b1da1d-9ce4-4924-b8b2-5f0b06******",
"type": "scan_group"
}
},
"rule": {
"data": {
"id": "c4b1c0f5-85d7-42d2-aee1-bb11a7******",
"type": "rule",
"meta": {
"name": "cloud_scan/aws/config/not_in_use",
"version": 1
}
}
},
"controls": {
"data": [
{
"id": "4.1.1",
"type": "control",
"meta": {
"compliance_type": "system_compliance",
"compliance_id": "ccop-v2",
"section_id": "4"
}
},
{
"id": "CM-8(2)",
"type": "control",
"meta": {
"compliance_type": "system_compliance",
"compliance_id": "nist-sp-800-53-r5",
"section_id": "CM"
}
},
{
"...": "..."
}
]
}
},
"links": {
"self": "https://api.staging.cs.gravityzone.bitdefender.com/v1/cspm/checks/14c592c3-1b3f-4b1f-ae62-e77dc810b79f"
}
},
{
"...": "..."
}
],
"links": {
"self": "https://api.staging.cs.gravityzone.bitdefender.com/v1/cspm/checks?severities=high&page_limit=500&resource_types=Configuration+Recorder",
"next": null
},
"meta": {
"total": 35,
"elapsed": 35
}
}