Skip to content

Allow Keyword match with filename for custom detectors #3954

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

Open
vexvec opened this issue Mar 5, 2025 · 1 comment
Open

Allow Keyword match with filename for custom detectors #3954

vexvec opened this issue Mar 5, 2025 · 1 comment
Labels
enhancement pkg/sources PRs and Issues related to the `sources` package

Comments

@vexvec
Copy link

vexvec commented Mar 5, 2025

Description

Currently a custom detector needs at least 1 keyword defined. The detector is only executed if the keyword appears in the text. This is usually enough for most cases.
For custom detectors it would be a benefit if the detector would be executed if the keyword appears in the filename (full path) to make it possible to detect secrets that use a complete file and where there is no uniq keyword within the text that can be used to identify it.

Preferred Solution

Introduce an additional config option (keyword_in_filename) for custom detectors to enable that keywords are also checked against the filename.

Additional Context

References

@kashifkhan0771
Copy link
Contributor

I discussed this with the team internally, and we agree it's an interesting feature to implement. We'll consider it for the future potentially not just for custom detector, but for all detectors.

@kashifkhan0771 kashifkhan0771 added the pkg/sources PRs and Issues related to the `sources` package label Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement pkg/sources PRs and Issues related to the `sources` package
Projects
None yet
Development

No branches or pull requests

2 participants