Skip to content

** doesn't match as expected #59

@EugZol

Description

@EugZol

Instead of matching recursively, unless it's used at the end of the string, ** in config matches just single directory.

trufflehog_test % tree -a
.
├── .trufflehog3.yml
└── outer
    └── inner
        └── deeper
            └── test-dev.yml

4 directories, 2 files
trufflehog_test % cat outer/inner/deeper/test-dev.yml 
-----BEGIN DSA PRIVATE KEY-----
trufflehog_test % cat .trufflehog3.yml 
exclude:
  - message: yml
    paths:
      - 'outer/**/*.yml'

Result:

trufflehog_test % trufflehog3
outer/inner/deeper/test-dev.yml
HIGH    Private Key
1  -----BEGIN DSA PRIVATE KEY-----

Expected: no output

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions