From 04d0c72c32bc42ca2b608a7d0df295ca0c4f1ec1 Mon Sep 17 00:00:00 2001 From: Grace Nguyen <42276283+gracenng@users.noreply.github.com> Date: Sun, 20 Jun 2021 10:12:51 -0400 Subject: [PATCH] Kube config warnings for code execution (#28248) * Update configure-access-multiple-clusters.md * Rewording kubeconfig warning * Tabitha's suggestion Co-authored-by: Tabitha Sable <51767484+tabbysable@users.noreply.github.com> * Re-order sentences * Copy update Co-authored-by: Tabitha Sable <51767484+tabbysable@users.noreply.github.com> --- .../configuration/organize-cluster-access-kubeconfig.md | 6 +++++- .../configure-access-multiple-clusters.md | 7 +++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/content/en/docs/concepts/configuration/organize-cluster-access-kubeconfig.md b/content/en/docs/concepts/configuration/organize-cluster-access-kubeconfig.md index df767bbc3e..b27fcdee61 100644 --- a/content/en/docs/concepts/configuration/organize-cluster-access-kubeconfig.md +++ b/content/en/docs/concepts/configuration/organize-cluster-access-kubeconfig.md @@ -17,6 +17,11 @@ a *kubeconfig file*. This is a generic way of referring to configuration files. It does not mean that there is a file named `kubeconfig`. {{< /note >}} +{{< warning >}} +Only use kubeconfig files from trusted sources. Using a specially-crafted kubeconfig file could result in malicious code execution or file exposure. +If you must use an untrusted kubeconfig file, inspect it carefully first, much as you would a shell script. +{{< /warning>}} + By default, `kubectl` looks for a file named `config` in the `$HOME/.kube` directory. You can specify other kubeconfig files by setting the `KUBECONFIG` environment variable or by setting the @@ -154,4 +159,3 @@ are stored absolutely. - diff --git a/content/en/docs/tasks/access-application-cluster/configure-access-multiple-clusters.md b/content/en/docs/tasks/access-application-cluster/configure-access-multiple-clusters.md index 62c0a3f24c..8b79d7042f 100644 --- a/content/en/docs/tasks/access-application-cluster/configure-access-multiple-clusters.md +++ b/content/en/docs/tasks/access-application-cluster/configure-access-multiple-clusters.md @@ -20,6 +20,13 @@ a *kubeconfig file*. This is a generic way of referring to configuration files. It does not mean that there is a file named `kubeconfig`. {{< /note >}} + +{{< warning >}} +Only use kubeconfig files from trusted sources. Using a specially-crafted kubeconfig file could result in malicious code execution or file exposure. +If you must use an untrusted kubeconfig file, inspect it carefully first, much as you would a shell script. +{{< /warning>}} + + ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}}