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 Gitleaks for secret scanning #1951

Merged
merged 8 commits into from
Sep 27, 2021

Conversation

massongit
Copy link
Contributor

@massongit massongit commented Sep 9, 2021

Fixes #1856

Proposed Changes

Gitleaks is a SAST tool for detecting hardcoded secrets.
We can notice the committed credentials by adding them as CI.

Readiness Checklist

Author/Contributor

  • If documentation is needed for this change, has that been included in this pull request

Reviewing Maintainer

  • Label as breaking if this is a large fundamental change
  • Label as either automation, bug, documentation, enhancement, infrastructure, or performance

@JonZeolla
Copy link
Contributor

Can you comment as to why secretlint was preferred over some of the alternatives? Personally, I am a fan of https://github.com/zricethezav/gitleaks

@admiralAwkbar
Copy link
Collaborator

@massongit @JonZeolla
Hey, this is great. Im not too picky on what tool we use... from a quick look, it seems gitleaks has a much larger following and secretlint

Both do seem to allow us to follow our standard of linting a single file at a time.
Both do offer configuration which is a needed ability in this tool.

Can you guys come to a consensus on which tool we should adopt?

@massongit massongit changed the title Add actionlint Add secretlint Sep 10, 2021
@massongit
Copy link
Contributor Author

Thank you for your propose!
I didn't know about gitleaks. However, as far as I read it's README, it seems that it is more versatile than secretlint.

@massongit
Copy link
Contributor Author

I think it might be a good idea to use gitleaks instead of secretlint.

@admiralAwkbar
Copy link
Collaborator

@massongit @JonZeolla Awesome guys, we can take this current PR and I can help catch the edges that are missed :)

@admiralAwkbar admiralAwkbar self-assigned this Sep 10, 2021
@admiralAwkbar admiralAwkbar added docker Pull requests that update Docker code documentation Improvements or additions to documentation enhancement New feature or request labels Sep 10, 2021
@admiralAwkbar admiralAwkbar changed the title Add secretlint Add gitleaks for secret scanning Sep 10, 2021
@JonZeolla
Copy link
Contributor

One thing to keep in mind is any of these tools can be really noisy and generate false positives. I suggest including a minimal, high fidelity configuration to start. I do a lot of tuning of these kind of tools in my day job so I'm happy to review/contribute to that part

@admiralAwkbar
Copy link
Collaborator

@massongit @JonZeolla Any help with the .gitleaks.toml file is much appreciated

I think I got most of it done

now for testing

@massongit massongit changed the title Add gitleaks for secret scanning Add Gitleaks for secret scanning Sep 25, 2021
@massongit
Copy link
Contributor Author

I removed secretlint related code.

@massongit
Copy link
Contributor Author

@admiralAwkbar

Any help with the .gitleaks.toml file is much appreciated

How about applying the default configuration ( https://github.com/zricethezav/gitleaks/blob/master/config/gitleaks.toml ) ?

@admiralAwkbar admiralAwkbar merged commit 0e1a1e5 into super-linter:master Sep 27, 2021
@massongit massongit deleted the add_secretlint branch September 27, 2021 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker Pull requests that update Docker code documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add secretlint
3 participants