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

Frequently Asked Questions

Common questions about source code integrations

Source Code Integration FAQ

Answers to frequently asked questions about connecting source code repositories to Safeguard.sh.

General Questions

What source code platforms are supported?

Safeguard.sh supports:

  • GitHub (Cloud and Enterprise)
  • GitLab (Cloud and Self-Managed)
  • Bitbucket (Cloud and Server)
  • Azure Repos (Cloud and Server)
  • Generic Git repositories (any Git URL)

Can I connect multiple repositories at once?

Yes. When configuring a private integration, you can select multiple repositories from your organization after authenticating. Each repository becomes a separate project in Safeguard.sh.

Do I need to install anything in my repository?

No. Safeguard.sh clones your repository securely to generate SBOMs. No webhooks, apps, or files need to be added to your repository (though you can optionally configure webhooks for automatic scanning).

How often are repositories scanned?

By default, repositories are scanned:

  • On initial connection - Full scan
  • Daily - Continuous monitoring for new vulnerabilities
  • On webhook trigger - If webhooks are configured
  • Manual - When you request a rescan

Authentication

What permissions do I need to grant?

PlatformRequired Permissions
GitHubrepo (read) for private repos, none for public
GitLabread_repository scope
BitbucketRepository Read permission
Azure ReposCode Read scope

Are my credentials stored securely?

Yes. All credentials are:

  • Encrypted at rest using AES-256
  • Never logged or displayed after initial entry
  • Stored in isolated, secure vaults
  • Accessible only to your organization

Can I use deploy keys instead of personal tokens?

Currently, Safeguard.sh requires personal access tokens or app credentials for authentication. Deploy keys are not supported because they don't provide the ability to list repositories.

My token expired. What happens?

When a token expires:

  • Scheduled scans will fail
  • You'll receive a notification
  • Existing SBOMs remain available
  • Update your credentials in IntegrationsEdit Configuration

Repository Access

Can I scan private repositories?

Yes. Private repositories require authentication:

  1. Select the Private tab when configuring
  2. Enter your access token or credentials
  3. Verify the connection
  4. Select which private repos to scan

Can I limit which branches are scanned?

Yes. When configuring a repository, you can specify:

  • A single branch (e.g., main)
  • Multiple branches (e.g., main, develop)
  • Tags (e.g., v1.0.0)
  • All branches

How do I scan a specific tag or release?

When adding or editing a project configuration:

  1. In the Branch/Tag field, enter the tag name (e.g., v1.2.3)
  2. Safeguard.sh will scan that specific tag
  3. Create separate projects for different versions if needed

Can I exclude certain files or directories from scanning?

Yes. Create a .safeguardignore file in your repository root:

# Ignore test files
test/
tests/
__tests__/

# Ignore documentation
docs/
*.md

# Ignore build artifacts
dist/
build/

Monorepos

How do I scan a monorepo?

For monorepos with multiple packages:

Option 1: Scan the entire repo

  • Creates one SBOM with all dependencies
  • Simple setup
  • May include development-only dependencies

Option 2: Scan specific packages

  • Create separate configurations for each package
  • Point to subdirectories (e.g., packages/app1)
  • More granular SBOMs

Can I scan subdirectories?

Yes. When configuring a repository, you can specify a subdirectory path:

  1. Add the repository URL
  2. In advanced settings, set the Root Path (e.g., packages/frontend)
  3. Only that directory will be scanned

Scanning Behavior

What files does Safeguard.sh look for?

Safeguard.sh detects manifest files including:

LanguageFiles
JavaScriptpackage.json, package-lock.json, yarn.lock
Pythonrequirements.txt, Pipfile, pyproject.toml
Javapom.xml, build.gradle
Gogo.mod, go.sum
RustCargo.toml, Cargo.lock
.NET*.csproj, packages.config
RubyGemfile, Gemfile.lock
PHPcomposer.json, composer.lock

Why are some dependencies missing from my SBOM?

Possible reasons:

  1. Lock file missing - Install dependencies to generate lock file
  2. Unsupported package manager - Check support matrix
  3. Dev dependencies excluded - Enable "Include Dev Dependencies"
  4. Nested dependencies - Increase scan depth

How long does a scan take?

Scan time depends on:

FactorImpact
Repository sizeLarger = longer
Number of dependenciesMore = longer
Scan depthDeeper = longer

Typical times:

  • Small project: 30 seconds - 2 minutes
  • Medium project: 2-5 minutes
  • Large project: 5-15 minutes

Troubleshooting

"Repository not found" error

  • Verify the URL is correct
  • Check your token has access to the repository
  • For private repos, ensure authentication is configured

"Authentication failed" error

  • Verify token hasn't expired
  • Check token has required permissions
  • Regenerate token if necessary

Scan is stuck or taking too long

  • Check repository size (very large repos take longer)
  • Try scanning a specific branch instead of all branches
  • Contact support if issue persists

Webhook isn't triggering scans

  • Verify webhook URL is correct
  • Check webhook secret matches
  • Review webhook delivery logs in your Git platform
  • Ensure webhook events include "push"

Best Practices

Token Management

  • Use dedicated service accounts for tokens
  • Set reasonable expiration dates
  • Rotate tokens periodically
  • Use minimum required permissions

Repository Organization

  • Create separate projects for different services
  • Use consistent naming conventions
  • Document which repos are connected

Scanning Strategy

  • Scan main/production branches daily
  • Scan release tags for audit purposes
  • Use webhooks for critical repositories
  • Review and update configurations periodically

Need More Help?

On this page