# Connecting source control

Connecting source control is how a Seal Project gets into [source code mode](/new-documentation/new-docs/package-discovery-mode/source-code.md), the most accurate of the four package discovery modes. Seal supports three source-control systems:

* [Connecting GitHub](/new-documentation/new-docs/connecting-source-control/github.md): the most complete integration. Adds discovery, automatic pull requests for Sealing Rules, and findings sync.
* [Connecting GitLab](/new-documentation/new-docs/connecting-source-control/gitlab.md): discovery only.
* [Connecting Azure DevOps](/new-documentation/new-docs/connecting-source-control/azure-devops.md): discovery only.

GitHub uses the Seal GitHub App and an OAuth-style install flow. GitLab and Azure DevOps use a personal access token (PAT) plus the platform URL.

After a system is connected, additional repositories can be imported through the same flow without reconnecting. Existing connections are managed at [Settings > Integrations](/new-documentation/new-docs/connecting-source-control/managing-connections.md).

## Permissions

Inside Seal, you need the **Admin** or **Sealer** [role](/new-documentation/new-docs/users-and-sso/user-roles.md) to connect or disconnect a source-control system, and to import projects.

On the source-control side, the permission you need depends on the system:

* **GitHub:** authority to install GitHub Apps on the organization (typically an org owner or a user with the appropriate org-level permission).
* **GitLab:** a personal access token from a user with **Developer, Maintainer, or Owner** role on the GitLab projects you want to scan, with the `api` scope.
* **Azure DevOps:** a personal access token with **full access**, or at least **Code (Read & Write)**.

## Related

* [Source code mode](/new-documentation/new-docs/package-discovery-mode/source-code.md): the discovery mode an SCM connection puts a Seal Project into.
* [Managing source control connections](/new-documentation/new-docs/connecting-source-control/managing-connections.md): viewing, re-authenticating, and disconnecting existing connections.
* [The onboarding wizard](/new-documentation/new-docs/onboarding-wizard.md): the wizard's source-control step is a wrapper around the GitHub flow described here.


---

# 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.sealsecurity.io/new-documentation/new-docs/connecting-source-control.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.
