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

# Start GitHub repository scan

> Triggers an asynchronous security scan on the latest commit of a linked GitHub repository. The scan runs in the background and results can be retrieved via the analysis reporting endpoints.



## OpenAPI

````yaml post /project/{projectId}/github/start-scan
openapi: 3.0.0
info:
  title: Cybedefend API
  description: >-
    CybeDefend is an advanced API for application security analysis. Key
    features include OAuth 2.0 authentication, user/organization/project
    management, and REBAC-based permissions. It excels in static, dynamic, and
    IaC security analyses (SAST, DAST, IaC, etc.).
  version: '1.0'
  contact: {}
servers:
  - url: https://api-eu.cybedefend.com
    description: EU
  - url: https://api-us.cybedefend.com
    description: US
security: []
tags: []
paths:
  /project/{projectId}/github/start-scan:
    post:
      tags:
        - GitHub Integration
      summary: Start GitHub repository scan
      description: >-
        Triggers an asynchronous security scan on the latest commit of a linked
        GitHub repository. The scan runs in the background and results can be
        retrieved via the analysis reporting endpoints.
      operationId: GithubController_startScanForLastCommitAndProject
      parameters:
        - name: projectId
          required: true
          in: path
          description: >-
            The unique identifier of the project associated with the GitHub
            repository
          schema:
            format: uuid
            example: 550e8400-e29b-41d4-a716-446655440000
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartScanGithubBodyDto'
      responses:
        '202':
          description: Scan request accepted and processing asynchronously
        '400':
          description: Invalid request parameters or repository not linked
          content:
            application/json:
              schema:
                example:
                  message: Bad Request
                  statusCode: 400
                  timestamp: '2025-02-18T12:31:18.491Z'
                  path: /example/path
        '401':
          description: Authentication token is missing or invalid
          content:
            application/json:
              schema:
                example:
                  message: Unauthorized
                  statusCode: 401
                  timestamp: '2025-02-18T12:31:18.491Z'
                  path: /example/path
        '403':
          description: Insufficient permissions to start scan
          content:
            application/json:
              schema:
                example:
                  message: Forbidden
                  statusCode: 403
                  timestamp: '2025-02-18T12:31:18.491Z'
                  path: /example/path
components:
  schemas:
    StartScanGithubBodyDto:
      type: object
      properties:
        repositoryId:
          type: string
          description: Repository identifier
          example: uuid-value
        branch:
          type: string
          description: >-
            Branch to scan (defaults to configured scan branch or repository
            default branch)
          example: main
      required:
        - repositoryId

````