Enterprise Software Supply Chain Manager (ESSCM)IntegrationsSource Code (SCM)
GitHub
Connect GitHub repositories to generate SBOMs
Permissions and token types
The GitHub integration guide lists the exact permissions each token needs, which token types work, and the current setup steps. Where this page and that guide differ, follow the guide.
GitHub Integration
Connect your GitHub repositories to Safeguard for SBOM generation and vulnerability scanning.
Prerequisites
- A GitHub account
- For private repositories: Personal Access Token with appropriate permissions
Public Repositories
Step 1: Navigate to Integrations
Go to Integrations from the sidebar and click Connect on the GitHub card.
Step 2: Enter Repository URL
- Select the Public tab
- Enter a Name for this configuration
- Optionally add a Description
- Enter the public GitHub repository URL (e.g.,
https://github.com/facebook/react) - Click Add to add the URL to the list
Step 3: Review & Connect
- Review the added repository URLs
- Click Next to proceed
- Configure Branch/Tag, Project Name, and Version for each repository
- Click Connect to complete
Private Repositories
Step 1: Navigate to Integrations
Go to Integrations from the sidebar and click Connect on the GitHub card.
Step 2: Enter Credentials
- Select the Private tab
- Enter a Name for this configuration
- Optionally add a Description
- Enter your Personal Access Token
- Click Verify Credentials
Step 3: Select Repositories
- Once credentials are verified, select the organization/user
- Browse and select repositories to scan
- Configure Branch/Tag, Project Name, and Version
- Click Connect to complete
Creating a Personal Access Token
To connect private repositories, you need a GitHub Personal Access Token.
Steps to Create Token
- Go to github.com and sign in
- Click your profile picture then Settings
- Scroll down and click Developer settings
- Click Personal access tokens then Tokens (classic) or Fine-grained tokens
- Click Generate new token
- Enter a token name (e.g., "Safeguard Integration")
- Set an expiration date
- Select the required scopes:
Required Permissions
| Scope | Description |
|---|---|
repo | Full control of private repositories (for private repos) |
read:org | Read organization membership (if accessing org repos) |
read:user | Read user profile data |
For fine-grained tokens, grant:
- Repository access: Select repositories or all repositories
- Permissions: Contents (Read-only), Metadata (Read-only)
- Click Generate token
- Copy the token immediately (it won't be shown again)
Troubleshooting
"Credentials verification failed"
- Ensure the token has not expired
- Verify the token has the required permissions
- Check if the token was copied correctly (no extra spaces)
"Repository not found"
- For private repos, ensure the token has access to that repository
- Verify the repository URL is correct
- Check if the repository still exists
"Rate limit exceeded"
- GitHub has API rate limits; wait and try again
- Consider using a token with higher rate limits