# GitHub

Install the LeoPrevent GitHub App to import repositories and teams, fill your invite list, and turn on context scans.

The LeoPrevent GitHub App connects your GitHub organisation. It is used for:

- **Workspaces**: GitHub teams become workspaces when you import them, and new repositories land in the right one. See [Create and import workspaces](https://help.leotrace.io/create-and-import-workspaces/).
- **Invite list from GitHub**: fills your invite list from commit authors and teams.
- **Context scans**: reads setup and configuration files, so reviews are more accurate. See [Repository context scans](https://help.leotrace.io/repository-context-scans/).
- **Code scanning alerts**: once you turn it on, open alerts in the files your agent changes are judged on every turn, and a sweep clears the backlog on request. See [GitHub code scanning](https://help.leotrace.io/github-code-scanning/).
- **Scanner findings filed as issues**: open issues a scanner filed in the files your agent changes are judged on every turn. See [GitHub issues from a scanner](https://help.leotrace.io/github-issues/).

Available to Admins and Owners. Installing the app on a GitHub organisation needs an owner of that organisation.

## Connect GitHub

1. Open **Integrations** and select **GitHub**.
2. Select **Continue to GitHub**.
3. On GitHub, choose the organisation and the repositories LeoPrevent can access.
4. Approve the install. GitHub returns you to the dashboard.

If you are not an owner of the GitHub organisation, select **Copy link for a GitHub owner** and send it to one, or continue and GitHub sends your owners a request. Come back once they have approved it.

## What GitHub asks for

GitHub lists these permissions on its install screen. You choose which repositories they apply to.

| Permission | Access | Used for |
|---|---|---|
| Metadata | Read-only | Listing repositories. |
| Contents | Read and write | Reading commit authors for the invite list, and setup and configuration files for context scans. LeoPrevent never writes code or commits. |
| Code scanning alerts | Read and write | Reading alerts and dismissing the false positives you agree with. |
| Issues | Read and write | Reading scanner findings filed as issues, and closing the false positives you agree with, with a comment. |
| Members (organisation) | Read-only | Filling the invite list from your teams. |
| Pull requests | Read and write | Not used by any current feature. |
| Checks | Read and write | Not used by any current feature. |

## Check it worked

The GitHub drawer shows **Connected**, the GitHub organisation, how many repositories are shared, and who connected it and when. It lists the shared repositories.

To have code scanning alerts judged, see [GitHub code scanning](https://help.leotrace.io/github-code-scanning/).

A repository the app can no longer see shows **No access**. Share it again on GitHub.

## Change repositories

Select **Change on GitHub** in the drawer to add or remove repositories on GitHub. Context scans are set on **Controls**, not here.

## Disconnect

Select **Disconnect** in the drawer and confirm. Context scans stop, teams are no longer followed, and GitHub code scanning alerts and GitHub issues from a scanner are no longer checked. Reviews from the plugin carry on. To remove access completely, also uninstall the LeoPrevent app in your GitHub organisation's settings.

Source: https://help.leotrace.io/github/ (updated 2026-11-18)
