GitGuardian
DETAILS: Tier: Premium, Ultimate Offering: SaaS, self-managed Status: Beta
- Introduced in GitLab 16.9 with a flag named
git_guardian_integration
. Disabled by default.
FLAG:
On self-managed GitLab, by default this feature is not available. To make it available, an administrator can enable the feature flag named git_guardian_integration
.
On GitLab.com, this feature is not available.
This feature is not ready for production use.
GitGuardian is a cybersecurity service that detects sensitive data such as API keys and passwords in source code repositories. It scans Git repositories, alerts on policy violations, and helps organizations fix security issues before hackers can exploit them.
You can configure GitLab to reject commits based on GitGuardian policies.
This feature is in Beta and subject to change without notice.
To set up the GitGuardian integration:
Create a GitGuardian API token
Prerequisites:
- You must have a GitGuardian account.
To create an API token:
- Sign in to your GitGuardian account.
- Go to the API section in the sidebar.
- In the API section sidebar go to Personal access tokens page.
- Select Create token. The token creation dialog opens.
- Provide your token information:
- Give your API token a meaningful name to identify its purpose.
For example,
GitLab integration token
. - Select an appropriate expiration.
- Select the scan scope checkbox. It is the only one needed for the integration.
- Give your API token a meaningful name to identify its purpose.
For example,
- Select Create token.
- After you've generated a token, copy it to your clipboard. This token is sensitive information, so keep it secure.
Now you have successfully created a GitGuardian API token that you can use to for our integration.
Set up the GitGuardian integration for your project
Prerequisites:
- You must have at least the Maintainer role for the project.
After you have created and copied your API token, configure GitLab to reject commits:
To enable the integration for your project:
- On the left sidebar, select Search or go to and find your project or group.
- Select Settings > Integrations.
- Select GitGuardian.
- In Enable integration, select the Active checkbox.
- In API token, paste the token value from GitGuardian.
- Optional. Select Test settings.
- Select Save changes.
GitLab is now ready to reject commits based on GitGuardian policies.