> For the complete documentation index, see [llms.txt](https://docs.prismacloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.prismacloud.io/content-collections/runtime-security/vulnerability-management/registry-scanning/scan-nexus.md).

# Sonatype Nexus Registry

To scan a repository in Sonatype Nexus Registry, create a new registry scan setting.

## Prerequisites

* You have [installed a Container Defender](/content-collections/runtime-security/install/deploy-defender/defender-types.md) somewhere in your environment.
* Configure the connector port for the Docker engine to connect to the Nexus registry.

  The Docker client needs the Docker registry exposed at the root of the host together with the port that it is accessing. Nexus offers several methods to overcome this limitation, one of which is the connector port method, which Prisma Cloud supports.

  1. From the Nexus web portal, select the Administration screen.
  2. Select the Nexus Repository.
  3. Select **Online** to allow the Nexus repository to accept the incoming requests.
  4. Configure the Docker repository connector to use an HTTP or HTTPS port.

  <figure><img src="/files/eErDNJha8zhnjpnjwtQe" alt="nexus repo connector"><figcaption></figcaption></figure>
* The Defender can establish a connection with the Nexus registry over the connector port that you configured in the Nexus registry.

  Ensure that the port is open for the image to be accessed successfully.
* To view the registry scan results, you must have the Administrator role or a custom role with access to registry settings and ability to view the registry scan results.

## Add a Nexus registry in Prisma Cloud

1. Log in to Console, and select **Runtime Security > Defend > Vulnerabilities > Images > Registry settings**.
2. Select **Add registry**.
3. In the **Add New Registry Setting Specification**, enter the following values:
   1. In the **Version** drop-down list, select **Sonatype Nexus**.
   2. In **Registry**, enter the hostname, or Fully Qualified Domain Name (FQDN), and the connector port for the Nexus registry’s login server.

      The format for the FQDN is **\<hostname>:\<connector\_port>**, where **\<hostname>** is a unique value specified when the registry was created, and the **\<connector\_port>** is the one you configured in the Nexus repository administration.

      Example: **\<http|https\://\<nexus\_hostname>:\<HTTP/HTTPS connector port for the specific Nexus repo>**.

      [**https://ec2-100-25-223-135.compute-1.amazonaws.com:8083**](https://ec2-100-25-223-135.compute-1.amazonaws.com:8083)
   3. Leave the **Repository** blank or include a pattern to match the Docker repositories inside the Nexus registry.

      For example: To scan all the images under a path, include the **path/to** string.
   4. Optionally enter the Repositories to exclude them from being scanned.
   5. In **Tag**, enter an image tag. Leave this field blank to scan all images, regardless of their tag.
   6. Optionally, enter Tags to exclude, to avoid scanning images with specified tags.
   7. In **Credential**, configure how Prisma Cloud authenticates with Nexus registry.

      Select a credential from the drop-down list.

      If there are no credentials in the list, **Add** new credentials and select the Basic authentication.
   8. You can optionally enter a custom **CA certificate** in PEM format for Prisma Cloud to validate the Nexus registry.

      Custom CA certificate validation is supported only for non-Docker nodes (e.g. OpenShift).

      Ensure that the Custom CA certificate that you use is not revoked by the issuing authority.
   9. In **OS type**, specify whether the repo holds **Linux** or **Windows** images.
   10. In **Scanners 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 the **Number of scanners** setting. For more information, see [deployment patterns](/content-collections/runtime-security/vulnerability-management/registry-scanning/configure-registry-scanning.md#deployment-patterns).
   11. In **Number of scanners**, enter the number of Defenders across which scan jobs can be distributed.
   12. In **Cap**, limit the number of images to scan.

       Set **Cap** to **5** to scan the five most recent images, or enter a different value to increase or decrease the limit. Set **Cap** to **0** to scan all images.
   13. Select **Add**.
4. Select **Save and scan**.

   Verify that the images in the repository are being scanned under **Monitor > Vulnerabilities > Images > Registries**.

## Troubleshooting

**Prisma Cloud failed to pull images from the Nexus repository**

**Monitor > Vulnerabilities > Images > Registries** shows the following error:

`ERRO 2022-06-07T06:55:39.046 scanner.go:110 Failed to pull image cybersecurity/conjur/test-app:latest, error Error initializing source docker://nexus.nedigital.sg/cybersecurity/conjur/test-app:latest: error pinging docker registry nexus.nedigital.sg: invalid status code from registry 400 (Bad Request)`

<figure><img src="/files/FeZcAQPy5JWBRSlifEit" alt="prisma cloud nexus registry error"><figcaption></figcaption></figure>

1. Ensure that you have installed Defender on the host on which the Nexus registry is installed.
2. Verify that you can [pull the nexus registry](https://help.sonatype.com/repomanager3/nexus-repository-administration/formats/docker-registry/pulling-images) using the docker command.
3. Create a Nexus repository connector port as mentioned in the [Prerequisites](#nexus-repo-connector).
4. [Add a Nexus registry in Prisma Cloud](#add-nexus-registry) using the connector port in the Registry URL.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.prismacloud.io/content-collections/runtime-security/vulnerability-management/registry-scanning/scan-nexus.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
