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

Files that are encrypted and were read by the binary store should not use encryption configuration settings #1822

Open
felixfontein opened this issue Mar 30, 2025 · 0 comments

Comments

@felixfontein
Copy link
Contributor

If settings like encrypted_regex, unencrypted_regex, encrypted_suffix, unencrypted_suffix, encrypted_comment_regex, unencrypted_comment_regex are used, files read with the binary store often end up unencrypted. This is likely the cause for the observations in #1818 and #1805.

I think we should either:

  • simply ignore these settings when encrypting a file that was read with the binary store;
  • or maybe warn in that case, with either encrypting with or without these settings;
  • or fail encryption if these settings prevent encryption of the data key.

What do you think @getsops/maintainers? Simply acting as now and not encrypting the data key (and thus not encrypting anything!) is surely a bad idea.

This could also be generalized to encryption in general: if you try to encrypt a file and nothing is actually encrypted, print a warning. This might be intentional in some special cases, but more often is likely a mistake. Maybe allow to disable the warning via a command line option for the cases where it is intentional and a warning is not wanted by the user.

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

No branches or pull requests

1 participant