End-of-Life (EoL)
OpenShift integrated Docker registry
Scan the OpenShift integrated Docker registry.
Scan images in the OpenShift integrated Docker registry
To scan an OpenShift integrated registry, create a new registry scan setting.
Prerequisites:
- Installed a Defender within in your OpenShift cluster.
- Service account to authenticate to the internal registry.
- We recommend you use the existing twistlock-service account.
- The Defender authenticates to the OpenShift registry using this service account.
- Added the cluster role permission of registry-viewer to the twistlock-service account.oc adm policy add-cluster-role-to-user registry-viewer system:serviceaccount:<twistlock_project>:twistlock-serviceObtain the password for the twistlock-service account.
- Determine the secret used by the service account oc describe sa twistlock-service -n <twistlock_project>
- Use theImage pull secretsvalue (e.g. twistlock-service-dockercfg-64jtt) in the following command, for example:oc get secret twistlock-service-dockercfg-64jtt -n twistlock --output=json|grep openshift.io/token-secret.valueCopy the openshift.io/token-secret.value for use later in the workflow.If you use the OpenShift UI to obtain the token, click view-all to see the full token.
- Open Console, then go toDefend > Vulnerabilities > Registry.
- ClickAdd registry.
- InVersion, selectRed Hat OpenShift.
- Enter the registry address in theRegistryfield.
- InRepository, specify the repository to scan.If you leave this field blank or enter a wildcard, Prisma Cloud finds and scans all repositories in the registry.If you specify a partial string that ends with a wildcard, Prisma Cloud finds and scans all repositories that start with the partial string.If you specify an exact match, Prisma Cloud scans just the specified repository.
- Click in theCredentialfield, then clickAdd new.
- Select theBasic authenticationcredential type
- InUsername, enter any arbitrary value.
- InPassword, enter the service account token you copied when you completed the prerequisite.
- Save your credentials.
- InOS type, specify whether the repo holdsLinuxorWindowsimages.
- InScanners scope, specify the collections of defenders to use for the scan.Console selects the available Defenders from the scope to execute the scan job according to theNumber of scannerssetting. For more information, see deployment patterns.
- InNumber of scanners, enter the number of Defenders across which scan jobs can be distributed.
- SetCapto the number of most recent images to scan. LeavingCapset to5will scan the 5 most recent images. Setting this field to0will scan all images.
- ClickAdd.
- Click theSavebutton.
Results
Verify that the images in the repository are being scanned.
- Go toMonitor > Vulnerabilities > Images > Registries.A progress indicator at the top right of the window shows the status of the current scan. As the scan of each image is completed, its findings are added to the results table.
- To get details about the vulnerabilities in an image, click on it.To force a specific repository to be scanned again, selectScanfrom the top right of the results table, then click on the specific registry to rescan.