Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom pattern does not apply for filename #424

Closed
perryzjc opened this issue Mar 10, 2023 · 2 comments
Closed

Custom pattern does not apply for filename #424

perryzjc opened this issue Mar 10, 2023 · 2 comments

Comments

@perryzjc
Copy link

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):

  • OS: macOS Big Sur v11.1
  • Browser: chrome
@tinamthomas tinamthomas self-assigned this Mar 14, 2023
@tinamthomas
Copy link
Collaborator

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)

@tinamthomas tinamthomas removed their assignment May 30, 2023
@tw-owen-nelson
Copy link
Collaborator

Custom patterns apply specifically to file content. To configure talisman to ignore multiple files that it would normally mark as having suspicious filenames, add a fileignoreconfig that ignores the filename detector for all files matching your desired pattern.

For example, to allow all files ending in .env to be checked in despite having a 'suspicious' name, you could use the following .talismanrc:

fileignoreconfig:
- filename: *.env
  ignore_detectors: [filename]

Talisman would still scan the content of any files with names matching *.env for potential secrets, but it wouldn't flag the file based on just the filename.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants