thoughtworks / talisman

Using a pre-commit hook, Talisman validates the outgoing changeset for things that look suspicious — such as tokens, passwords, and private keys.
https://thoughtworks.github.io/talisman/
MIT License
1.9k stars 243 forks source link

Custom pattern does not apply for filename #424

Open perryzjc opened 1 year ago

perryzjc commented 1 year ago

Describe the bug The custom pattern can work for the file content but not for the file name. It appears that this app is able to detect filenames, such as danger.pem. The example is here

Expected behavior The custom pattern should also apply to the filename.

Desktop (please complete the following information):

tinamthomas commented 1 year ago

I'm curious to know more about the custom patterns you were looking for the file name to ignore. Do you have a few examples?

Are those file names very specific to your project, or are they more generic files names that could apply to other projects (and might make sense to add to the ruleset that the filenamedetector currently looks at)