Skip to content

Running gitleaks detect with source returns no leaks #1510

@jbyardi

Description

@jbyardi

Describe the bug
When running the following gitleaks detect --no-git and supplying a source directory the program does not detect any leaks. When I remove source and change the current working directory to what I want to scan, leaks are detected.

You can see in the screenshot the 0 leaks (--source) and 8 leaks found (no --source supplied).

To confirm, does the --source argument allow you to specify a directory or file to scan? Or does it do something else?

To Reproduce
Run: gitleaks detect --source C:\path\to\files --no-git

Expected behavior
When supplying source it should scan the specified files and detect leaks.

Screenshots
image

Basic Info (please complete the following information):

  • OS: Windows 11
  • Gitleaks Version: 8.19.2

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