mirror of
https://github.com/Azure/k8s-set-context.git
synced 2026-06-13 23:42:17 +08:00
fix: set kubeconfig file permissions to 600 after creation (#252)
Kubeconfig created by az connectedk8s proxy inherits default permissions, leaving cluster credentials readable by other processes on the runner.
This commit is contained in:
parent
e69c104b14
commit
2dbd35cbdf
@ -36,6 +36,7 @@ export async function runAzKubeconfigCommandBlocking(
|
||||
proc.unref()
|
||||
|
||||
await sleep(AZ_TIMEOUT_SECONDS)
|
||||
fs.chmodSync(kubeconfigPath, 0o600)
|
||||
return fs.readFileSync(kubeconfigPath).toString()
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user