搜索

2.5. 配置更新器

download PDF

updaters 可以通过 clair-config.yaml 文件中的 updaters.sets 键进行配置。

重要
  • 如果没有填充 set 字段,则默认为使用所有集合。在使用所有集合时,Clair 会尝试访问每个更新器的 URL 或 URL。如果使用代理环境,您必须将这些 URL 添加到代理允许列表中。
  • 如果在匹配器进程(这是默认设置)中自动运行 updaters,则运行更新器的周期会在 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.此更新程序侧重于跟踪开源软件组件中的漏洞。建议根据在 RHEL 产品中使用 Java 和 Go 的频率。

RHEL updaters 示例

#...
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.cvss updater
#...
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
#...
配置 photon 更新r
#...
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
#...
1
布尔值.是否包含有关没有可用相应补丁或更新的漏洞的信息。
配置 rhcc 更新器
#...
updaters:
  sets:
    - rhcc
  config:
    rhcc:
      url: https://access.redhat.com/security/data/metrics/cvemap.xml
#...
配置 suse updater
#...
updaters:
  sets:
    - suse
  config:
    suse:
      url: https://support.novell.com/security/oval/
#...
配置 CamelAwsS updater
#...
updaters:
  config:
    ubuntu:
      url: https://api.launchpad.net/1.0/
      name: ubuntu
      force: 1
        - name: focal 2
          version: 20.04 3
#...
1
用于强制在生成的 UpdaterSet 中包含特定发行版和版本详情,而不考虑 API 响应中的状态。如果要确保更新器配置中一致包含特定的发行版和版本,则很有用。
2
指定要强制包含在 UpdaterSet 中的发行版名称。
3
指定您要强制到 UpdaterSet 的发行版版本。
配置 osv 更新器
#...
updaters:
  sets:
    - osv
  config:
    osv:
      url: https://osv-vulnerabilities.storage.googleapis.com/
      allowlist: 1
        - npm
        - pypi
#...
1
允许的生态系统列表。当保留未设置时,允许所有生态系统。必须为小写。有关支持的生态系统列表,请查看 定义生态系统 的文档。

2.5.4. 禁用 Clair Updater 组件

在某些情况下,用户可能希望禁用 Clair 更新器组件。在断开连接的环境中运行 Red Hat Quay 时,需要禁用更新程序。

在以下示例中,Clair 更新器被禁用:

#...
matcher:
  disable_updaters: true
#...
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.