Skip to content

Kubearmor host policy does not enforce process path matching #1970

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

Open
brothersw opened this issue Feb 16, 2025 · 0 comments
Open

Kubearmor host policy does not enforce process path matching #1970

brothersw opened this issue Feb 16, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@brothersw
Copy link

Bug Report

General Information

  • Environment description (GKE, VM-Kubeadm, vagrant-dev-env, minikube, microk8s, ...)
NAME="Ubuntu"
VERSION="20.04.6 LTS (Focal Fossa)"
  • Kernel version (run uname -a)
# uname -a
Linux karmor-ubuntu 5.4.0-182-generic #202-Ubuntu SMP Fri Apr 26 12:29:36 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
  • Orchestration system version in use (e.g. kubectl version, ...)
# karmor version
karmor version 1.3.0 linux/amd64 BuildDate=2024-12-13T11:15:36Z
current version is the latest
  • Link to relevant artifacts (policies, deployments scripts, ...)
    processes.yaml:
apiVersion: security.kubearmor.com/v1
kind: KubeArmorHostPolicy
metadata:
  name: process-block
spec:
  nodeSelector:
    matchLabels:
      kubearmor.io/hostname: "*" # Apply to all hosts
  process:
    matchPaths:
    - path: /nc
    - path: /bin/nc
  action:
    Block
  • Target containers/pods
    Host policy

To Reproduce

  1. Write the policy to a yaml file
  2. Apply the policy
  3. Restart my session for policy to take effect
  4. Attempt to access /bin/nc

Expected behavior

I expect /bin/nc to be blocked from running, it is not. /nc when moving the file into /nc is properly blocked from running. matchPatterns also doesn't seem to work.

@brothersw brothersw added the bug Something isn't working label Feb 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant