trufflehog icon indicating copy to clipboard operation
trufflehog copied to clipboard

Add `--exclude-paths` flag to github module

Open bugbaba opened this issue 2 years ago • 3 comments

Hi :)

Is your feature request related to a problem? Please describe. Files like yarn.lock, package-lock.json, etc are only used to keep track of dependencies of a project. They are getting matched as finding by signable.go regex for example in this below case -explode-assignable-expression-7 was matched by the regex in yarn.lock file.

Screenshot_2022-04-17_15-32-17

image

Describe the solution you'd like Add --exclude-paths flag to github module. Currently its available for git module only. So that users can exclude files/directories manually as per their use case this will help in reducing the false positive cases and the time taken to scan the repository.

Describe alternatives you've considered Using the --only-verified flag can be used to stop this from showing as finding as the match won't work against the API. But this isn't an efficient/best way to solve this issue in my opinion. --exclude-paths flag is more practical specially when the user knows these files need to ignored.

bugbaba avatar Apr 17 '22 10:04 bugbaba

I would also like a way to exclude paths when using the Github Action, specifically when testing locally with https://github.com/nektos/act. It would be extra convenient if it could respect my gitignore.

cdavie-weconnect avatar Apr 23 '22 00:04 cdavie-weconnect

I like the .<app>ignore approach. For example, a .thignore file could be more helpful once you can exclude paths by repo and you wouldn't need to create long command lines.

manoelhc avatar Jun 23 '22 18:06 manoelhc

I'd like to have a similar function when scanning the entire org but exclude several repos, because there're some forked open-source projects that will generate tons of unverified results, e.g., JDBC url in test cases( jdbc:postgresql://localhost:5432/****)

danielfree avatar Oct 07 '22 02:10 danielfree

closing this as it looks like a fix for this was merged in on Feb 9.

ahrav avatar Apr 11 '23 02:04 ahrav