gitleaks / gitleaks

Protect and discover secrets using Gitleaks 🔑

Home Page:https://gitleaks.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple example needed on how to ignore or whitelist a directory

huornlmj opened this issue · comments

I've spent around 30 mins reading and searching on how to ignore s /tests/ directory and I have failed. Can someone share info on how this is done?

Same. It seems the example ignore file lists out each file individually.

I've spent way too long on this. The documentation is confusing, where the allowlist is used to ignore paths/regexes.

I have the following in gitleaks.toml:

[allowlist]
paths = [
  '''bin/'''
]

And then you have to directly pass the gitleaks.toml file gitleaks detect like so:

gitleaks detect --config /path/to/gitleaks.toml