# Scan a Github/Gitlab

{% embed url="<https://youtu.be/8JsX1X9HjWE>" %}

### Prerequisites&#x20;

* You must have a valid Github/Gitlab/Azure account

### 1. Github/Gitlab Cloud&#x20;

#### **Step 1: Sign in or Integrate Github/Gitlab**&#x20;

Sign in with Github or Gitlab (or integrate them from the integration page if you are signing up by email or with any other IDP)

<figure><img src="https://lh4.googleusercontent.com/T2FrsHezTKqTDDTVQbGWALaZTbbB-7znWixYNX2oXWmsDZf-i9_Da1GYVg-nVFE4zHyL6qsIR7rsBYUwl0n1XskFofbRozDQwaEoshygPTs29mSgs6XbLuP_EQWcPYyZiMcmfI155vd6aOvVIQcPQUCTeDczxk6DPfR391-AHW9HEogZN0nzqoGGBA" alt=""><figcaption></figcaption></figure>

**Step 2: Scan Repositories**&#x20;

If you are logged in with a GitHub/Gitlab account or integrate the accounts, it will redirect you to the Github/Gitlab Scan Page where you will see all of your repositories (both public and private). You can select any repository (or multiple) and run the scans.

<figure><img src="https://lh6.googleusercontent.com/cf2ltaUT_jASkAAczg_Jp9oPtkzLeioUQm6yAn9dhA6yEj04qzSs1WzK-O_m3gyNrJkkPgjQ9tohWAhB4z1DWnk7u_ykGSrhYo7MLirIPA2QWUs2xrptCH2_okVzf3VTv78TAhvHV3YjBMQt4vS4mkrMItgIMHm3god3AYfv-LSdvJmhocZyNAhHWQ" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh4.googleusercontent.com/MwdO5MCyNrI-g2M0TwilKJ7Tgg9lEct2VhWn9dv2VchTGHwejuPaQcaDYMSPNYvkEyaG-pfyF0g9FeELYuVhY1bUKpu2ePeVqN86ucnUWW19NMCGKTl6AJQSWWru8ldvuGPUZO8k8MYfB_FlV0CRQPEj_Ni2V24GdFSDlHj_aj837X6ghsPQZyvXZA" alt=""><figcaption></figcaption></figure>

#### **Step 3: Scan any public repository.**&#x20;

You can scan any public Github or Gitlab repository using the input form (check below). Scan your public GitLab repositories in the marked option

<figure><img src="https://lh6.googleusercontent.com/07lm6WI5RWUJ-75e2wNxv-1OrNf4Ggalz4p8213Fan8VCbVC6pLlyzmGvcwWljOStv78_CozhM4OGLlruWxkJP4_sqbAhD6wQtaHcga46VzKyAGlswbyj5iK7FkKiyb6xihhBsjMms_Ay20OaZp-8-peF3gO4MZE4QH7dhOmi5e8-5Y06Q3mRamijw" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh6.googleusercontent.com/DVGruhvn5S6g3wjfWq3p4LEDwdUUplK_kYL_MBPk3OANT5RG_n_BqmGYsho6_YDGDc2gVMquarKYfzG9rY-6OMwqahk1IZF7E64G4axEbkE4bbG3OJ0OCUJ_BsMqfoVyCpvd1jajRrV6GqhBZHLfzmKrkQ9p5o-dqMmgRbGcDIH_Pu68c9mtHexlqA" alt=""><figcaption></figcaption></figure>

### **2. Github/Gitlab Enterprise**&#x20;

#### **Step 1:** Contact CD Support to enable&#x20;

By default, the option for Github/Gitlab enterprise is disabled. You need to contact CloudDefense support at <support@clouddefense.ai> to enable the option. Please email us with these details:

* Organization Name&#x20;
* Account email address

<figure><img src="https://lh6.googleusercontent.com/RbNlqWGsV1XGo5OmOOG5I1XJmn-ccXfTRw0j3-tgyJA1yO37LL88PSQd6oB1wuZJipUYnhzhiK3JWCnR3zMJxx33SP3KHFYpPhjk9E5njjn_9LtJ4DhENLyOWBFUz8zmJtR-TSOMtt0NnmhO9SK-Tn3YC7mbm05ptUDw3YwypmPhwjE9-8jtCD0e4A" alt=""><figcaption></figcaption></figure>

#### How to Get GitHub Enterprise link and Generate Access Token:

1. **Enterprise Token:**

To integrate GitHub enterprise users must have an enterprise account. If the user have an enterprise account user can see all enterprises here <https://github.com/settings/enterprises>

<figure><img src="https://lh3.googleusercontent.com/d-5FeMX1ZmQdzKDbof67ySmJr--6bXDKIeLyl27zOBu7hP1qkoQYVu6_4XMs8ki5IGUG_fUjoW9nvh-lHeBOKwHPo7rww4GL23W59Y2DuWtpYGzyrSzNl9C3cz8aM3rO9Q1Z6weTAy0VBQWVP14zIZo8DRy_IiVCdSh0xrS-FprYVeE9ydgSuifOcQsjCQ" alt=""><figcaption></figcaption></figure>

Clicking on the enterprise user will get an enterprise link. If the user doesn't have a GitHub enterprise, the user can easily open an enterprise account from the link below. <https://github.com/enterprise>

2\. **Access token**&#x20;

To integrate GitHub enterprise users need access tokens. To find the access token user need to go to **Setting > tokens** Here is the URL : <https://github.com/settings/tokens>

<figure><img src="https://lh5.googleusercontent.com/WWT3KGDoLzxnDhIdkdOLeftA09jDl7fyWMK463ARv6GuqlU5PY6ho4aZx7bSgq9xOhnJDRttC7XqAb3GsOduroJ2T0IvxRROzcT4hMiGSNg0lXSTDINZajhmdr2_nstgxJvR8UUcKt1DOEQRZGPC7DBmEvBvGuq9eq-_EMFiDVunFMERPoLhqlUd8okFXA" alt=""><figcaption></figcaption></figure>

After creating an access token, the user must copy and paste it into the enterprise access token field.

<figure><img src="https://lh4.googleusercontent.com/AC2E5YC3euGBNTWQPgX5fmtTJNDa3S9fgZYdwMEFhm46gPpKq3XLW4ohPjGp4MsQg5OczJ-J6QzM-yaEG2MQxRYiz0JqML1hSOmkdb6muYzSy0POniBUV3s9Mf2lcE-pA9DiBLjOnwUN453RNbU-WG0Aoc1ueXhkGYFFIY9EB6sgJjC9jB9g-KVbsg" alt=""><figcaption></figcaption></figure>

#### **Step 2: Configure**&#x20;

Once your account is ready for integration, you will see the options to provide details as below:

1. Enterprise Link&#x20;
2. Enterprise Access Token of Github and Gitlab

<figure><img src="https://lh6.googleusercontent.com/zxq8miw3zbjoXW-8JUJ0cNeqKxQ8r7fuxLw0p9XCQ_E5Cmda9mhcPL0ub19TW_Cyl5S7GIgpxPNpC22obopjBfBde3hNV9eYmJ3OsBuHHg_CojNcRZjrEozG8tM7h5SUG5Bwsy48KFMakSwSgWHjPI5_-71saW3cjPhtYUyTXRSj2fAoXmKI5yRdCA" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh3.googleusercontent.com/_OGA9b3ahkkPTRZNO4vcO81VtSBjSdfsXDdrzb02xJ8DcX2SPkMjNqV_y8G8MLfxFphfV-Zk-itQca_MuHeisrfzyXsCjDxPmFY8QfNjBTRnV_hlzxSXkMPV4y3j6rfgzH6hSc3jNSA45DpmOH2Us7brR8GsKnc9pBC3tC7eF4lLbrN2zxZ18EKxyQ" alt=""><figcaption></figcaption></figure>

#### How to Get **Gitlab** Enterprise link and Generate Access Token:

1. **Enterprise link :**

To integrate Gitlab enterprise users must have an enterprise account. If the user have an enterprise account user can see all enterprises/groups here <https://gitlab.com/dashboard/groups>

<figure><img src="https://lh6.googleusercontent.com/iKdhlNu0whISY_xWKsad07uy2Iit6pF2KVsBZXHsHIOTom8uyq3KC7At-iCbTN5oQWn7GdPnvRbNaiNCeg49fMRKajXmyq59sivDFh5bWIjMYh9dVHq3LiZ8ZXQ8JMbzR_afNgE6Hm0vNXigAXr2LJ92MeFDY7rXXFluRNPJgtIL2Hai68wKkzjxldqMrQ" alt=""><figcaption></figcaption></figure>

Clicking on the enterprise user will get an enterprise link. If the user doesn't have any Gitlab enterprise, the user can easily open an enterprise account from the link below. <https://github.com/enterprise>

**2. Access token:**

To integrate Gitlab enterprise users need access tokens. To find access token user need to go from profile dropdown Preference > Access token

<figure><img src="https://lh3.googleusercontent.com/9MAfwmR8LdJ6s7MudKWS-WLaDJx_F1TKrUUMKg5dB6SCXhdXrcXMuv7LhYXHvTrN2cI7Vw2isSNxq2TI-gXybOFM9nOcuMhTbk9V7dg3Epfmil9mfjeoSjyOJJsAMjIlnP_2XKxOFNMbBFfVpjf9Xg5Iif6sGfQ7fn-UQKs0T81XXKmEdh69UO_QYqMrpg" alt=""><figcaption></figcaption></figure>

Here is the **URL** : <https://gitlab.com/-/profile/personal_access_tokens> After creating the access token users need to copy that and paste it to the enterprise access token field.

Once you provide the required information, click **configure.**
