diff --git a/doc/api/integrations.md b/doc/api/integrations.md index 2d85ea2c6be7e62892393c5946426bca67e88cd7..d90aacd08187a03ed1fce5669069dc600d21f6ea 100644 --- a/doc/api/integrations.md +++ b/doc/api/integrations.md @@ -700,6 +700,59 @@ Get the external wiki settings for a project. GET /projects/:id/integrations/external-wiki ``` +## GitGuardian + +DETAILS: +**Tier:** Premium, Ultimate +**Offering:** SaaS, self-managed +**Status:** Beta + +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/435706) in GitLab 16.9 [with a flag](../administration/feature_flags.md) 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](../administration/feature_flags.md) named `git_guardian_integration`. +On GitLab.com, this feature is not available. +This feature is not ready for production use. + +[GitGuardian](https://www.gitguardian.com/) 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](../policy/experiment-beta-support.md#beta) and subject to change without notice. + +### Set up GitGuardian + +Set up the GitGuardian integration for a project. + +```plaintext +PUT /projects/:id/integrations/git-guardian +``` + +Parameters: + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- |-----------------------------------------------| +| `token` | string | true | GitGuardian API token with `scan` scope. | + +### Disable GitGuardian + +Disable the GitGuardian integration for a project. Integration settings are reset. + +```plaintext +DELETE /projects/:id/integrations/git-guardian +``` + +### Get GitGuardian settings + +Get the GitGuardian integration settings for a project. + +```plaintext +GET /projects/:id/integrations/git-guardian +``` + ## GitHub DETAILS: diff --git a/doc/user/project/integrations/git_guardian.md b/doc/user/project/integrations/git_guardian.md new file mode 100644 index 0000000000000000000000000000000000000000..213332efd73c3fae839b4dbb7a2543777fcb6467 --- /dev/null +++ b/doc/user/project/integrations/git_guardian.md @@ -0,0 +1,77 @@ +--- +stage: Create +group: Source Code +info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments +--- + +# GitGuardian + +DETAILS: +**Tier:** Premium, Ultimate +**Offering:** SaaS, self-managed +**Status:** Beta + +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/435706) in GitLab 16.9 [with a flag](../../../administration/feature_flags.md) 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](../../../administration/feature_flags.md) named `git_guardian_integration`. +On GitLab.com, this feature is not available. +This feature is not ready for production use. + +[GitGuardian](https://www.gitguardian.com/) 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](../../../policy/experiment-beta-support.md#beta) and subject to change without notice. + +To set up the GitGuardian integration: + +1. [Create a GitGuardian API token](#create-a-gitguardian-api-token). +1. [Set up the GitGuardian integration for your project](#set-up-the-gitguardian-integration-for-your-project). + +## Create a GitGuardian API token + +Prerequisites: + +- You must have a GitGuardian account. + +To create an API token: + +1. Sign in to your GitGuardian account. +1. Go to the **API** section in the sidebar. +1. In the API section sidebar go to **Personal access tokens** page. +1. Select **Create token**. The token creation dialog opens. +1. 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. +1. Select **Create token**. +1. 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: + +1. On the left sidebar, select **Search or go to** and find your project or group. +1. Select **Settings > Integrations**. +1. Select **GitGuardian**. +1. In **Enable integration**, select the **Active** checkbox. +1. In **API token**, [paste the token value from GitGuardian](#create-a-gitguardian-api-token). +1. Optional. Select **Test settings**. +1. Select **Save changes**. + +GitLab is now ready to reject commits based on GitGuardian policies. diff --git a/doc/user/project/integrations/index.md b/doc/user/project/integrations/index.md index 225edff81255d336ab6d9dbc0d4a25650f37e162..f30ad4792a28ba1b35bf10be930e26799362ee5b 100644 --- a/doc/user/project/integrations/index.md +++ b/doc/user/project/integrations/index.md @@ -132,6 +132,7 @@ To use custom settings for a project or group integration: | [Emails on push](emails_on_push.md) | Send commits and diffs on push by email. | **{dotted-circle}** No | | [Engineering Workflow Management (EWM)](ewm.md) | Use EWM as an issue tracker. | **{dotted-circle}** No | | [External wiki](../wiki/index.md#link-an-external-wiki) | Link an external wiki. | **{dotted-circle}** No | +| [GitGuardian](git_guardian.md) | Reject commits based on GitGuardian policies. | **{dotted-circle}** No | | [GitHub](github.md) | Receive statuses for commits and pull requests. | **{dotted-circle}** No | | [GitLab for Slack app](gitlab_slack_application.md) | Use the native Slack app to receive notifications and run commands. | **{dotted-circle}** No | | [Google Chat](hangouts_chat.md) | Send notifications from your GitLab project to a room in Google Chat. | **{dotted-circle}** No |