Skip to content

Normalize line-endings #1641

@rgmz

Description

@rgmz

When gitleaks is run in git mode, I think it would see the unix-style line endings of the file as it is stored in git. When gitleaks is instead run in dir mode, it would see the local line endings, e.g. \r\n on windows.

Not sure if this is actually how it works, but if so, it might make sense to normalize line endings in gitleaks before executing the regex, to avoid such surprises?

Originally posted by @Ben-grmbl in #1637 (comment)

Related: #1565

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions