Safeguard Documentation Center
Enterprise Software Supply Chain Manager (ESSCM)IntegrationsSource Code (SCM)

GitHub

Connect GitHub repositories to generate SBOMs

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

  1. Select the Public tab
  2. Enter a Name for this configuration
  3. Optionally add a Description
  4. Enter the public GitHub repository URL (e.g., https://github.com/facebook/react)
  5. Click Add to add the URL to the list

Step 3: Review & Connect

  1. Review the added repository URLs
  2. Click Next to proceed
  3. Configure Branch/Tag, Project Name, and Version for each repository
  4. 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

  1. Select the Private tab
  2. Enter a Name for this configuration
  3. Optionally add a Description
  4. Enter your Personal Access Token
  5. Click Verify Credentials

Step 3: Select Repositories

  1. Once credentials are verified, select the organization/user
  2. Browse and select repositories to scan
  3. Configure Branch/Tag, Project Name, and Version
  4. Click Connect to complete

Creating a Personal Access Token

To connect private repositories, you need a GitHub Personal Access Token.

Steps to Create Token

  1. Go to github.com and sign in
  2. Click your profile picture then Settings
  3. Scroll down and click Developer settings
  4. Click Personal access tokens then Tokens (classic) or Fine-grained tokens
  5. Click Generate new token
  6. Enter a token name (e.g., "Safeguard Integration")
  7. Set an expiration date
  8. Select the required scopes:

Required Permissions

ScopeDescription
repoFull control of private repositories (for private repos)
read:orgRead organization membership (if accessing org repos)
read:userRead user profile data

For fine-grained tokens, grant:

  • Repository access: Select repositories or all repositories
  • Permissions: Contents (Read-only), Metadata (Read-only)
  1. Click Generate token
  2. 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

On this page