getsops / sops

Simple and flexible tool for managing secrets
https://getsops.io/
Mozilla Public License 2.0
16.17k stars 854 forks source link

path_regex doesn't normalize paths with filepath.ToSlash #1036

Open tw1nk opened 2 years ago

tw1nk commented 2 years ago

Currently to support path_regexes that should work on windows and other systems you need to manually handle the different separators with (/|\\) like this.

- path_regex: staging(/|\\).*\.secret\.(yaml|json)$
  gcp_kms: projects/.../sops-key-staging

This is a bit cumbersome and a bit error prone to use and would be nicer if we could just use slashes like this:

- path_regex: staging/.*\.secret\.(yaml|json)$
  gcp_kms: projects/.../sops-key-staging
anperez-mms commented 9 months ago

Is it possible to add a note in the README file to help Windows users to understand why path_regex is not working as expected?