doc/user/application_security/secret_detection/client/_index.md
{{< details >}}
{{< /details >}}
{{< history >}}
{{< /history >}}
When you create an issue, add a description to a merge request, or write a comment, you might accidentally post a secret. For example, you might paste in the details of an API request or an environment variable that contains an authentication token. If a secret is leaked, an adversary can use it to impersonate a legitimate user.
Client-side secret detection helps minimize the risk of accidental secret exposure. When you edit a description, or comment in an issue or merge request, GitLab automatically scans the content for secrets.
Client-side secret detection operates entirely within your browser using pattern matching. This approach ensures that:
Client-side secret detection is enabled by default for all GitLab tiers. No setup or configuration is required.
To test this feature:
glpat-xxxxxxxxxxxxxxxxxxxxAlways use placeholder values when you test to avoid exposing real secrets.
Client-side secret detection analyzes the following content:
For detailed information about the specific types of secrets detected, see the Detected secrets documentation.
When client-side secret detection identifies a potential secret, GitLab displays a warning that highlights the detected secret. You can either:
The detection occurs entirely in your browser. No information is transmitted unless you select Add.
To maximize the effectiveness of client-side secret detection:
[REDACTED] or <API_KEY>.