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

Enhance gitleaks:allow to be usable outside the same line #1397

Open
AnselmD opened this issue Apr 26, 2024 · 0 comments
Open

Enhance gitleaks:allow to be usable outside the same line #1397

AnselmD opened this issue Apr 26, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@AnselmD
Copy link

AnselmD commented Apr 26, 2024

Is your feature request related to a problem? Please describe.
In some "languages" only allows complete comment lines but they do not allow to add comments to the same line as a statement. e.g. key=value in java .properties files.
Or in multi line shell script statements. Between the lines it is not possible (without tricks) to place a comment with gitleaks:allow Example:
echo 1 &&
echo 2 &&
echo "detected secret" &&
echo 4

Describe the solution you'd like
Enhance gitleaks:allow so that it is also usable before or after the line with the secret.
e.g:
gitleaks:allow_next_line
or better:
gitleaks:allow_line:+1 (the leak to allow is 1 lines beyond it; so in the next line)
gitleaks:allow_line:+3 (the leak to allow is 3 lines beyond it)
gitleaks:allow_line:-3 (the leak to allow is 3 lines before it)

Describe alternatives you've considered
Putting fingerprint to .gitleakignore

cc @zricethezav

@AnselmD AnselmD added the enhancement New feature or request label Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant