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

查询镜像配置检查项检测报告

功能介绍

查询镜像配置检查项检测报告

URI

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

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

租户项目ID

表2 Query参数

参数

是否必选

参数类型

描述

enterprise_project_id

String

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

image_type

String

镜像类型,包含如下:

  • private_image : 私有镜像仓库

  • shared_image : 共享镜像仓库

  • local_image : 本地镜像

  • instance_image : 企业镜像

namespace

String

组织名称(没有镜像相关信息时,表示查询所有镜像)

image_name

String

镜像名称

image_version

String

镜像版本名称

check_name

String

基线名称

check_type

String

基线类型

check_rule_id

String

检查项id

standard

String

标准类型,包含如下:

  • cn_standard : 等保合规标准

  • hw_standard : 云安全实践标准

instance_id

String

企业仓库实例ID,swr共享版无需使用该参数

请求参数

表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 ImageCheckRuleCheckCaseResponseInfo objects

检测用例信息

表5 ImageCheckRuleCheckCaseResponseInfo

参数

参数类型

描述

check_description

String

检测用例描述

current_value

String

当前结果

suggest_value

String

期待结果

请求示例

查询所属组织为aaa,镜像名称为centos7,镜像版本为common的私有镜像、基线名称为SSH、检测项id为1.12并且标准类型为云规范的配置检查项检测报告。

GET https://{endpoint}/v5/{project_id}/image/baseline/check-rule/detail?image_type=private_image&namespace=aaa&image_name=centos7&image_version=common&check_rule_id=1.12&standard=hw_standard&check_type=SSH&check_name=SSH&enterprise_project_id=all_granted_eps

响应示例

状态码:200

配置检查项检测报告

{"audit":"检查配置文件/etc/pam.d/system","check_info_list":[{"check_description":"检查配置文件/etc/pam.d/system-auth"},{"current_value":""},{"suggest_value":"每个文件都配置auth required "}],"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

配置检查项检测报告

错误码

请参见错误码