> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openlit.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Run scan

> Start a Trustabl scan for the connector. Missing body fields fall back to connector defaults. Returns the finished job and findings.

Start a Trustabl scan on a scanner connector. Missing body fields use the connector defaults. The response includes the finished **job** and its **findings**.

Do not send a GitHub token in the body — the token stays on the connector. The request can take several minutes (up to 300 seconds).

See [Scanner connectors](/latest/openlit/connectors/scanner) for setup.


## OpenAPI

````yaml POST /api/scanners/{id}/scan
openapi: 3.0.3
info:
  title: Scanner API
  description: Run Trustabl scanner jobs and retrieve scan findings.
  version: 1.0.0
servers:
  - url: http://localhost:3000
security: []
paths:
  /api/scanners/{id}/scan:
    post:
      summary: Run a scanner job
      description: >-
        Start a Trustabl scan for the connector. Missing body fields fall back
        to connector defaults. Returns the finished job and findings.
      operationId: runScannerJob
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Scanner connector ID (`scanner:<uuid>`).
        - name: x-openlit-organisation-id
          in: header
          required: false
          schema:
            type: string
        - name: x-openlit-project-id
          in: header
          required: true
          schema:
            type: string
        - name: x-openlit-environment
          in: header
          required: true
          schema:
            type: string
            example: production
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                target:
                  type: string
                  example: https://github.com/acme/checkout-agent
                ref:
                  type: string
                  example: main
                detectors:
                  type: string
                  example: claude_sdk,mcp
                strict:
                  type: boolean
                secretScan:
                  type: boolean
                vulnScan:
                  type: boolean
                licenseScan:
                  type: boolean
                requireSigned:
                  type: boolean
                rulesRepo:
                  type: string
                rulesRef:
                  type: string
                rulesSource:
                  type: string
                  enum:
                    - environment
                    - production
                    - staging
                    - git
                noRulesUpdate:
                  type: boolean
                verbose:
                  type: boolean
      responses:
        '200':
          description: Scan job result.
          content:
            application/json:
              schema:
                type: object
                properties:
                  connector:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      type:
                        type: string
                  job:
                    $ref: '#/components/schemas/ScannerJob'
        '400':
          description: Invalid JSON or scan parameters.
        '401':
          description: Unauthorized.
components:
  schemas:
    ScannerJob:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
          enum:
            - queued
            - running
            - succeeded
            - failed
            - runtime-missing
        target:
          type: string
        ref:
          type: string
        cliVersion:
          type: string
          description: Trustabl CLI version used for this job.
          example: v0.1.8
        startedAt:
          type: string
          format: date-time
        finishedAt:
          type: string
          format: date-time
        findingCount:
          type: integer
        mediumPlusCount:
          type: integer
        findings:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              ruleId:
                type: string
              severity:
                type: string
              path:
                type: string
              title:
                type: string
        error:
          type: string

````