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

Add GKE default pod into allowlist in Mount Launched of Privileged Container rule #2198

Merged

Conversation

hi120ki
Copy link
Contributor

@hi120ki hi120ki commented Sep 12, 2022

Signed-off-by: Hi120ki 12624257+hi120ki@users.noreply.github.com

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

/kind release

If contributing rules or changes to rules, please make sure to also uncomment one of the following line:

/kind rule-update

/kind rule-create

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area build

/area engine

/area rules

/area tests

/area proposals

/area CI

What this PR does / why we need it:

In GKE cluster, a system container gce-pd-driver that manages Persistent Disk is running.
But the rule Mount Launched of Privileged Container detects as false positive.

Process: mount -t ext4 -o defaults /dev/disk/by-id/google-pvc-<id> /var/lib/kubelet/plugins/kubernetes.io/csi/pv/pvc-<id>/globalmount

This container runs in kube-system namespace, and image is from gke.gcr.io/gcp-compute-persistent-disk-csi-driver.
I added it into allowlist(macro : user_known_mount_in_privileged_containers ).

I'm waiting for your comments on adding it into allowlist and my proposed changes.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

rule(macro: known_gke_mount_in_privileged_containers): add new macro
rule(Mount Launched in Privileged Container): add GKE default pod into allowlist in Mount Launched of Privileged Container rule 

Signed-off-by: Hi120ki <12624257+hi120ki@users.noreply.github.com>
@darryk10
Copy link
Contributor

Hi @hi120ki ,
thanks for helping with FPs we really need this type of contribution :)
The only suggestion from my side is to create a new macro related to GKE. The macros like user_known_mount_in_privileged_containers are usually used as macros that each user can customise based on their environment. If we find something related to a specific technology we use to create a new macro related to it. :)
Thanks

Signed-off-by: Hi120ki <12624257+hi120ki@users.noreply.github.com>
@hi120ki
Copy link
Contributor Author

hi120ki commented Sep 12, 2022

@darryk10 I see. I revert and add new macro macro: known_gke_mount_in_privileged_containers as allowlist.
Cloud you check it?

@jasondellaluce
Copy link
Contributor

/milestone 0.33.0

/ok-to-test

@poiana poiana added this to the 0.33.0 milestone Sep 12, 2022
Copy link
Contributor

@darryk10 darryk10 left a comment

Choose a reason for hiding this comment

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

Thanks @hi120ki
LGTM

@poiana
Copy link
Contributor

poiana commented Sep 13, 2022

LGTM label has been added.

Git tree hash: 1c9189cac088f67f7e9d69e3b83a1e3cac740fd4

Copy link
Contributor

@jasondellaluce jasondellaluce left a comment

Choose a reason for hiding this comment

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

/approve

@poiana
Copy link
Contributor

poiana commented Sep 16, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: darryk10, hi120ki, jasondellaluce, Kaizhe, leogr

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

@leogr
Copy link
Member

leogr commented Sep 16, 2022

Closing and reopening to trigger the CI
/close

@poiana poiana closed this Sep 16, 2022
@poiana
Copy link
Contributor

poiana commented Sep 16, 2022

@leogr: Closed this PR.

In response to this:

Closing and reopening to trigger the CI
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@leogr
Copy link
Member

leogr commented Sep 16, 2022

/reopen

/hold
for the CI to complete

@poiana poiana reopened this Sep 16, 2022
@poiana
Copy link
Contributor

poiana commented Sep 16, 2022

@leogr: Reopened this PR.

In response to this:

/reopen

/hold
for the CI to complete

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@leogr
Copy link
Member

leogr commented Sep 16, 2022

/hold cancel

@poiana poiana merged commit 30b56d2 into falcosecurity:master Sep 16, 2022
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.

6 participants