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

Incorrect Start and End Column Values in Gitleaks Report for Findings #1357

Open
dxbluff opened this issue Feb 28, 2024 · 0 comments
Open

Incorrect Start and End Column Values in Gitleaks Report for Findings #1357

dxbluff opened this issue Feb 28, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@dxbluff
Copy link

dxbluff commented Feb 28, 2024

Description:
When Gitleaks generates a report for detected secrets in large one-liner files exceeding 10000 symbols, the start column and end column values are inaccurately calculated. Specifically, in such cases, the start column is reported as 2245, whereas the correct value should be 12245. It appears that the calculation is currently performed using modulo 10,000, resulting in inaccurate start and end column values.

Expected Behavior:
The start column in the Gitleaks report for large one-liner files should accurately reflect the position of the first character of the detected secret. In cases where the line exceeds 10000 symbols, the start column should be calculated correctly, considering the extended length of the line.

Current Behavior:
The start column value in the report does not align with the actual position of the secret in large one-liner files exceeding 10000 symbols, resulting in a discrepancy (e.g., reported start column: 2245, expected start column: 12245).

Steps to Reproduce:

  • Identify a repository with large one-liner files containing secrets exceeding 10000 symbols.
  • Run Gitleaks on the repository.
  • Review the generated report for detected secrets in large one-liner files.
  • Note the start and end columns for findings in files longer than 10000 symbols.

Gitleaks Version: 8.18.2

@dxbluff dxbluff added the bug Something isn't working label Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant