-
Notifications
You must be signed in to change notification settings - Fork 1.8k
ROX-27689: provide example for non-delegated roxctl image scan #87112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: rhacs-docs-main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -9,6 +9,58 @@ 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 the Central cluster | ||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
The following outlines the procedure for scanning images via the StackRox Scanner or Scanner V4 installed in the Central cluster. | ||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
.Procedure | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
* Run the following command to scan the specified image: | ||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||||||||||||||||||||||||||||
+ | ||||||||||||||||||||||||||||||||
[source,terminal,subs="+quotes"] | ||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||
---- | ||||||||||||||||||||||||||||||||
$ roxctl image scan \ | ||||||||||||||||||||||||||||||||
--image=_<image_registry>_/_<image_name>_[_<reference>_] \// <1> | ||||||||||||||||||||||||||||||||
[flags] <2> | ||||||||||||||||||||||||||||||||
Comment on lines
+23
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||||||||||||||||||||||||||||
---- | ||||||||||||||||||||||||||||||||
+ | ||||||||||||||||||||||||||||||||
-- | ||||||||||||||||||||||||||||||||
<1> For `<image_registry>`, specify the registry where the image is located, for example, `registry.redhat.io`. | ||||||||||||||||||||||||||||||||
For `<image_name>`, specify the name of the image you want to scan, for example, `default/image`. | ||||||||||||||||||||||||||||||||
<reference> may be: | ||||||||||||||||||||||||||||||||
* blank | ||||||||||||||||||||||||||||||||
* a tag preceded by a colon, for example, `:latest` | ||||||||||||||||||||||||||||||||
* a digest preceded by an at sign, for example, `@sha256:710ecc84318c54c9d1e08fe89d03e74cc09350909e5b12e5d07ac6941fd02b27` | ||||||||||||||||||||||||||||||||
Comment on lines
+29
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||
<2> Optional: For `[flags]`, you can specify parameters to modify the behavior of the command. | ||||||||||||||||||||||||||||||||
+ | ||||||||||||||||||||||||||||||||
For more information about optional parameters, see xref:../cli/image-scanning-by-using-the-roxctl-cli.adoc#roxctl-image-scan-command-options_image-scanning-by-using-the-roxctl-cli[roxctl image scan command options]. | ||||||||||||||||||||||||||||||||
-- | ||||||||||||||||||||||||||||||||
+ | ||||||||||||||||||||||||||||||||
.Example output | ||||||||||||||||||||||||||||||||
+ | ||||||||||||||||||||||||||||||||
[source,text,subs=attributes+] | ||||||||||||||||||||||||||||||||
---- | ||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||
"Id": "sha256:3f439d7d71adb0a0c8e05257c091236ab00c6343bc44388d091450ff58664bf9", <1> | ||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Due to security reasons |
||||||||||||||||||||||||||||||||
"name": { <2> | ||||||||||||||||||||||||||||||||
"registry": "registry.redhat.io", <3> | ||||||||||||||||||||||||||||||||
"remote": "default/image", <4> | ||||||||||||||||||||||||||||||||
"tag": "latest", <5> | ||||||||||||||||||||||||||||||||
"fullName": "registry.redhat.iodefault/image:latest" <6> | ||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||
[...] | ||||||||||||||||||||||||||||||||
---- | ||||||||||||||||||||||||||||||||
+ | ||||||||||||||||||||||||||||||||
-- | ||||||||||||||||||||||||||||||||
<1> A unique identifier for the image that serves as a fingerprint for the image. It helps ensure the integrity and authenticity of the image. | ||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||
<2> Contains specific details about the image. | ||||||||||||||||||||||||||||||||
<3> The location of the image registry where the image is stored. | ||||||||||||||||||||||||||||||||
<4> The remote path to the image. | ||||||||||||||||||||||||||||||||
<5> The version or tag associated with this image. | ||||||||||||||||||||||||||||||||
<6> The complete name of the image, combining the registry, remote path, and tag. | ||||||||||||||||||||||||||||||||
-- | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
[id="scanning-images-by-using-a-remote-cluster_{context}"] | ||||||||||||||||||||||||||||||||
== Scanning images by using a remote cluster | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
|
@@ -26,14 +78,18 @@ For more information about how to configure delegated image scanning, see xref:. | |||||||||||||||||||||||||||||||
[source,terminal,subs="+quotes"] | ||||||||||||||||||||||||||||||||
---- | ||||||||||||||||||||||||||||||||
$ roxctl image scan \ | ||||||||||||||||||||||||||||||||
--image=_<image_registry>_/_<image_name>_ \// <1> | ||||||||||||||||||||||||||||||||
--image=_<image_registry>_/_<image_name>_[_<reference>_] \// <1> | ||||||||||||||||||||||||||||||||
--cluster=_<cluster_detail>_ \// <2> | ||||||||||||||||||||||||||||||||
[flags] <3> | ||||||||||||||||||||||||||||||||
---- | ||||||||||||||||||||||||||||||||
+ | ||||||||||||||||||||||||||||||||
-- | ||||||||||||||||||||||||||||||||
<1> For `<image_registry>`, specify the registry where the image is located, for example, `image-registry.openshift-image-registry.svc:5000/`. | ||||||||||||||||||||||||||||||||
For `<image_name>`, specify the name of the image you want to scan, for example, `default/image-stream:latest`. | ||||||||||||||||||||||||||||||||
<1> For `<image_registry>`, specify the registry where the image is located, for example, ``image-registry.openshift-image-registry.svc:5000`. | ||||||||||||||||||||||||||||||||
For `<image_name>`, specify the name of the image you want to scan, for example, `default/image-stream`. | ||||||||||||||||||||||||||||||||
<reference> may be: | ||||||||||||||||||||||||||||||||
* blank | ||||||||||||||||||||||||||||||||
* a tag preceded by a colon, for example, `:latest` | ||||||||||||||||||||||||||||||||
* a digest preceded by an at sign, for example, `@sha256:710ecc84318c54c9d1e08fe89d03e74cc09350909e5b12e5d07ac6941fd02b27` | ||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would adding the actual characters render correctly / be more clear here? For example:
Suggested change
Or perhaps stating that the reference must be valid per... (and link the spec?) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should shorten the SHA id for security reasons? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FWIW - the SHAs (digests) are not secrets in the image context, from a risk perspective it's generally recommended to reference images by digest instead of the tags because tags change, digests do not. Are other ways to address this 'tag change' risk, but a bit off-topic for this PR. To be a valid |
||||||||||||||||||||||||||||||||
<2> For `<cluster_detail>`, specify the name or ID of the remote cluster. For example, specify the name `remote`. | ||||||||||||||||||||||||||||||||
<3> Optional: For `[flags]`, you can specify parameters to modify the behavior of the command. | ||||||||||||||||||||||||||||||||
+ | ||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how to best message this, but IF the delegated scanning config has an entry matching the image being scanned, it will be sent to a secured cluster / not scanned by Central.