From 74469c8aa226d695303f14fc4fa9a71051e45436 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 23 Aug 2026 13:19:02 +0200 Subject: [PATCH] Add --(un)encrypted-comment-regex options to 'sops encrypt'. Signed-off-by: Felix Fontein --- cmd/sops/main.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmd/sops/main.go b/cmd/sops/main.go index e590e1c82..8092a3f40 100644 --- a/cmd/sops/main.go +++ b/cmd/sops/main.go @@ -994,6 +994,14 @@ func main() { Name: "encrypted-regex", Usage: "set the encrypted key regex. When specified, only keys matching the regex will be encrypted.", }, + cli.StringFlag{ + Name: "unencrypted-comment-regex", + Usage: "set the unencrypted comment suffix. When specified, only keys that have comment matching the regex will be left unencrypted.", + }, + cli.StringFlag{ + Name: "encrypted-comment-regex", + Usage: "set the encrypted comment suffix. When specified, only keys that have comment matching the regex will be encrypted.", + }, cli.StringFlag{ Name: "encryption-context", Usage: "comma separated list of KMS encryption context key:value pairs",