Prerequisites
Create a GitHub data source in Infisical
1
Go to Secret Scanning > Data Sources and select Add Data Source.

2
Select GitHub.

3
Select the connection to use and the repositories to scan, then select Next.

- GitHub Radar Connection: The connection that can access the repositories you want to scan
- Scan Repositories: Which repositories Infisical scans
- All Repositories: Every repository the connection can access
- Select Repositories: Only the repositories you select in Include Repositories
- Auto-Scan Enabled: Whether Infisical scans each new push to the repositories
4
Enter a name and, optionally, a description for the data source, then select Next.

- Name: A name that contains only lowercase letters, numbers, and hyphens
- Description (optional): A description of the data source
5
Review the data source, then select Create Data Source.

6
The data source appears in Data Sources. If auto-scan is enabled, Infisical starts a historical scan of every repository.

7
To see the data source’s repositories and scan history, select the data source.

8
To review the secrets the scans found, go to Findings. To learn what each finding contains and how to change its status, see Findings.

Pull request checks
If Scan New Commits is on for a GitHub data source, Infisical scans the commits of each pull request opened against a repository in the data source. Infisical reports the result as a check named Infisical Secret Scanning on the pull request, and scans the pull request again each time someone pushes to it.- If Infisical finds a secret in any commit of the pull request, the check fails and marks the file and line of each secret, unless the secret’s finding is marked as a false positive or ignored
- If Infisical can’t finish the scan, the check fails, and you can re-run the check from the pull request
- If Infisical finds no secrets, the check passes
- If the pull request comes from a fork, Infisical doesn’t scan it and marks the check as skipped, which doesn’t block merging (Infisical scans its commits after they’re merged into the repository)
If your GitHub organization installed the app for your GitHub Radar Connection before pull request checks were available, an organization owner has to accept the app’s new permissions in GitHub before Infisical can check pull requests.