Sonatype Nexus Repository
Connect Sonatype Nexus Repository to Safeguard. The privileges each credential needs, which credentials work, and step-by-step setup.
Availability
This integration is switched on per workspace. If you do not see the card under Integrations, ask your Safeguard contact.
What it does
The Sonatype Nexus Repository card connects Safeguard to the Docker repositories in a Nexus Repository 3 server (Community or Pro). Safeguard lists your Docker hosted, proxy and group repositories, every image in them and every tag, and each image you select becomes a project that Safeguard scans for an SBOM and vulnerability findings. Each scan is pinned to the digest the tag points at when the scan starts, and pulls the image with the credential you connect. Find the card under Integrations on the Project/Product tab.
Public vs private
| Public | Private | |
|---|---|---|
| What you enter | The Nexus Repository URL | The Nexus Repository URL and a username with its password or user token |
| Credential needed | None. Anonymous access must be on in Nexus, and the anonymous user must be able to browse and read the Docker repositories | A Nexus account, or a user token (Nexus Repository Pro) |
| What you can scan | The Docker repositories the anonymous user can read | Every Docker repository the account can read, or the repositories you name |
Supported auth methods
| Method (dialog label) | Use it when | Notes |
|---|---|---|
| Password | Nexus Community, or any server without user tokens | A dedicated read-only Nexus user is best |
| User token | Nexus Repository Pro with user tokens turned on | The token's name code goes in Name code, its pass code in the secret field |
Permissions required
Safeguard only reads. It never pushes, deletes or tags images, and never changes Nexus settings, except the webhook capability you add yourself (below).
Password
| Privilege | Required? | What Safeguard uses it for |
|---|---|---|
nx-repository-view-docker-<repository>-browse | Required | Listing repositories, images, tags and digests (the REST API's repositories, components and search endpoints) |
nx-repository-view-docker-<repository>-read | Required | Reading manifests for digests, and pulling images for scans |
nx-repository-view-docker-*-browse and nx-repository-view-docker-*-read | Optional | The same for every Docker repository, instead of naming each one |
Safeguard does not read the per-repository settings endpoint, so no nx-repository-admin privilege is needed.
Least privilege: a role with the browse and read privileges on the Docker repositories you want scanned, given to a user that has nothing else.
User token
The token acts as its user, so the user needs the same privileges as in the table above. Creating the token needs nx-usertoken-current on that user.
Token types
| Credential type | Works? | Notes |
|---|---|---|
| Local Nexus user and password | Yes (recommended on Community) | Use a dedicated user with only the role above |
| User token (name code and pass code) | Yes (recommended on Pro) | Only in Nexus Repository Pro, once an administrator turns user tokens on |
| LDAP or SAML user | Yes, if that realm accepts Basic authentication | Check that the realm is active under Security > Realms |
| Admin account | Works, not recommended | Far more than Safeguard needs |
| Anonymous | Public tab only | Needs anonymous access with browse and read |
Expiry: user tokens expire after the User Token Expiry the administrator sets (30 days by default, 1 to 999 days). Set a reminder to rotate before then. Passwords do not expire unless your realm says so.
What we never need: nx-admin, any -add, -edit or -delete repository privilege, nx-repository-admin-*, or any security, blob store or task privilege.
Step-by-step setup
Create the credential in Nexus
- Sign in as an administrator and open Settings (the gear icon) > Security > Roles > Create Role.
- Name the role (for example
safeguard-read) and add the privilegesnx-repository-view-docker-<repository>-browseandnx-repository-view-docker-<repository>-readfor each Docker repository (or the*versions for all of them). - Open Security > Users > Create local user, give it the
safeguard-readrole only, set a password and save. - Nexus Repository Pro with user tokens: sign in as that user, select the username at the top right, open User Token > Access User Token, re-enter the password and copy the name code and pass code. The dialog closes after one minute.
- Nexus Community only: an administrator must accept the Community Edition end-user licence agreement once (the onboarding wizard). Until then, Nexus refuses every Docker request.
Or with the Nexus REST API
# As an administrator. Creates the read-only role and user.
curl -u admin -X POST -H "Content-Type: application/json" \
https://nexus.example.com/service/rest/v1/security/roles \
-d '{"id":"safeguard-read","name":"safeguard-read","privileges":["nx-repository-view-docker-*-browse","nx-repository-view-docker-*-read"],"roles":[]}'
curl -u admin -X POST -H "Content-Type: application/json" \
https://nexus.example.com/service/rest/v1/security/users \
-d '{"userId":"safeguard","firstName":"Safeguard","lastName":"Scanner","emailAddress":"safeguard@example.com","password":"<password>","status":"active","roles":["safeguard-read"]}'Connect it in Safeguard
- Open Integrations and choose the Project/Product tab.
- Click Connect on the Sonatype Nexus Repository card.
- Choose Private (or Public for anonymous access), enter a Name and the Nexus Repository URL, for example
https://nexus.example.com(add the context path, such as/nexus, if your server has one). - Private: pick the Sign-in method, then enter the Username (or Name code) and the password or pass code.
- Docker pull host (optional): Nexus Community serves Docker clients only on a repository's HTTP or HTTPS connector port, or behind a reverse proxy. Enter that host and port, such as
nexus.example.com:8443, or one<repository>=<host:port>entry per repository. Leave it empty to use the URL's host with the connector port Nexus reports. - Repositories (optional): limit listing to some Docker repositories.
- Click Verify Credentials (or Check anonymous access). "Connected. N Docker repositories are readable." means Nexus accepted the credential.
- Click Next, select images and tags, and choose a connect option (fast, progressive or deep scan).
Webhooks and triggers
Scan on push is optional. Open the connection's edit dialog and expand Scan on push (optional) for the Webhook URL (https://api.safeguard.sh/scm/api/v1/registry-webhooks/nexus/<connection id>) and the Secret. In Nexus, open Settings > System > Capabilities > Create capability > Webhook: Repository, choose one Docker hosted or proxy repository (group repositories cannot have one), set Event Types to component, paste the URL and put the secret in Secret Key. Add one capability per repository.
Nexus signs every delivery with an HMAC-SHA1 of the body in X-Nexus-Webhook-Signature; Safeguard refuses deliveries that do not match. A pushed tag is scanned as the version <tag>, pinned to its digest. Without a webhook, rescan on a schedule under Integrations > Scheduled.
What we read and store
- Read: Docker repository names and types, image names, tags, manifest digests and push times, and the images you select for scanning.
- Stored: the connection's settings, the SBOM and findings of each scanned image with its digest, and the credential, which is encrypted at rest and never shown again after you save it.
- Not stored: image layers. The image is read for the scan and not kept.
- No customer data from this integration is sent to third-party LLMs.
Troubleshooting
| Message you see | Cause | Fix |
|---|---|---|
Nexus Repository rejected the username and password. With a user token, the username is the token's name code and the password its pass code (User menu > User Token). ... | Wrong password, a token used with the user's own name, an expired token, or a disabled realm | Check the credential; for a token, use the name code as the username |
The account <user> signed in but sees no Docker repositories. Give it a role with nx-repository-view-docker-<repository>-browse and -read. | The user has no Docker privileges | Add the role above |
The Nexus account cannot read <repository> ... Give it a role with the privileges nx-repository-view-docker-<repository>-browse and nx-repository-view-docker-<repository>-read ... | The privilege is missing for that repository | Add both privileges for it |
Nexus Repository Community Edition at <host> refuses every component request until an administrator accepts its End User License Agreement ... | The Community Edition licence agreement has not been accepted | An administrator completes the onboarding wizard once |
No Nexus Repository 3 REST API at <url>. Check the URL, including the context path (for example /nexus) if your server uses one. | Wrong URL or missing context path | Use the address you sign in to Nexus with |
Nexus Repository at <host> does not allow anonymous reads ... | Public tab without anonymous access | Turn anonymous access on, or use the Private tab |
Nexus repository <repository> has no Docker connector, so Docker clients (and Safeguard's scanner) cannot pull from it. ... | The repository has no HTTP or HTTPS connector port and no reverse proxy | Give it a connector port, or a reverse proxy, and enter that host as the Docker pull host |
The TLS certificate of <host> is not trusted ... | A self-signed or private certificate | Serve Nexus with a certificate from a public certificate authority, including the intermediates |
Rotation and disconnect
- Rotate: set a new password (or reset the user token), find the connection under Project Configurations on the Project/Product tab, choose Update, enter the new value, verify and save. A reset token invalidates the old one at once.
- Disconnect: choose Delete from the connection's menu under Project Configurations and confirm. Then delete the Safeguard user in Nexus and any Webhook: Repository capabilities that point at Safeguard.
Vendor references
- Privileges, checked 2026-10-16.
- User Tokens, checked 2026-10-16.
- Components API, checked 2026-10-16.
- Working With HMAC Payloads, checked 2026-10-16.
- Docker Repository Reverse Proxy Strategies, checked 2026-10-16.
- Community Edition onboarding, checked 2026-10-16.
Oracle Container Registry (OCIR)
Connect Oracle Cloud Infrastructure Container Registry (OCIR) to Safeguard. The IAM policy each credential needs, which credentials work, and step-by-step setup.
JFrog Artifactory
Connect JFrog Artifactory or JFrog Container Registry to Safeguard. The permissions each credential needs, which tokens work, and step-by-step setup.