Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Gitlab provider #1

Merged

Conversation

michieljmmaas
Copy link

I added a Gitlab provider to find Gitlab Secrets.

The regex are sourced from this location: https://github.com/gitlabhq/gitlabhq/blob/master/gems/gitlab-secret_detection/lib/gitleaks.toml#L4-L51

Some things I was not sure about:

  • The Doc of the provider file. Not sure what I should include there.
  • I can extract common parts from the regex and create a method where you can input the variable parts (the prefix and the amount of chars). But I think doing it like this is easier to read.
  • The test only tests for one of the regexes. I can add more, but the Github test also only tests for one regex.

Let me know what I can improve!

Copy link
Contributor

@sebastianfeldmann sebastianfeldmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks

@sebastianfeldmann sebastianfeldmann merged commit 0095032 into captainhookphp:main Nov 26, 2024
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants