Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 6 additions & 51 deletions cli/image-scanning-by-using-the-roxctl-cli.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,59 +9,14 @@ toc::[]
[role="_abstract"]
You can scan images stored in image registries, including cluster local registries such as the {ocp} integrated image registry by using the `roxctl` CLI.

[id="scanning-images-by-using-a-remote-cluster_{context}"]
== Scanning images by using a remote cluster
//Scanning images by using a remote cluster
include::modules/scanning-images-remote-cluster.adoc[leveloffset=+1]

By specifying the appropriate cluster in the delegated scanning configuration or through the cluster parameter described in the following procedure, you can scan images from cluster local registries by using a remote cluster.
[role="_additional-resources"]
.Additional resources
* xref:../operating/examine-images-for-vulnerabilities.adoc#accessing-delegated-image-scanning_examine-images-for-vulnerabilities[Accessing delegated image scanning]

[IMPORTANT]
====
For more information about how to configure delegated image scanning, see xref:../operating/examine-images-for-vulnerabilities.adoc#accessing-delegated-image-scanning_examine-images-for-vulnerabilities[Accessing delegated image scanning].
====

.Procedure

* Run the following command to scan the specified image in a remote cluster:
+
[source,terminal,subs="+quotes"]
----
$ roxctl image scan \
--image=_<image_registry>_/_<image_name>_ \
--cluster=_<cluster_detail>_ \
[flags]
----
+
where:
+
--
`<image_registry>`:: Specifies the registry where the image is located, for example, `image-registry.openshift-image-registry.svc:5000/`.
`image_name`:: Specifies the name of the image that you want to scan.
`<cluster_detail>`:: Specifies the name or ID of the remote cluster. For example, specify the name `remote`.
`[flags]`:: Specifies the parameters to modify the behavior of the command. This is optional.
--
+
.Example output
+
[source,text,subs=attributes+]
----
{
"Id": "sha256:3f439d7d71adb0a0c8e05257c091236ab00c6343bc44388d091450ff58664bf9",
"name": {
"registry": "image-registry.openshift-image-registry.svc:5000",
"remote": "default/image-stream",
"tag": "latest",
"fullName": "image-registry.openshift-image-registry.svc:5000/default/image-stream:latest"
},
[...]
----
+
--
* `Id` is a unique identifier for the image that serves as a fingerprint for the image. It helps ensure the integrity and authenticity of the image.
* `registry` is the location of the image registry where the image is stored.
* `remote` is the remote path to the image.
* `tag` is the version or tag associated with this image.
* `fullName` is the complete name of the image, combining the registry, remote path, and tag.
--
include::modules/scanning-images-remote-cluster-procedure.adoc[leveloffset=+2]

//roxctl image scan command options
include::modules/roxctl-image-scan-command-options.adoc[leveloffset=+1]
5 changes: 3 additions & 2 deletions modules/roxctl-image-scan-command-options.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@

:_mod-docs-content-type: REFERENCE
[id="roxctl-image-scan-command-options_{context}"]
= roxctl image scan command options
= Options

[role="_abstract"]
The `roxctl image scan` command supports the following options:

[cols="2,2",options="header"]
Expand Down Expand Up @@ -46,7 +47,7 @@ The `roxctl image scan` command supports the following options:
|Specify the output format. You can select a format to customize the display of results. Formats include `table`, `CSV`, `JSON`, and `SARIF`.

|`-r`, `--retries int`
|Set the number of retries before the operation is aborted with an error. The default value is `3`.
|Set the number of retries before the command aborts the operation with an error. The default value is `3`.

|`-d`, `--retry-delay int`
|Set the time in seconds to wait between retries. The default value is `3`.
Expand Down
54 changes: 54 additions & 0 deletions modules/scanning-images-remote-cluster-procedure.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// Module included in the following assemblies:
//
// * cli/image-scanning-by-using-the-roxctl-cli.adoc

:_mod-docs-content-type: PROCEDURE
[id="scanning-images-remote-cluster-procedure_{context}"]
= Scanning images by using a remote cluster

[role="_abstract"]
You can scan images from cluster local registries by delegating the scan to a remote cluster.

.Procedure

* Run the following command to scan the specified image in a remote cluster:
+
[source,terminal,subs="+quotes"]
----
$ roxctl image scan \
--image=_<image_registry>_/_<image_name>_ \
--cluster=_<cluster_detail>_ \
[flags]
----
+
where:
+
--
`<image_registry>`:: Specifies the registry that stores the image, for example, `image-registry.openshift-image-registry.svc:5000/`.
`image_name`:: Specifies the name of the image that you want to scan.
`<cluster_detail>`:: Specifies the name or ID of the remote cluster. For example, specify the name `remote`.
`[flags]`:: Specifies the parameters to modify the behavior of the command. This is optional.
--
+
The following is an example output:
+
[source,text,subs=attributes+]
----
{
"Id": "sha256:3f439d7d71adb0a0c8e05257c091236ab00c6343bc44388d091450ff58664bf9",
"name": {
"registry": "image-registry.openshift-image-registry.svc:5000",
"remote": "default/image-stream",
"tag": "latest",
"fullName": "image-registry.openshift-image-registry.svc:5000/default/image-stream:latest"
},
[...]
----
+
--
* `Id` is a unique identifier for the image that serves as a fingerprint for the image. It helps ensure the integrity and authenticity of the image.
* `registry` is the location of the image registry that stores the image.
* `remote` is the remote path to the image.
* `tag` is the version or tag associated with this image.
* `fullName` is the complete name of the image, combining the registry, remote path, and tag.
--
15 changes: 15 additions & 0 deletions modules/scanning-images-remote-cluster.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Module included in the following assemblies:
//
// * cli/image-scanning-by-using-the-roxctl-cli.adoc

:_mod-docs-content-type: CONCEPT
[id="scanning-images-by-using-a-remote-cluster_{context}"]
= Remote cluster image scanning

[role="_abstract"]
By specifying the appropriate cluster in the delegated scanning configuration or through the cluster parameter, you can scan images from cluster local registries by using a remote cluster.

[IMPORTANT]
====
For more information about how to configure delegated image scanning, see "Accessing delegated image scanning".
====