- You need the
adminrole. Storing or changing a credential needscredentials:manage, which cannot be granted to an API key. - Your plan must include private registries (
private_registries). Storing a credential without it is refused with402. 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. Readstatus:
To test it again on demand:
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.
GETthe same address for the last run, its error, and the 50 most recently found tags with the scan each started and that scan’sscan_status. Setting it needscredentials:manageand a person; reading needscredentials:read.
Rotate, disable or delete
See also
- Scan a private repository: the equivalent for source code. Git credentials are a separate store, because one host can serve both and the tokens differ.
- Credential handling: how stored secrets are protected.
- Request a scan