Skip to content

Commit 6e8e0cc

Browse files
stevsmitSteven Smith
andauthored
Updates Clair docs for new feature (quay#1260)
Co-authored-by: Steven Smith <[email protected]>
1 parent 649001b commit 6e8e0cc

File tree

4 files changed

+24
-14
lines changed

4 files changed

+24
-14
lines changed

modules/clair-openshift-airgap-database-standalone.adoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,17 @@ $ oc port-forward -n quay-enterprise service/example-registry-clair-postgres 543
4747
----
4848
indexer:
4949
connstring: host=localhost port=5432 dbname=postgres user=postgres password=postgres sslmode=disable <1>
50-
scanlock_retry: 10
5150
layer_scan_concurrency: 5
5251
migrations: true
52+
scanlock_retry: 10
53+
airgap: true
5354
scanner:
5455
repo:
5556
rhel-repository-scanner: <2>
56-
repo2cpe_mapping_file: /data/cpe-map.json
57+
repo2cpe_mapping_file: /data/repository-to-cpe.json
5758
package:
5859
rhel_containerscanner: <3>
59-
name2repos_mapping_file: /data/repo-map.json
60+
name2repos_mapping_file: /data/container-name-repos-map.json
6061
----
6162
<1> Replace the value of the `host` in the multiple `connstring` fields with `localhost`.
6263
<2> For more information about the `rhel-repository-scanner` parameter, see "Mapping repositories to Common Product Enumeration information".

modules/clair-openshift-airgap-database.adoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,17 @@ $ oc port-forward -n quay-enterprise service/example-registry-clair-postgres 543
4747
----
4848
indexer:
4949
connstring: host=localhost port=5432 dbname=postgres user=postgres password=postgres sslmode=disable <1>
50-
scanlock_retry: 10
5150
layer_scan_concurrency: 5
5251
migrations: true
52+
scanlock_retry: 10
53+
airgap: true
5354
scanner:
5455
repo:
5556
rhel-repository-scanner: <2>
56-
repo2cpe_mapping_file: /data/cpe-map.json
57+
repo2cpe_mapping_file: /data/repository-to-cpe.json
5758
package:
5859
rhel_containerscanner: <3>
59-
name2repos_mapping_file: /data/repo-map.json
60+
name2repos_mapping_file: /data/container-name-repos-map.json
6061
----
6162
<1> Replace the value of the `host` in the multiple `connstring` fields with `localhost`.
6263
<2> For more information about the `rhel-repository-scanner` parameter, see "Mapping repositories to Common Product Enumeration information".

modules/mapping-repositories-to-cpe-information.adoc

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
Currently, mapping repositories to Common Product Enumeration information is not supported on IBM Power and IBM Z.
1212
====
1313

14-
Clair's {rhel} scanner relies on a Common Product Enumeration (CPE) file to map RPM packages to the corresponding security data to produce matching results. These files are owned by product security and updated daily.
14+
Clair's {rhel} scanner relies on a Common Product Enumeration (CPE) file to map RPM packages to the corresponding security data to produce matching results. Red{nbsp}Hat Product Security maintains and regularly updates these files.
1515

1616
The CPE file must be present, or access to the file must be allowed, for the scanner to properly process RPM packages. If the file is not present, RPM packages installed in the container image will not be scanned.
1717

@@ -23,11 +23,12 @@ The CPE file must be present, or access to the file must be allowed, for the sca
2323
| `names2repos` | link:https://access.redhat.com/security/data/metrics/container-name-repos-map.json[Red Hat Name-to-Repos JSON].
2424
|===
2525

26-
In addition to uploading CVE information to the database for disconnected Clair installations, you must also make the mapping file available locally:
26+
By default, Clair's indexer includes the `repos2cpe` and `names2repos` data files within the Clair container. This means that you can reference `/data/repository-to-cpe.json` and `/data/container-name-repos-map.json` in your `clair-config.yaml` file without the need for additional configuration.
2727

28-
* For standalone {productname} and Clair deployments, the mapping file must be loaded into the Clair pod.
29-
30-
* For {productname-ocp} deployments, you must set the Clair component to `unmanaged`. Then, Clair must be deployed manually, setting the configuration to load a local copy of the mapping file.
28+
[IMPORTANT]
29+
====
30+
Although Red{nbsp}Hat Product Security updates the `repos2cpe` and `names2repos` files regularly, the versions included in the `Clair` container are only updated with {productname} releases (for example, version 3.14.1 -> 3.14.2). This can lead to discrepancies between the latest CPE files and those bundled with Clair."
31+
====
3132

3233
[id="mapping-repositories-to-cpe-configuration"]
3334
== Mapping repositories to Common Product Enumeration example configuration
@@ -37,13 +38,13 @@ Use the `repo2cpe_mapping_file` and `name2repos_mapping_file` fields in your Cla
3738
[source,yaml]
3839
----
3940
indexer:
40-
scanner:
41+
scanner:
4142
repo:
4243
rhel-repository-scanner:
43-
repo2cpe_mapping_file: /data/cpe-map.json
44+
repo2cpe_mapping_file: /data/repository-to-cpe.json
4445
package:
4546
rhel_containerscanner:
46-
name2repos_mapping_file: /data/repo-map.json
47+
name2repos_mapping_file: /data/container-name-repos-map.json
4748
----
4849

4950
For more information, see link:https://www.redhat.com/en/blog/how-accurately-match-oval-security-data-installed-rpms[How to accurately match OVAL security data to installed RPMs].

modules/rn_3_14_0.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ The following documentation changes have been made with the {productname} 3.14 r
2727

2828
The following updates have been made to {productname}.
2929

30+
[id="clair-enhancements"]
31+
=== Clair enhancements
32+
33+
With this release, Clair indexer data is now included with downstream builds. This allows {productname} administrators to more easily reference indexers in the `clair-config.yaml` file when running Clair in an air-gapped or disconnected environment.
34+
35+
For more information, see . .
36+
3037
[id="model-card-rendering"]
3138
=== Model card rendering on the v2 UI
3239

0 commit comments

Comments
 (0)