From b4d395cec9247e35c8bb67cf7d247add486c9bb5 Mon Sep 17 00:00:00 2001 From: Justin Dell Date: Mon, 4 Nov 2024 09:46:45 -0600 Subject: [PATCH] shell escape account name in cli command --- lib/kamal/secrets/adapters/aws_secrets_manager.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/kamal/secrets/adapters/aws_secrets_manager.rb b/lib/kamal/secrets/adapters/aws_secrets_manager.rb index 1da48b94c..e23ea1f1e 100644 --- a/lib/kamal/secrets/adapters/aws_secrets_manager.rb +++ b/lib/kamal/secrets/adapters/aws_secrets_manager.rb @@ -18,7 +18,7 @@ def fetch_secrets(secrets, account:, session:) end def get_from_secrets_manager(secrets, account:) - `aws secretsmanager batch-get-secret-value --secret-id-list #{secrets.map(&:shellescape).join(" ")} --profile #{account}`.tap do + `aws secretsmanager batch-get-secret-value --secret-id-list #{secrets.map(&:shellescape).join(" ")} --profile #{account.shellescape}`.tap do raise RuntimeError, "Could not read #{secret} from AWS Secrets Manager" unless $?.success? end end