This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.7.2. Querying image vulnerabilities from the CLI
Using the oc
command, you can display information about vulnerabilities detected by the Container Security Operator.
Prerequisites
- Be running the Container Security Operator on your OpenShift Container Platform instance
Procedure
To query for detected container image vulnerabilities, type:
oc get vuln --all-namespaces
$ oc get vuln --all-namespaces
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
NAMESPACE NAME AGE default sha256.ca90... 6m56s skynet sha256.ca90... 9m37s
NAMESPACE NAME AGE default sha256.ca90... 6m56s skynet sha256.ca90... 9m37s
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To display details for a particular vulnerability, provide the vulnerability name and its namespace to the
oc describe
command. This example shows an active container whose image includes an RPM package with a vulnerability:oc describe vuln --namespace mynamespace sha256.ac50e3752...
$ oc describe vuln --namespace mynamespace sha256.ac50e3752...
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow