yor icon indicating copy to clipboard operation
yor copied to clipboard

Custom tag group directory filter - support wildcards

Open nimrodkor opened this issue 2 years ago • 3 comments

Is your feature request related to a problem? Please describe. When using the custom tag group with directory filter, today it supports exact prefix - i.e. path/to/dir-tree. I'd like to be able to tag with a specific tag all the directories which match a specific regex / joker. Example - tag everyhing that's in a directory named infra/networkign as Component: Networking.

Describe the solution you'd like Extending the existing HasPrefix to support regex correctly. https://github.com/bridgecrewio/yor/blob/389382c952147a12c8e0f825334b6c1096837996/src/common/tagging/external/tag_group.go#L92

Describe alternatives you've considered Writing out all the possibilities is time consuming and not scalable.

nimrodkor avatar Oct 12 '21 08:10 nimrodkor

Can I work on this issue?

ghost avatar Oct 12 '21 14:10 ghost

For sure @AsianCat54x !

nimrodkor avatar Oct 12 '21 16:10 nimrodkor

Thanks ;)

ghost avatar Oct 12 '21 16:10 ghost

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Feb 05 '23 19:02 stale[bot]