Skip to content

Gitleaks can't handle files with CRLF terminated lines #762

@mickutz

Description

@mickutz

Describe the bug
When scanning files with CRLF terminated lines gitleaks will not detect secrets.

To Reproduce

  • Create a new file and add a secret to it. Check that end of line sequence is set to LF first. In VSCode it's indicated in the bottom bar on the right hand side.
    Running a scan will detect the secret.
  • Change end of line sequence to CRLF and save the file.
    Running a scan now will not return any wanings.

Expected behavior
Gitleaks should return warnings for files with CRLF.

Basic Info (please complete the following information):

  • OS: Ubuntu 21.10
  • Gitleaks Version: v8.2.5

cc @zricethezav

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions