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

Added host-visibility to probe sub-command #254

Merged
merged 2 commits into from
Apr 3, 2023
Merged

Conversation

legorie
Copy link
Contributor

@legorie legorie commented Feb 2, 2023

This draft PR is for issue #199
The host-visbility variable is treated as a string as in the karmor project. Below are the possible test cases :

Test case 1: Host visibility is none

bash-5.1# cat /tmp/karmorProbeData.cfg 
{"OSImage":"Ubuntu 22.04.1 LTS","KernelVersion":"5.15.0-58-generic","KubeletVersion":"v1.23.9+k3s1","ContainerRuntime":"docker://20.10.12","ActiveLSM":"AppArmor","KernelHeaderPresent":true,"HostSecurity":true,"ContainerSecurity":true,"ContainerDefaultPosture":{"file":"audit","network":"audit","capabilties":"audit"},"HostDefaultPosture":{"file":"audit","network":"audit","capabilties":"audit"},"HostVisibility":"none"}

image

Test case 2 : Host visibility is process,file

bash-5.1# cat /tmp/karmorProbeData.cfg 
{"OSImage":"Ubuntu 22.04.1 LTS","KernelVersion":"5.15.0-58-generic","KubeletVersion":"v1.23.9+k3s1","ContainerRuntime":"docker://20.10.12","ActiveLSM":"AppArmor","KernelHeaderPresent":true,"HostSecurity":true,"ContainerSecurity":true,"ContainerDefaultPosture":{"file":"audit","network":"audit","capabilties":"audit"},"HostDefaultPosture":{"file":"audit","network":"audit","capabilties":"audit"},"HostVisibility":"process,file"}

image

Test case 2 : Host visibility is process,file, network,capabilities

bash-5.1# cat /tmp/karmorProbeData.cfg 
{"OSImage":"Ubuntu 22.04.1 LTS","KernelVersion":"5.15.0-58-generic","KubeletVersion":"v1.23.9+k3s1","ContainerRuntime":"docker://20.10.12","ActiveLSM":"AppArmor","KernelHeaderPresent":true,"HostSecurity":true,"ContainerSecurity":true,"ContainerDefaultPosture":{"file":"audit","network":"audit","capabilties":"audit"},"HostDefaultPosture":{"file":"audit","network":"audit","capabilties":"audit"},"HostVisibility":"process,file,network,capabilities"}

image

Copy link
Member

@Ankurk99 Ankurk99 left a comment

Choose a reason for hiding this comment

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

LGTM!

@Ankurk99
Copy link
Member

Ankurk99 commented Feb 3, 2023

Just sign the DCO please

Signed-off-by: Legorie <legorie@hotmail.com>
@legorie
Copy link
Contributor Author

legorie commented Feb 14, 2023

Salut @achrefbensaad , Would you please have a look and give your comments, when you get a chance. Thank you.

@legorie legorie marked this pull request as ready for review March 7, 2023 20:50
@daemon1024
Copy link
Member

Depends on kubearmor/KubeArmor#1086

probe/probe.go Outdated Show resolved Hide resolved
probe/probe.go Outdated Show resolved Hide resolved
Signed-off-by: Legorie <legorie@hotmail.com>
@daemon1024 daemon1024 merged commit 7dd806f into kubearmor:main Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants