Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the kube-bench 1.4.1 to enhance security #9987

Closed
wants to merge 1 commit into from

Conversation

yankay
Copy link
Member

@yankay yankay commented Apr 14, 2023

What type of PR is this?

/kind feature

What this PR does / why we need it:

Fix kube-bench check Fail 1.4.1 by disable the profiling.
Ref to https://github.com/aquasecurity/kube-bench/blob/main/cfg/cis-1.24/master.yaml#L919

Which issue(s) this PR fixes:

Fixes #9933

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Fix kube-bench 1.4.1 to enhance security (Ensure that the --profiling argument is set to false (Automated))

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 14, 2023
@k8s-ci-robot k8s-ci-robot requested review from bozzo and holmsten April 14, 2023 09:32
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: yankay

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 14, 2023
@mzaian
Copy link
Contributor

mzaian commented Apr 14, 2023

Hi @yankay

I think the default is false anyway so maybe no need to configure it.

@oomichi
Copy link
Contributor

oomichi commented Apr 17, 2023

as #9986 (comment) this additional configuration also is written on https://github.com/kubernetes-sigs/kubespray/blob/master/docs/hardening.md
I feel it is fine to have that is a separeted configuration as is.

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 17, 2023
@yankay
Copy link
Member Author

yankay commented Apr 17, 2023

Hi @yankay

I think the default is false anyway so maybe no need to configure it.

HI @mzaian

I checked the default value the profile, and it's true.

[root@kay181 kubernetes]# nerdctl exec -it 7570a7b4a38d kube-scheduler --help
...
--profiling                                         DEPRECATED: enable profiling via web interface host:port/debug/pprof/. This parameter is ignored if a config file is specified in --config. (default true)

@mzaian
Copy link
Contributor

mzaian commented Apr 17, 2023

@yankay Worth mentioning that we discussed it here as well #9824

@yankay
Copy link
Member Author

yankay commented Apr 17, 2023

@yankay Worth mentioning that we discussed it here as well #9824
HI @mzaian

I got it, it kube-profile is only worked on the api-server and ccm, but not the scheduler
https://github.com/kubernetes-sigs/kubespray/blob/master/roles/kubernetes/control-plane/templates/kubeadm-config.v1beta3.yaml.j2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kube-bench some checks FAIL
4 participants