更新时间:2025-09-23 GMT+08:00

查询配置检查项检测报告

功能介绍

查询配置检查项检测报告

URI

GET /v5/{project_id}/baseline/check-rule/detail

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

租户项目ID

表2 Query参数

参数

是否必选

参数类型

描述

enterprise_project_id

String

企业项目ID,查询所有企业项目时填写:all_granted_eps

check_name

String

基线名称

check_type

String

基线类型

check_rule_id

String

检查项ID

standard

String

标准类型,包含如下:

  • cn_standard : 等保合规标准

  • hw_standard : 云安全实践标准

host_id

String

主机ID

请求参数

表3 请求Header参数

参数

是否必选

参数类型

描述

x-auth-token

String

用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)

响应参数

状态码:200

表4 响应Body参数

参数

参数类型

描述

description

String

描述

reference

String

根据

audit

String

审计描述

remediation

String

修改建议

check_info_list

Array of CheckRuleCheckCaseResponseInfo objects

检测用例信息

表5 CheckRuleCheckCaseResponseInfo

参数

参数类型

描述

check_description

String

检测用例描述

current_value

String

当前结果

suggest_value

String

期待结果

请求示例

查询企业项目id为xxx下的基线名称为SSH、检查项ID为1.12、检查标准为云安全实践标准的配置检查项检测报告。

GET https://{endpoint}/v5/{project_id}/baseline/check-rule/detail?standard=hw_standard&enterprise_project_id=xxx&check_name=SSH&check_type=SSH&check_rule_id=1.12

响应示例

状态码:200

配置检查项检测报告

{"audit":"Run the following commands and verify that ClientAliveInterval is smaller than 300 and ClientAliveCountMax is 3 or less: 
#grep '^ClientAliveInterval' /etc/ssh/sshd_config
ClientAliveInterval 300(default is 0) 
#grep '^ClientAliveCountMax' /etc/ssh/sshd_config
ClientAliveCountMax 0(default is 3)","description":"The two options ClientAliveInterval and ClientAliveCountMax control the timeout of SSH sessions. The ClientAliveInterval parameter sets a timeout interval in seconds after which if no data has been received from the client, sshd will send a message through the encrypted channel to request a response from the client. The ClientAliveCountMax parameter sets the number of client alive messages which may be sent without sshd receiving any messages back from the client. For example, if the ClientAliveInterval is set to 15s and the ClientAliveCountMax is set to 3, unresponsive SSH clients will be disconnected after approximately 45s.","reference":"","remediation":"Edit the /etc/ssh/sshd_config file to set the parameter as follows: 
ClientAliveInterval 300 
ClientAliveCountMax 0"}

状态码

状态码

描述

200

配置检查项检测报告

错误码

请参见错误码