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:
David Gamero 2026-06-04 19:37:03 -04:00 committed by GitHub
parent e69c104b14
commit 2dbd35cbdf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -36,6 +36,7 @@ export async function runAzKubeconfigCommandBlocking(
proc.unref()
await sleep(AZ_TIMEOUT_SECONDS)
fs.chmodSync(kubeconfigPath, 0o600)
return fs.readFileSync(kubeconfigPath).toString()
}