feat: detect GitLab tokens and Azure client secrets#37
Open
jesse-quinn wants to merge 1 commit into
Open
Conversation
Adds two built-in detection rules: - gitlab-token: GitLab personal access, deploy, runner, pipeline trigger, feed, and service account tokens (glpat-/gldt-/glrt-/ glptt-/glft-/glsoat- prefixes), including the newer routable token format with dot-separated segments. - azure-client-secret: Microsoft Entra ID (Azure AD) application client secrets, keyed on the distinctive "<3 chars><digit>Q~" shape with a 31-34 char tail, using lookarounds since the charset includes non-word characters. GitHub fine-grained PATs (github_pat_) were already covered by the existing github-token rule; this adds test coverage for them and documents them in the README.
jesse-quinn
force-pushed
the
feat/gitlab-azure-token-rules
branch
from
July 20, 2026 23:48
273715d to
3af8bed
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds two new built-in detection rules and closes a test/docs gap on GitHub fine-grained PATs:
gitlab-tokenβ GitLab personal access, deploy, runner, pipeline trigger, feed, and service account tokens (glpat-/gldt-/glrt-/glptt-/glft-/glsoat-prefixes), including the newer routable token format with dot-separated segments.azure-client-secretβ Microsoft Entra ID (Azure AD) application client secrets, keyed on the distinctive<3 chars><digit>Q~shape with a 31β34 char tail. Uses lookarounds instead of\bbecause the secret charset includes~,., and-.github_pat_) were already matched by the existinggithub-tokenrule but had no test coverage or README mention β both added.Details
severity: critical,category: secret,token-replaceredaction, matching the conventions of neighboring rules.dist/rebuilt and committed per the CONTRIBUTING.md requirement.Testing
npm testβ 178 tests pass, including new positive/negative cases for all three token families.