Skip to content

bug(query): wrong query - volume mount with os directory write permissions #7542

@christian-sahlmann

Description

@christian-sahlmann

After looking into the details of Volume Mount With OS Directory Write Permissions, I came to the conclusion that this query is incorrect and does not make sense in its current form.

The query checks if the mountPath is at some location where sensitive host files could be located. The problem here is that the mountPath is the "path within the container at which the volume should be mounted" and not related to the location on the host at all.

The correct check would be to verify the hostPath.path.

As the hostPath check is already covered by Workload Mounting With Sensitive OS Directory, I believe that the best solution is to delete the incorrect rule without any replacement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcommunityCommunity contributionkubernetesKubernetes queryqueryNew query feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions