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: enrichment for kind and minikube #3598

Merged
merged 1 commit into from Oct 29, 2023

Conversation

josedonizetti
Copy link
Collaborator

@josedonizetti josedonizetti commented Oct 22, 2023

fix #3593

The PR #3325 introduced an optimization to avoid querying CRI on short live cgroups, this works well for all bigger gke platforms I tested (aws, azure, gke, digital ocean), but it doesn't work for minikube/kind, because the cgroup path is not accessible to a container https://github.com/aquasecurity/tracee/blob/main/pkg/containers/containers.go#L365-L374

As this is a special case for development tools only, I did a hack to not validate this whenever it is running on minikube or kind, so enrichment works.

The PR uses the downward API to know the name of the node, if the name of the node is either minikube or kind it ignores the cgroup dead valiation.

Copy link
Member

@geyslan geyslan left a comment

Choose a reason for hiding this comment

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

LGTM

@josedonizetti josedonizetti changed the title fix: enrichment broken if cgroup not avaliable fix: enrichment for kind and minikube Oct 26, 2023
@josedonizetti josedonizetti merged commit 1c9798e into aquasecurity:main Oct 29, 2023
29 checks passed
@josedonizetti josedonizetti deleted the fix-enrichment branch October 29, 2023 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kubernetes enrichment not working on kind/minikube
3 participants