doc/user/application_security/secret_detection/exclusions.md
{{< details >}}
{{< /details >}}
{{< history >}}
secret_detection_project_level_exclusions. Enabled by default.secret_detection_project_level_exclusions removed in GitLab 17.7.{{< /history >}}
Secret detection may detect something that's not actually a secret. For example, if you use a fake value as a placeholder in your code, it might be detected and possibly blocked.
To avoid false positives and optimize performance, you can exclude from secret detection:
You can define multiple exclusions for a project.
The following restrictions apply:
<i class="fa-youtube-play" aria-hidden="true"></i> For an overview, see secret detection exclusions - demo.
<!-- Video published on 2024-10-12 -->Define an exclusion to avoid false positives from secret detection.
Prerequisites:
To define an exclusion:
Path exclusions support glob patterns which are supported and interpreted with the Ruby method
File.fnmatch
with the flags
File::FNM_PATHNAME | File::FNM_DOTMATCH | File::FNM_EXTGLOB.
Rule exclusions support any of the IDs listed in the default ruleset. For example,
gitlab_personal_access_token is the rule ID for GitLab personal access tokens.