From 7ec17b2b4d836b182e37fe31282df62a644fcd46 Mon Sep 17 00:00:00 2001 From: Max Erenberg <> Date: Sun, 2 Jan 2022 18:49:11 -0500 Subject: [PATCH] chmod 600 the kubeconfig --- ceo/cli/k8s.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ceo/cli/k8s.py b/ceo/cli/k8s.py index 6094e4e..3594a21 100644 --- a/ceo/cli/k8s.py +++ b/ceo/cli/k8s.py @@ -31,6 +31,7 @@ def activate(): os.rename(kubeconfig, kubeconfig_bak) with open(kubeconfig, 'w') as fo: fo.write(result['kubeconfig']) + os.chmod(kubeconfig, 0o600) except Exception: click.echo(traceback.format_exc()) click.echo("We weren't able to write the kubeconfig file, so here it is.")