2.5. 配置更新器
updaters 可通过 clair-config.yaml 文件中的 updaters.sets 键配置。
-
如果没有填充
set字段,则默认为使用所有集合。在使用 all sets 中,Clair 会尝试访问每个更新器的 URL 或 URL。如果使用代理环境,则必须在代理允许列表中添加这些 URL。 - 如果在 matcher 进程(默认的设置)中自动运行更新程序,则运行更新器的周期会在 matcher 的配置字段下配置。
2.5.1. 选择特定的更新器集 复制链接链接已复制到粘贴板!
使用以下引用为您的 Red Hat Quay 部署选择一个或多个更新器。
为多个更新器配置 Clair
多个特定的更新器
#...
updaters:
sets:
- alpine
- aws
- osv
#...
为 Alpine 配置 Clair
alpine config.yaml 示例
#...
updaters:
sets:
- alpine
#...
为 AWS 配置 Clair
AWS config.yaml 示例
#...
updaters:
sets:
- aws
#...
为 Debian 配置 Clair
Debian config.yaml 示例
#...
updaters:
sets:
- debian
#...
为 Clair CVSS 配置 Clair
Clair CVSS config.yaml 示例
#...
updaters:
sets:
- clair.cvss
#...
为 Oracle 配置 Clair
Oracle config.yaml 示例
#...
updaters:
sets:
- oracle
#...
为 Photon 配置 Clair
Photon config.yaml 示例
#...
updaters:
sets:
- photon
#...
为 SUSE 配置 Clair
SUSE config.yaml 示例
#...
updaters:
sets:
- suse
#...
为 Ubuntu 配置 Clair
Ubuntu config.yaml 示例
#...
updaters:
sets:
- ubuntu
#...
为 OSV 配置 Clair
OSV config.yaml 示例
#...
updaters:
sets:
- osv
#...
2.5.2. 为完整的 Red Hat Enterprise Linux (RHEL)覆盖选择更新程序集 复制链接链接已复制到粘贴板!
要完全覆盖 Red Hat Enterprise Linux (RHEL)中的漏洞,您必须使用以下更新程序集:
-
RHEL.在这个版本中,确保您具有影响 RHEL 的漏洞的最新信息。 -
RHCC.此更新程序会跟踪与红帽容器镜像相关的漏洞。 -
Clair.cvss.通过提供通用漏洞和暴露(CVE)评分,对漏洞的严重性和风险评估提供了全面的视图。 -
OSV.此更新程序侧重于跟踪开源软件组件中的漏洞。建议使用这个更新,因为 Java 和 Go 在 RHEL 产品中是通用的。
RHEL 更新程序示例
#...
updaters:
sets:
- rhel
- rhcc
- clair.cvss
- osv
#...
2.5.3. 高级更新器配置 复制链接链接已复制到粘贴板!
在某些情况下,用户可能希望为特定的行为配置更新程序,例如,如果要列出开源漏洞(OSV)更新器的特定生态系统。
高级更新器配置可能对代理部署或 air gapped 部署很有用。这些场景中的特定更新器的配置可以通过在 updaters 对象的 config 环境变量下放置一个键来传递。用户应检查其 Clair 日志到双检查名称。
以下 YAML 片段详细介绍了一些 Clair 更新器可用的各种设置
对于更多用户,不需要高级更新器配置。
配置 alpine 更新器
#...
updaters:
sets:
- apline
config:
alpine:
url: https://secdb.alpinelinux.org/
#...
配置 debian 更新器
#...
updaters:
sets:
- debian
config:
debian:
mirror_url: https://deb.debian.org/
json_url: https://security-tracker.debian.org/tracker/data/json
#...
配置 clair.cvs 更新器
#...
updaters:
config:
clair.cvss:
url: https://nvd.nist.gov/feeds/json/cve/1.1/
#...
配置 oracle updater
#...
updaters:
sets:
- oracle
config:
oracle-2023-updater:
url:
- https://linux.oracle.com/security/oval/com.oracle.elsa-2023.xml.bz2
oracle-2022-updater:
url:
- https://linux.oracle.com/security/oval/com.oracle.elsa-2022.xml.bz2
#...
配置照片更新器
#...
updaters:
sets:
- photon
config:
photon:
url: https://packages.vmware.com/photon/photon_oval_definitions/
#...
配置 rhel updater
#...
updaters:
sets:
- rhel
config:
rhel:
url: https://access.redhat.com/security/data/oval/v2/PULP_MANIFEST
ignore_unpatched: true
#...
- 1
- 布尔值.是否包含有关没有相应补丁或更新的漏洞的信息。
配置 rhcc 更新器
#...
updaters:
sets:
- rhcc
config:
rhcc:
url: https://access.redhat.com/security/data/metrics/cvemap.xml
#...
配置使用更新器
#...
updaters:
sets:
- suse
config:
suse:
url: https://support.novell.com/security/oval/
#...
配置 ubuntu 更新器
#...
updaters:
config:
ubuntu:
url: https://api.launchpad.net/1.0/
name: ubuntu
force:
- name: focal
version: 20.04
#...
配置 osv updater
#...
updaters:
sets:
- osv
config:
osv:
url: https://osv-vulnerabilities.storage.googleapis.com/
allowlist:
- npm
- pypi
#...
2.5.4. 禁用 Clair Updater 组件 复制链接链接已复制到粘贴板!
在某些情况下,用户可能希望禁用 Clair 更新器组件。在断开连接的环境中运行 Red Hat Quay 时,需要禁用更新程序。
在以下示例中,Clair updaters 被禁用:
#...
matcher:
disable_updaters: true
#...