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

CIS 4.01: Ensure that instances are not configured to use the default… #244

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

charliewolf
Copy link
Contributor

… service account with full access to all Cloud APIs

… service account with full access to all Cloud APIs

scope == "https://www.googleapis.com/auth/cloud-platform"

message := sprintf("Instance %v has default service account with full access to all Cloud APIs.", [asset.name])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this block only checks scope but not service account

Suggest to add re_match("-compute@developer.gserviceaccount.com$", service_account.email) to check for default compute engine service account

If we use custom service account, scope will always be full scope, which is actually recommended: https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances#best_practices

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the recommendation! @charliewolf what do you think about this strategy?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joecheuk So in my test CAI data i was not seeing service accounts with names like that. @katze120 Do you have an example asset JSON you could share?

@dekuhn dekuhn requested review from gkowalski-google and removed request for joecheuk February 19, 2020 19:24
@dekuhn
Copy link
Contributor

dekuhn commented Feb 24, 2020

@katze120 or @gkowalski-google can you help with data needed by Charlie base on the code review feedback.

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

Successfully merging this pull request may close these issues.

None yet

5 participants