An image in a registry that requires a login needs a credential stored against that registry’s host. You never name the credential on a scan: TRUSTIVAN selects it by the host of the image being scanned. Before you start:
  • You need the admin role. Storing or changing a credential needs credentials:manage, which cannot be granted to an API key.
  • Your plan must include private registries (private_registries). Storing a credential without it is refused with 402. Rotating, disabling and deleting are never gated on the plan, so a secret you gave TRUSTIVAN can always be replaced or withdrawn.

1. Choose how to authenticate

The four cloud schemes are exchanged for a short-lived registry login at scan time. No long-lived registry password is derived from them or stored. A scheme that does not fit the host (azure_service_principal against ghcr.io, for example) is refused when you save it, not when a scan first fails.

2. Store the credential

Settings → Registries and repos → Registry credentials, or:
registry is the host, with a port if it has one. It is the matching key. name is for people and is not used for matching. The response carries the credential’s status and never the secret. There is no endpoint that reads a stored secret back, at any role. One host has one credential: a second for the same host is 409, and you rotate the existing one instead.

With an AWS role

assume_role stores no secret at all. The response returns an external_id, and the role’s trust policy must require that value as its sts:ExternalId. The external ID is what stops another organization naming the same role.

3. Confirm the registry accepts it

A credential is stored first and checked afterwards, so a registry that is briefly unreachable does not stop you saving it. Read status: To test it again on demand:
Only a registry that actively rejects the credential marks it invalid. A timeout or an unreachable host leaves the status as it was.

4. Scan

Request the scan exactly as you would for a public image. Nothing in the request names the credential:
last_used_at on the credential records when it was last presented. If the scan fails to pull, see Scan failures.

Discover repositories and scan new tags

A stored registry credential can also discover: once an hour TRUSTIVAN lists the registry’s repositories (its /v2/_catalog) and their tags, and queues a scan of every tag that appeared since the last run. In the dashboard: Settings → Registries and repos → Registry discovery → Watch a registry. Pick the credential, name the repositories (required for Amazon ECR, GitHub Container Registry and Docker Hub), and choose whether new tags are scanned. Each watched registry shows its last run, its last error, and its most recently found tags with the status of the scan each started, linked to the scan. Edit changes the repositories; Stop watching turns discovery off and keeps what it found, so watching it again does not rescan old tags. Or over the API:
  • repositories: empty lists the catalog. Amazon ECR, GitHub and Docker Hub do not serve a catalog: name the repositories (["acme/api", "acme/worker"]); the run records this registry does not list its repositories otherwise.
  • The first run records and scans nothing, so a registry with years of tags is not a backlog; from the second run each new tag is scanned (at most 50 a run), through the ordinary scan path and its allowance.
  • Bounds: 200 repositories and the last 100 tags of each per run.
  • GET the same address for the last run, its error, and the 50 most recently found tags with the scan each started and that scan’s scan_status. Setting it needs credentials:manage and a person; reading needs credentials:read.
Every image a cluster or cloud collection finds running, that no scan covers, is also queued for a scan once a day.

Rotate, disable or delete

See also