> For the complete documentation index, see [llms.txt](https://docs.konvu.com/konvu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.konvu.com/konvu/get-started/connect-your-environment/source-code/self-hosted-analysis/connecting-github.md).

# Connecting GitHub

To give the Broker access to your repositories, you'll create a GitHub App. This step collects the credentials you'll need when creating the GitHub Self Hosted integration after the Broker is deployed.

## Step 1: Create a GitHub App

You'll create a GitHub App in a specific organization where you want to test Konvu. When you install the app in this organization, you'll choose which repositories to enable it on.

1. Go to your GitHub organization settings > **Developer settings** > **GitHub Apps** > **New GitHub App**
2. Set these **Repository permissions** (minimum requirements for Konvu to work):

| Permission               | Access       | Why                                                                                                                                                                                                                        |
| ------------------------ | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Contents**             | Read         | Allows Konvu to clone and analyze your code                                                                                                                                                                                |
| **Metadata**             | Read         | Required to list repositories and basic repo info                                                                                                                                                                          |
| **Vulnerability alerts** | Read & Write | **Read**: Fetches Dependabot alerts so Konvu can triage vulnerabilities detected by GitHub's SCA. **Write**: Lets you dismiss Dependabot alerts directly from Konvu when vulnerabilities are dismissed as false positives. |

{% hint style="info" %}
**About Dependabot alerts permissions:**

* `vulnerability_alerts: read` is required if you want Konvu to import and triage your Dependabot alerts.
* `vulnerability_alerts: write` is only needed if you want to dismiss alerts from Konvu's interface.
* If you don't use GitHub Dependabot as your SCA scanner, you can omit this permission entirely.
  {% endhint %}

3. Click **Create GitHub App**

## Step 2: Collect Your GitHub App Credentials

After creating your GitHub App, collect these 4 values. You'll need them when deploying the Broker.

### 1. App ID

* Found at the top of your GitHub App settings page
* Example: `123456`

### 2. Private Key (.pem file)

* Scroll down to **Private keys** > **Generate a private key**
* Download and save the `.pem` file securely
* You'll need the full contents of this file for the Broker secret

### 3. Installation ID

Install your GitHub App to get the Installation ID:

1. From your GitHub App settings page, click **Install App** in the left sidebar
2. Select your organization
3. Choose which repositories Konvu should have access to:
   * **All repositories**: Konvu can analyze any repo in the organization
   * **Only select repositories**: Pick specific repos to analyze
4. Click **Install**
5. After installation, look at the URL in your browser. It will look like:

   ```
   https://github.com/organizations/your-organization/settings/installations/12345678
   ```
6. The number at the end (`12345678` in this example) is your **Installation ID**

### 4. GitHub Base URL

This is the URL of your GitHub instance:

* For GitHub Enterprise: Your instance URL (e.g., `https://github.yourcompany.com`)
* For GitHub.com: `https://github.com`

## Next Steps

You now have all the credentials needed to connect GitHub. Keep these values handy:

* **App ID**
* **Private Key** (.pem file)
* **Installation ID**
* **GitHub Base URL**

You'll enter the Installation ID when creating the **GitHub Self Hosted** integration in Konvu, and use the App ID and private key in the `kubectl` commands the integration dialog gives you — see Step 5 of [Installing the Broker and Controller](/konvu/get-started/connect-your-environment/source-code/self-hosted-analysis/installing-the-broker-and-controller.md).

If you're using the Konvu Terraform module, see [Setting Up Infrastructure](/konvu/get-started/connect-your-environment/source-code/self-hosted-analysis/setting-up-infrastructure.md) first.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.konvu.com/konvu/get-started/connect-your-environment/source-code/self-hosted-analysis/connecting-github.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
