You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CKS: private registry credentials are written to the node logs, and special characters break node setup #14917
When a CKS cluster is created with a private registry (dockerregistryurl, dockerregistryusername, dockerregistrypassword):
Every worker and control node runs /opt/bin/setup-containerd from its cloud-config as bash -x /opt/bin/setup-containerd. The trace prints each line of the script with its values filled in, so the
registry user name and password (in plain text, and as the base64 auth string) are written to /var/log/cloud-init-output.log on every node.
The registry URL, user name and password are put into the cloud-config by plain text substitution. A double quote,
backslash, $ or newline in them breaks the generated script or the YAML. The control node template is rendered
by cloud-init as a Jinja template, so {{, {% or {# in any of these values makes the rendering fail; cloud-init
then drops the whole cloud-config and the control node is never set up.
/opt/bin/setup-containerd is also mode 0755, and the containerd config it writes the credentials into is 0644.
Steps to reproduce
Create a CKS cluster with a private registry.
On a worker node, sudo grep -c auth /var/log/cloud-init-output.log finds the traced lines with the base64 auth
string (username/password in plain text on 4.22).
With {{ in the password, the control node does not come up.
Expected
No registry credential in the node logs or in files other users can read, and any character in the registry values
gets to containerd unchanged.
threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.
What happened
The threat detection engine failed to produce results.
When a CKS cluster is created with a private registry, the node setup script runs under bash -x, so the registry user name, password and base64 auth string are written to /var/log/cloud-init-output.log on every node. The same values are substituted as plain text into cloud-config, so quotes, backslashes, $, newlines or Jinja markers in them break node setup. The containerd config that holds the credentials is also world-readable. Open PR #14918 is linked.
Security handling: this report describes credential exposure in node logs and file permissions. SECURITY.md asks that suspected vulnerabilities be reported privately to security@apache.org and not in public issues. Maintainers should decide whether this report stays public and whether type:security applies.
📊 Assessment
Dimension
Value
Reasoning
Type
type:security
Registry credentials are logged and stored with loose permissions
Component
component:cks
Node bootstrap and cloud-config rendering
Severity
n/a
Not assessed here; depends on the security review above
Labels
type:security, component:cks
Based on the issue text
Coding agent
Needs more info
Fix touches credential handling and templating; a security review should confirm the change before it is written
Activity
github-actions commentedon Dec 3, 2026
Warning
threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.
What happened
The threat detection engine failed to produce results.
Review the workflow run logs for details.
🎯 Triage report
When a CKS cluster is created with a private registry, the node setup script runs under
bash -x, so the registry user name, password and base64 auth string are written to/var/log/cloud-init-output.logon every node. The same values are substituted as plain text into cloud-config, so quotes, backslashes,$, newlines or Jinja markers in them break node setup. The containerd config that holds the credentials is also world-readable. Open PR #14918 is linked.Security handling: this report describes credential exposure in node logs and file permissions.
SECURITY.mdasks that suspected vulnerabilities be reported privately to security@apache.org and not in public issues. Maintainers should decide whether this report stays public and whethertype:securityapplies.📊 Assessment
🔗 Similar issues
💡 Notes and suggestions
/var/log/cloud-init-output.logon a node for the registry's auth string.{{in the password shows the cloud-config is dropped. Test this case in the fix.Add this agentic workflow to your repo
To install this agentic workflow, run