status is one of queued, running, succeeded, failed or canceled.
The last three are terminal. A failed scan carries an error message saying what
happened, and database_state is present on every completed scan of an image,
repository, filesystem or SBOM.
A scan you no longer want can be stopped with POST /scans/{id}/cancel. A
running scan stays running until the worker has stopped it, then becomes
canceled.
A dynamic scan was passive when I expected an active one
Symptom. The scan succeeded with a warning that starts “Passive checks only”, and found only header, cookie and TLS issues. Cause. Ownership is checked again when each scan runs. If the warning says ownership “is not verified”, the DNS record and the file both answered without the token, so the target was marked unverified. If it says ownership “could not be re-checked just now”, the check got no answer, and only that scan was passive. Fix. Open the target under DAST. It shows the reason the last check failed. If the target is unverified, publish the token again and choose Check now; see Add and verify a DAST target. If it is still verified, there is nothing to do: the next scan checks again.A dynamic scan is queued for a long time or cannot start
Symptom. The scan stays Queued, or adding a target or starting a scan answers503 dast_engine_unavailable, or a queued scan fails with “the dynamic
scan engine is not reachable”.
Cause. A deployment has one engine and it runs one scan at a time, so a scan
stays queued while another runs, and spends nothing while it does. A 503 or that
failure means the engine is off or down, and the message says which: it can be
that the zap or dast-egress service is down, or that it was down when the API
or worker started.
Fix. On a self-hosted deployment, see
Dynamic scanning configuration: start both
services, and if the message asks for it, restart the API and worker. Nothing
queues up for the engine to return, so run the scan again afterwards. The DAST page
shows the same message as the refusal.
A dynamic scan stopped at its time limit
Symptom. The scan succeeded with the warning “The scan reached its time limit” and fewer findings than you expected. Fix. Raise the target’s time limit (up to 60 minutes), or add separate targets for parts of the application. An incomplete scan never closes findings. See Limits.The image reference was rejected
Symptom.POST /scans returns 400 immediately, with a message naming a
rule. Nothing is queued and no scan row exists.
This is not a parser being fussy. The reference you supply becomes an outbound
network request made by TRUSTIVAN on your behalf, so validation is a security
boundary. See Security model. Every rule below refuses
a specific abuse:
Component limits also apply: at most 12 path components, each at most 128
characters.
Fix. Use a fully-qualified public reference:
ghcr.io/org/app:1.2.3,
alpine:3.19. A short name is expanded for you: alpine becomes
index.docker.io/library/alpine:latest, and an untagged reference means
latest explicitly so that alpine and alpine:latest are the same asset
rather than two.
The registry is unreachable, or the image does not exist
Symptom. The scan is accepted with202, moves to running, then fails
with an error mentioning the registry, a manifest, or an authorisation
challenge from the registry.
TRUSTIVAN does not distinguish these for you, because the registry does not
always distinguish them either: many registries return the same response for
“this repository does not exist” and “you may not see this repository”.
Check, in order:
- The reference is exactly right, including the tag. A typo in a tag is by far the most common cause.
- The worker has egress to that registry. The worker, not the API, makes the pull. In a Compose deployment they are separate containers, so proving the API can reach a host proves nothing about the worker.
- The registry is not rate-limiting you. Docker Hub in particular applies anonymous pull limits per source address, and a shared CI egress address reaches them quickly. The error usually says so.
- The image is genuinely public.
SCAN_ALLOWED_REGISTRIES. If its token service
or blob storage is on a different host, name that host too. See
Scanning. Link-local addresses are never
permitted. For a repository, the setting is SCAN_ALLOW_PRIVATE_GIT_HOSTS.
Registry and git connections made for a scan ignore HTTP_PROXY and
HTTPS_PROXY, so a worker whose only egress is a proxy cannot fetch scan
targets.
The registry requires authentication
Store a credential for that registry host. On Pro and Enterprise,POST /api/v1/registry-credentials accepts either a username with a password
or personal access token, or a bearer token, against a registry host; scans of
images from that host then present it. Creating one requires an administrator
and a human principal: credentials:manage is not grantable to an API key.
Three consequences worth knowing before you debug one:
- The secret cannot be read back, by anyone, at any role. If you have lost
it, rotate it with
PUT /api/v1/registry-credentials/{id}/secret. - A credential that cannot be resolved fails the scan rather than falling back to an anonymous pull, which could otherwise pull a public image of the same name and report its findings as yours.
- Only a registry that actively rejected the credential marks it invalid. A timeout leaves the status untouched, so a network blip does not stop your scanning for a reason nobody can find.
SCAN_ALLOW_PRIVATE_REGISTRIES is about network reachability, not
authentication. It permits registry hosts that are, or resolve to, loopback
or private addresses: an on-premises deployment scanning an internal registry
on 10.0.0.5:5000. Link-local addresses stay refused even with it on. It does not supply credentials to
anything. An internal registry that requires a login still fails with it
enabled.
It is also a deployment setting, not a per-scan option, because the caller
supplying the reference is the untrusted party. Enabling it makes TRUSTIVAN
willing to reach private address space, so treat it as a deliberate operator
decision.
If private registry support is what you need, see the
FAQ for the current position and Contact.
The scan is stuck in queued
Symptom. status stays queued and never becomes running.
Work in queued is never dropped. There is no timeout on queueing, and no
path that silently discards a scan, so this state means something is not
consuming, not that something was lost.
Two causes, in order of likelihood:
The worker is not running. The API and the worker are separate processes on
purpose, and the API happily accepts scans without one. Check that the worker
container is up and look at its logs:
TOKEN_ENCRYPTION_KEY, or a vulnerability
database provider set to mirror with no repositories configured, which is a
startup error rather than a silent fallback to the public source.
Per-tenant concurrency is saturated. Your plan sets how many of your scans
run at once (1 on Free, 5 on Pro, 20 on Enterprise), and the
deployment’s workers set how many run at all (SCAN_CONCURRENCY × worker
replicas; two on the default install). Queue fifty on Pro and at least
forty-five wait.
That is a fairness limit rather than a capacity one, and the queued work is
safe: it will be picked up as running scans complete. If your scans take a
minute each and you queue them in a burst, the tail of the burst waits several
minutes, which looks like a hang and is not one. Watch the queue drain before
adding workers or changing plan.
The scan timed out
Symptom.status is failed, with an error about a timeout, after roughly
ten minutes.
SCAN_TIMEOUT_MINUTES defaults to 10. That covers pulling, unpacking and
analysing an ordinary image comfortably. It is exceeded by:
- A genuinely very large image: multi-gigabyte images with many layers.
- A slow or rate-limited registry, where most of the time is spent waiting for bytes rather than analysing them.
- A cold vulnerability database, on the very first scan after a deployment with no persistent cache. The initial download is around 50 MB and dominates the first run.
The scan failed because the database is too old
Symptom.status is failed, with a message saying the vulnerability
database is some number of days old, beyond the limit, and that scanning was
refused because a clean result would be misleading.
This is working correctly. It is the single deliberate hard failure in the
scanning path.
A scanner matching against a database that predates the advisories it was
supposed to find succeeds, exits cleanly, and reports nothing. A stale
scanner’s silence is indistinguishable from good news, and the user sees a
green result with a recent timestamp, with nothing in either to suggest the
answer is wrong. Every other failure in TRUSTIVAN announces itself; this one has
to be made to.
There are two thresholds:
Degrade first, fail closed second. A database two days old is missing a handful
of advisories and is still far more useful than no scan; a database two weeks
old will confidently report a clean image that has known criticals.
To fix it, restore the database rather than raising the threshold. In order:
- Check the worker’s egress. The upstream database rebuilds several times
a day, so a deployment with working connectivity is never near the soft
threshold, let alone the hard one. Reaching it means something is wrong:
blocked egress to
ghcr.ioormirror.gcr.io, a proxy that intercepts OCI pulls, or a firewall change nobody connected to this. - Check the cache directory is actually persisted, and that the worker can write to it. A cache that is not persisted is not the cause of staleness on its own, but a cache the worker cannot write to means the refreshed copy is never kept.
- If you run a mirror, check the mirror itself is being refreshed. A stale mirror is the most common cause of this failure in an on-premises deployment, because everything else looks healthy.
- Restart the worker once egress is restored, to force a refresh, and re-run the scan.
VULN_DB_HARD_MAX_AGE_HOURS does not make the results better. It makes
a wrong answer reportable. The only reason to raise it is a deliberate,
temporary decision by someone who knows the data is old and wants degraded
results anyway, and the warning on every scan is then the record of that
decision. See Vulnerability
database.
Reading database_state
Every completed scan carries database_state, reporting how fresh the advisory
data behind the result was:
unknown is treated as usable rather than refused, because a first scan on a
fresh deployment legitimately has no timestamp yet and refusing it would make
every new install look broken.
If you are gating a pipeline, branch on this field. A build that treats
stale the same as fresh has quietly opted out of the guarantee the hard
limit exists to provide. The honest reading is: a clean result with
database_state other than fresh is not evidence of a clean image.
Where to go next
- Assets and scans: what the objects mean.
- Scanning configuration: the settings named above.
- Authentication errors: if the request never got as far as being a scan.