Skip to content

Git files not discovered when scanning in a sub folder #280

Open

Description

@mark-buck-vpsgroup

If I run a command like this I find a bunch of secrets in a git repo based solution no problem:

detect-secrets -C "C:\Source\Solution1" scan

If I run the following I don't see the same secrets found in this sub-folder:

detect-secrets -C "C:\Source\Solution1\Project1\Pages" scan

If I add --all-files I then see the secrets found

It seems as though the tool only utilises the git folders when ran against the location where the .git folder exists, is it possible for the tool to be updated to support recursively going up the directory tree to find the git repo folder and use it for the content in the sub-folder being run against.

For now I am running using --all-files along with a bunch of file exclusions to ignore content I am not interested in which is not ideal, especially given how normal git tooling handles sub folder based actions.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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