gitleaks / gitleaks

Protect and discover secrets using Gitleaks 🔑

Home Page:https://gitleaks.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gitleaks not finding my secrets in JSON file

Xiedzz opened this issue · comments

Describe the bug
Gitleaks does not find these secrets in a JSON file

To Reproduce
Steps to reproduce the behavior:

Expected behavior
I run gitleaks as a stage Gitlab pipeline and I m expecting to find the secrets in my JSON file example from below.

Screenshots
If applicable, add screenshots to help explain your problem.

Basic Info (please complete the following information):

  • Gitleaks GitLab Pipeline Stage
  • Gitleaks Version: 8.18.1

Additional context
I want gitleaks to find in this JSON file:

{
"key": "username",
"value": "my.name@mail.com",
"type": "string"
},
{
"key": "password",
"value": "9@tm!(B/2H_PRNz?4{/@",
"type": "string"
}

{
"key": "Authorization",
"value": "Basic ORtGaMpAYuJCcHQxcFc6RUpGUYRARmdKRUFPZTRZZUI6SZNHUzWvW39acW5ac2ckeB==",
"type": "text"
}

These 2 values:
"value": "9@tm!(B/2H_PRNz?4{/@"
and
"value": "Basic ORtGaMpAYuJCcHQxcFc6RUpGUYRARmdKRUFPZTRZZUI6SZNHUzWvW39acW5ac2ckeB=="

Thank you. I m waiting for your feedback.
Best Regards.
cc @zricethezav

I fixed this with creating a custom rule for gitleaks.