> ## Documentation Index
> Fetch the complete documentation index at: https://www.oplane.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect GitHub repositories to Oplane

> Connect Oplane to your GitHub repositories to enable automated threat modeling on pull requests. The setup takes just a few minutes.

Connect Oplane to your GitHub repositories to enable automated threat modeling on pull requests. The setup takes just a few minutes.

<Steps>
  <Step title="Open Workspaces">
    Navigate to **Workspaces** in the left sidebar and click the **+ Workspace** button in the top right corner.

    <Frame>
      <img src="https://mintcdn.com/oplane-6a173d70/GQK91gqL1oAEp0r4/images/connect-github/workspaces.webp?fit=max&auto=format&n=GQK91gqL1oAEp0r4&q=85&s=76cf1596e1891e317419d4faa19447b2" alt="Oplane Workspaces page" width="3840" height="2160" data-path="images/connect-github/workspaces.webp" />
    </Frame>

    <Frame caption="Click the + Workspace button">
      <img src="https://mintcdn.com/oplane-6a173d70/GQK91gqL1oAEp0r4/images/connect-github/zoom-button.png?fit=max&auto=format&n=GQK91gqL1oAEp0r4&q=85&s=b0a7faa87bd57991755cd0635640423e" alt="+ Workspace button" width="1400" height="1180" data-path="images/connect-github/zoom-button.png" />
    </Frame>
  </Step>

  <Step title="Add a repository source">
    On the New Workspace page, enter a **Name** and optional **Description**. Then under **Sources**, click **Continue with GitHub** to connect your account. You can also set **Access** for the workspace on this same page, or leave **Sources** empty to run threat modeling locally via [MCP](/docs/find/mcp).

    <Frame>
      <img src="https://mintcdn.com/oplane-6a173d70/GQK91gqL1oAEp0r4/images/connect-github/setup.webp?fit=max&auto=format&n=GQK91gqL1oAEp0r4&q=85&s=1c091a4a987259bed7cf18a32f7a6b3c" alt="Connect GitHub under Sources on the New Workspace page" width="3078" height="2232" data-path="images/connect-github/setup.webp" />
    </Frame>
  </Step>

  <Step title="Sign in to GitHub">
    Oplane redirects you to GitHub to sign in. Enter your credentials or use one of the alternative sign-in methods (passkey, Google, Apple).

    <Frame>
      <img src="https://mintcdn.com/oplane-6a173d70/jwR0xubu7PkQElvJ/images/connect-github/signin.webp?fit=max&auto=format&n=jwR0xubu7PkQElvJ&q=85&s=bef5da6b4cc1e669f7a2d8e093f34783" alt="GitHub sign-in page" width="724" height="600" data-path="images/connect-github/signin.webp" />
    </Frame>
  </Step>

  <Step title="Install the Oplane GitHub App">
    GitHub prompts you to install the Oplane Bot on your account or organisation. Choose which repositories Oplane should have access to, review the permissions, and click **Install**.

    Permissions granted: Read access to code, issues, and metadata. Read and write access to checks and pull requests, which is how Oplane posts review comments on your PRs.

    <Frame>
      <img src="https://mintcdn.com/oplane-6a173d70/jwR0xubu7PkQElvJ/images/connect-github/install.webp?fit=max&auto=format&n=jwR0xubu7PkQElvJ&q=85&s=e4267ed572d8cf294efd0baa46b4256c" alt="Install the Oplane GitHub App" width="749" height="885" data-path="images/connect-github/install.webp" />
    </Frame>
  </Step>

  <Step title="Select a repository">
    Once your account is connected, **Sources** shows a Git namespace dropdown alongside a repository search. Pick the namespace (your personal account or an organisation), search for the repository you want, and click **Select**. Use **Add GitHub account** or **Switch Git provider** in the dropdown to connect a different account or provider.

    <Note>
      GitHub organisations already claimed by a different Oplane organisation appear greyed out in the picker and cannot be selected. See [Namespace claims](/docs/how-it-works/workspaces#namespace-claims) for details.
    </Note>

    <Frame>
      <img src="https://mintcdn.com/oplane-6a173d70/GQK91gqL1oAEp0r4/images/connect-github/search.webp?fit=max&auto=format&n=GQK91gqL1oAEp0r4&q=85&s=7a3c52b9cfb1553e620b95d82d3befb1" alt="Select a namespace and repository under Sources" width="3078" height="2232" data-path="images/connect-github/search.webp" />
    </Frame>
  </Step>

  <Step title="Configure and create">
    Once a repository is selected, an **Analyse Pull Requests** toggle appears. Leave it on to automatically threat model every PR. If disabled, you can still trigger reviews by mentioning `@oplane` in a PR comment.

    Under **Access**, add team members who should have access and set **General access** (Restricted, or open to the organisation). Then click **Create**.

    <Frame>
      <img src="https://mintcdn.com/oplane-6a173d70/GQK91gqL1oAEp0r4/images/connect-github/configure.webp?fit=max&auto=format&n=GQK91gqL1oAEp0r4&q=85&s=b2fa606850fcfc62dfcf3392fd32f5b0" alt="Configure pull request analysis and access, then create the workspace" width="3078" height="2232" data-path="images/connect-github/configure.webp" />
    </Frame>
  </Step>

  <Step title="Choose threat models">
    Oplane analyses your repository and suggests threat models based on the codebase. Select the ones relevant to your project, or describe your own scope in the text box. You can also click **Skip and go to workspace** to do this later. This step helps Oplane understand what to focus on in future PR reviews.

    <Frame>
      <img src="https://mintcdn.com/oplane-6a173d70/GQK91gqL1oAEp0r4/images/connect-github/suggest.webp?fit=max&auto=format&n=GQK91gqL1oAEp0r4&q=85&s=b2cf133e7c94babd59fdb54782add831" alt="Choose suggested threat models for your repository" width="3078" height="2232" data-path="images/connect-github/suggest.webp" />
    </Frame>
  </Step>
</Steps>

<Card title="What's next?" icon="git-pull-request" href="/docs/find/pull-and-merge-requests">
  Learn how Oplane reviews your pull requests.
</Card>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.