# Version Control Integration

Add version control integration

1. Navigate to global settings -> Integrations -> Version Control
2. Press "+" button

<figure><img src="https://3069717380-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M81VrXQrfSaYjNIFOtt%2Fuploads%2FQgc2ydzFIVUAeOGvftdm%2Fimage.png?alt=media&#x26;token=deb722ff-5466-4995-a6c1-7236851167ac" alt=""><figcaption></figcaption></figure>

3. Choose your system

<figure><img src="https://3069717380-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M81VrXQrfSaYjNIFOtt%2Fuploads%2FbHXd03GP6UtYxnL6Qajv%2Fimage.png?alt=media&#x26;token=7b1cbfb4-32aa-4bbc-8925-7c4bf60295fe" alt="" width="375"><figcaption></figcaption></figure>

4. Fill the form

<figure><img src="https://3069717380-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M81VrXQrfSaYjNIFOtt%2Fuploads%2F1e0x3qitA1N1jFDFCLre%2Fimage.png?alt=media&#x26;token=c38dab80-9065-401b-998b-37c6042d9867" alt="" width="375"><figcaption></figcaption></figure>

5. That's it. Now you can [import repositories](https://docs.whitespots.io/appsec-portal/features/asset-management/how-to-import-repositories-from-version-control) from your version control system or configure your code scan process

## Set up a webhook

1. Open your newly created integration and get the webhook's URL

<figure><img src="https://3069717380-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M81VrXQrfSaYjNIFOtt%2Fuploads%2FcLU73ccdovblcwFdRrAB%2Fimage.png?alt=media&#x26;token=69e6b564-5b92-464d-9c2d-1b20702e5480" alt=""><figcaption></figcaption></figure>

2. Now open your GitLab group's Settings->Webhooks page and add a webhook

<figure><img src="https://3069717380-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M81VrXQrfSaYjNIFOtt%2Fuploads%2FKsvJThbJHVnSWwm4BV0j%2Fimage.png?alt=media&#x26;token=f3787e63-8fcb-4f9b-81b1-664f8e204ab8" alt=""><figcaption></figcaption></figure>

3. Put that webhook URL, which portal showed you before and select 2 triggers

<figure><img src="https://3069717380-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M81VrXQrfSaYjNIFOtt%2Fuploads%2F7hZyYIHvVtDLfcu0N10O%2Fimage.png?alt=media&#x26;token=555b29fc-3e24-4f8b-b2ec-e57ce1c726c0" alt="" width="375"><figcaption></figcaption></figure>

## Scan every single commit

Just switch this toggle on your integration page

<figure><img src="https://3069717380-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M81VrXQrfSaYjNIFOtt%2Fuploads%2FNQcnQdns7ok7aQqQTdH1%2Fimage.png?alt=media&#x26;token=e3708a8e-369a-412d-b9c7-03df2f8a1519" alt=""><figcaption></figcaption></figure>

## Comment on pull requests

Set up your preferred process then

<figure><img src="https://3069717380-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M81VrXQrfSaYjNIFOtt%2Fuploads%2FoBA00CwtZ3LNnwVGiZTN%2Fimage.png?alt=media&#x26;token=09a22bda-8338-40ce-ad5e-1ba98b135faa" alt=""><figcaption></figcaption></figure>
