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

# GitHub Setup

> Connect GitHub to enable automatic security scanning

Connect your GitHub account to Vidoc for automatic scanning of pull requests and repositories.

## Installation

### Step 1: Connect GitHub

1. Go to your project in the Vidoc dashboard
2. Navigate to **Settings** → **Integrations**
3. Click **"Connect GitHub"**
4. You'll be redirected to GitHub to authorize the Vidoc app

### Step 2: Authorize Access

On the GitHub authorization page:

1. Review the permissions requested
2. Select which organizations to grant access
3. Click **"Authorize"**

<Info>
  Vidoc requires read access to your code and write access to pull request comments.
</Info>

### Step 3: Select Repositories

After authorization:

1. Return to Vidoc
2. Click **"Add Repository"**
3. Select repositories from the list
4. Choose which branches to scan

## Permissions Explained

| Permission               | Purpose                                   |
| ------------------------ | ----------------------------------------- |
| **Read: Code**           | Scan your source code for vulnerabilities |
| **Read: Pull requests**  | Detect new PRs to scan                    |
| **Write: Pull requests** | Post security findings as comments        |
| **Read: Metadata**       | Access repository information             |

## Repository Settings

After adding a repository, configure scanning behavior:

### Default Branch

The branch scanned for baseline security posture. Usually `main` or `master`.

### Auto Scan

Enable to automatically scan:

* New pull requests
* Pushes to the default branch

See [Auto Scan](/github/auto-scan) for configuration options.

### PR Comments

Configure how Vidoc reports findings in pull requests:

* **Inline comments** - Comments on specific lines of code
* **Summary comment** - Overview of all findings in the PR

See [PR Comments](/github/pr-comments) for detailed settings.

## Multiple Organizations

To scan repositories from multiple GitHub organizations:

1. Go to **Settings** → **Integrations**
2. Click **"Add Organization"**
3. Authorize Vidoc for the new organization
4. Select repositories to add

## Troubleshooting

### "Repository not appearing in list"

1. Check that Vidoc is authorized for the repository's organization
2. Go to GitHub → Settings → Applications → Vidoc
3. Click **"Configure"** and add the missing repository

### "Scans not triggering"

1. Verify Auto Scan is enabled for the repository
2. Check webhook delivery in GitHub repository settings
3. See [Troubleshooting](/github/troubleshooting) for more solutions

### Revoking Access

To disconnect GitHub:

1. Go to Vidoc **Settings** → **Integrations**
2. Click **"Disconnect"** next to GitHub
3. Optionally, revoke access in GitHub Settings → Applications

## Next Steps

<CardGroup cols={2}>
  <Card title="Auto Scan" icon="rotate" href="/github/auto-scan">
    Configure automatic scanning triggers
  </Card>

  <Card title="PR Comments" icon="comment" href="/github/pr-comments">
    Customize PR feedback settings
  </Card>
</CardGroup>
