# SonarQube On-Prem

Integrating SonarQube with Hivel enhances the quality and security of your codebase by enabling continuous code inspection and quality monitoring. SonarQube helps detect bugs, vulnerabilities, and code smells, ensuring that your software projects maintain high standards of code quality. By following the steps outlined below, you can seamlessly connect SonarQube to Hivel, allowing for efficient code quality management within your platform.

#### Step - 1: Whitelist Necessary IP Addresses <a href="#h_01j3f1mcmbfjzaqwgecz0qnyxy" id="h_01j3f1mcmbfjzaqwgecz0qnyxy"></a>

For a secure and uninterrupted connection, make sure to whitelist the following IP addresses:

* **Mandatory IPs**:
  * 107.23.139.76
  * 3.219.89.23
* **Recommended, but Optional IPs**:
  * 45.119.114.218
  * 183.82.116.218

#### Step - 2: Generate an Access Token in SonarQube <a href="#h_01j05wwnfdzyph27b08y79h4sp" id="h_01j05wwnfdzyph27b08y79h4sp"></a>

1\. Log in to your SonarQube account.

2\. Click on the name icon located in the top right corner.

3\. Select "**My Account**" from the dropdown menu.

<figure><img src="/files/X1HhbO6xKBDswbmAJOzs" alt=""><figcaption></figcaption></figure>

4\. Navigate to the "**Security**" tab.

<figure><img src="/files/frFJG8jZWjA3jEdDyFdu" alt=""><figcaption></figcaption></figure>

5\. Go to Generate a token.

6\. Enter a token name, preferably "Hivel".

7\. Click on the "**Generate**" button.

8\. Copy the generated token and save it securely.

<figure><img src="/files/CkznvS9BXBIIhKccsTwr" alt=""><figcaption></figcaption></figure>

9\. Copy the URL from the address bar of your SonarQube server and save it.

<figure><img src="/files/vlln5pfdjqmHb26G6asU" alt=""><figcaption></figcaption></figure>

#### Step - 3: Connecting SonarQube to Hivel <a href="#h_01j05wwnfd5tgn2061q6h8yasv" id="h_01j05wwnfd5tgn2061q6h8yasv"></a>

1\. Log in to the Hivel Platform.

2\. Go to "**Settings**".

3\. Select "**Integrations**" from the settings menu.<br>

<figure><img src="/files/gW0QStHZfm2i4pUCXwIa" alt="" width="261"><figcaption></figcaption></figure>

4\. Find the SonarQube card and click on "**Connect**".

<figure><img src="/files/y94NngEV0SfjjKG094Ok" alt="" width="419"><figcaption></figcaption></figure>

5\. **Fill in the required details:**

* **SonarQube URL:** Enter the SonarQube server URL you copied earlier.
* **Access Token:** Enter the access token you generated in SonarQube.

<figure><img src="/files/eUSCH6j1dhyHEI2H4sGG" alt="" width="375"><figcaption></figcaption></figure>

6\. **Click on Submit.**

<figure><img src="/files/Fs7xXtkFlcdIiVM7Wzl4" alt="" width="371"><figcaption></figcaption></figure>

By following these steps, you should successfully connect your SonarQube instance to Hivel. If you encounter any issues or need further assistance, please reach out to the Hivel support team at [<mark style="color:purple;">support@hivel.ai</mark>](mailto:support@hivel.ai).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hivel.ai/integrations/on-prem-setup/sonarqube-on-prem.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
