joker1007 / yaml_vault

Yaml file encryption/decryption helper.
MIT License
158 stars 20 forks source link

Added suffix and prefix support #18

Closed liiri closed 3 years ago

liiri commented 3 years ago

Motivation: I want to know if a specific value in a given yaml file is already encrypted or no. If I encrypt values such as base64 tokens or passwords (that are indeed secrets), I get an output that "looks the same". The suffix and prefix allow the user to decorate the encrypted value with some indication of being encrypted. Specifically, our organization uses a product to detect exposed secrets in the code base. It'd know to ignore values that are decorated with for example ENC(...), but some random looking base64 string is more suspicious.

sorry I'm not really a Ruby programmer, so feel free to fix any syntax or code styling

joker1007 commented 3 years ago

Thank you for your patch! And I have one question. Why do you want to add this feature? If you have any use-cases, would you tell me about them?

liiri commented 3 years ago

Thank you for your patch! And I have one question. Why do you want to add this feature? If you have any use-cases, would you tell me about them?

Hi, indeed, updating use case in the PR comment :)

joker1007 commented 3 years ago

Thanks. I understand your intention.

Sorry, I commented on one more point that I'd like you to fix.