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

gke/ERR/2021_001 & gke/ERR/2021_002 are using old recommendations #102

Open
m3adow opened this issue Nov 14, 2024 · 1 comment · May be fixed by #105
Open

gke/ERR/2021_001 & gke/ERR/2021_002 are using old recommendations #102

m3adow opened this issue Nov 14, 2024 · 1 comment · May be fixed by #105

Comments

@m3adow
Copy link
Contributor

m3adow commented Nov 14, 2024

gke/ERR/2021_001 is checking if GKE node service accounts have a role binding for roles/logging.logWriter, gke/ERR/2021_002 is doing the same for roles/monitoring.metricWriter. The referenced hardening guide used the roles/container.defaultNodeServiceAccount role which is sufficient.

In my opinion the rules should either check for the specific permissions or they should be consolidated into one rule checking for the permissions of the roles/container.defaultNodeServiceAccount role.

I would be willing to work on the changes, just need a hint which direction to go.

@ebenezergraham
Copy link
Collaborator

Thank you for highlighting this enhancement. Please implement a new rule to merge gke/ERR/2021_001 & gke/ERR/2021_002 we can deprecate gke/ERR/2021_001 & gke/ERR/2021_002 in later releases if required.

The new rule should verify that the GKE node's service account possesses permissions present in roles/container.defaultNodeServiceAccount

This approach should cover cases where service has roles such as roles/logging.logWriter, roles/monitoring.metricWriter, roles/container.defaultNodeServiceAccount, custom roles etc with equivalent recommended permissions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants