From c269ad26e8679635959ff6b81b0c031cddd0428f Mon Sep 17 00:00:00 2001 From: Tycho Andersen Date: Wed, 28 Jun 2017 15:22:04 -0600 Subject: [PATCH] login: print a big warning when using --password Task command lines are world readable via /proc/pid/cmdline, so this isn't safe. Signed-off-by: Tycho Andersen --- cli/command/registry/login.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cli/command/registry/login.go b/cli/command/registry/login.go index ba1b133054..c919e88d97 100644 --- a/cli/command/registry/login.go +++ b/cli/command/registry/login.go @@ -47,6 +47,10 @@ func runLogin(dockerCli command.Cli, opts loginOptions) error { ctx := context.Background() clnt := dockerCli.Client() + if opts.password != "" { + fmt.Fprintln(dockerCli.Err(), "WARNING! Using --password via the CLI is insecure.") + } + var ( serverAddress string authServer = command.ElectAuthServer(ctx, dockerCli)