KubeArmor requires that you specify an absolute path in the policy rules. However, when the actual access happens with the relative path, the action is honored, but the policy name/severity/message is not populated with appropriate policy details (defaultPosture is specified as the policy name).
Bug Report
KubeArmor requires that you specify an absolute path in the policy rules. However, when the actual access happens with the relative path, the action is honored, but the policy name/severity/message is not populated with appropriate policy details (
defaultPosture
is specified as the policy name).General Information
Environment description (GKE, VM-Kubeadm, vagrant-dev-env, minikube, microk8s, ...)
I tried with k3s
Kernel version (run
uname -a
)Linux ubuntu2004-vagrants 5.4.0-120-generic #136-Ubuntu SMP Fri Jun 10 13:40:48 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Orchestration system version in use (e.g.
kubectl version
, ...)Link to relevant artifacts (policies, deployments scripts, ...)
Target containers/pods
kubectl apply -f https://raw.githubusercontent.com/kubearmor/KubeArmor/main/examples/wordpress-mysql/wordpress-mysql-deployment.yaml
To Reproduce
kubectl apply -f https://raw.githubusercontent.com/kubearmor/KubeArmor/main/examples/wordpress-mysql/wordpress-mysql-deployment.yaml
kubectl exec -it -n wordpress-mysql wordpress-XXXXXXXX -- bash -c "cat wp-config.php"
kubectl exec -it -n wordpress-mysql wordpress-XXXXXXXX -- bash -c "cat /var/www/html/wp-config.php"
Actual vs Expected behavior
Actual Behavior
wp-config.php
should be denied. (This is working)PolicyName: ksp-wordpress-block-config
.DefaultPosture
Expected Behavior
The PolicyName should be correctly set to
ksp-wordpress-block-config
in both the cases where absolute or relative path accesses are made.