scanner

Create a scanner registration

Creats a new scanner registration with the given data.

post/scanners

Headers

X-Request-Idstring

An unique ID for the request

Request body

namestring required

The name of this registration

descriptionstring

An optional description of this registration.

urlstring uri required

A base URL of the scanner adapter.

authstring

Specify what authentication approach is adopted for the HTTP communications. Supported types Basic", "Bearer" and api key header "X-ScannerAdapter-API-Key"

access_credentialstring

An optional value of the HTTP Authorization header sent with each request to the Scanner Adapter API.

When updating a registration (PUT /scanners/{registration_id}), if this field is omitted or empty and auth is still one of Basic, Bearer, or APIKey, the previously stored credential is kept unchanged. Provide a non-empty value to set or rotate the credential. Clearing auth removes the need for a credential; in that case an empty access_credential does not restore the old secret.

skip_certVerifyboolean

Indicate if skip the certificate verification when sending HTTP requests

use_internal_addrboolean

Indicate whether use internal registry addr for the scanner to pull content or not

disabledboolean

Indicate whether the registration is enabled or not

Example request

{
  "name": "Trivy",
  "description": "A free-to-use tool that scans container images for package vulnerabilities.\n",
  "url": "http://harbor-scanner-trivy:8080",
  "auth": "Bearer",
  "access_credential": "Bearer: JWTTOKENGOESHERE"
}

Response

Created successfully

Changes

No recorded changes to this endpoint across all 1 revision of this API.