goharbor/harbor · error

scan artifact @ failed

Error message

scan artifact %s@%s failed

What it means

Raised in scan when every launchScanJob attempt for an artifact failed; the aggregate error reports the artifact as repo@digest and signals that no scan job could be started at all (individual causes are logged as warnings and appended to errs).

Solutions

  1. Check the warnings logged for each launchScanJob failure for root causes
  2. Verify scanner adapters are registered and healthy
  3. Check that the artifact exists and the scan request is valid, then rescan
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at src/controller/scan/base_controller.go:360 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of goharbor/harbor@7b2fd08cc5 (2026-08-16). Data as JSON: /api/errors/ad0e9408780ed705. Report an issue: GitHub.

Appendix: source

Thrown at src/controller/scan/base_controller.go:360

			return err
		}

		opts.ExecutionID = executionID
	}

	errs = errs[:0]
	for _, launchScanJobParam := range launchScanJobParams {
		launchScanJobParam.ExecutionID = opts.ExecutionID

		if err := bc.launchScanJob(ctx, launchScanJobParam, opts); err != nil {
			log.G(ctx).Warningf("scan artifact %s@%s failed, error: %v", artifact.RepositoryName, artifact.Digest, err)
			errs = append(errs, err)
		}
	}

	// all scanning of the artifacts failed
	if len(errs) == len(launchScanJobParams) {
		return fmt.Errorf("scan artifact %s@%s failed", artifact.RepositoryName, artifact.Digest)
	}

	return nil
}

// Stop scan job of a given artifact
func (bc *basicController) Stop(ctx context.Context, artifact *ar.Artifact, capType string) error {
	if artifact == nil {
		return errors.New("nil artifact to stop scan")
	}
	vendorType := sca.GetScanHandler(capType).JobVendorType()
	query := q.New(q.KeyWords{"vendor_type": vendorType, "extra_attrs.artifact.digest": artifact.Digest, "extra_attrs.enabled_capabilities.type": capType})
	executions, err := bc.execMgr.List(ctx, query)
	if err != nil {
		return err
	}

	if len(executions) == 0 {

View on GitHub (pinned to 7b2fd08cc5)