Skip to content

Conversation

@swastik959
Copy link
Contributor

Description:

Check: 4.2.4 Verify that if defined, the --read-only-port argument is set to 0 (Automated)

The former audit returned too much data, which was subsequently truncated by kube-bench, causing the check to fail consistently. This fix improves the audit for --read-only-port discovery by limiting the returned data, piping the initial command to grep with -o, --only-matching.

Parent issue:
rancher/compliance-operator#123

Fixed versions:

k3s-cis-1.11
k3s-cis-1.10
k3s-cis-1.9

Expected behaviour: By default, K3s sets the --read-only-port to 0 (which disables the read only kubelet API traditionally served on port 10255, preventing unauthenticated access to potentially sensitive cluster information).

@swastik959 swastik959 requested a review from a team as a code owner November 28, 2025 12:27
…turned data

The former audit returned too much data, which was subsequently truncated by kube-bench, causing the check to fail consistently.

Signed-off-by: Andy Pitcher <[email protected]>
@swastik959 swastik959 merged commit d30a507 into rancher:release/v0.7 Dec 2, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants