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

feat(core): Seccomp Profile for Kubearmor #1661

Merged
merged 3 commits into from
Mar 8, 2024
Merged

Conversation

PrimalPimmy
Copy link
Member

@PrimalPimmy PrimalPimmy commented Mar 1, 2024

Purpose of PR?:

Part of securing kubearmor in issue #1186

This PR introduces seccomp profile for both kubearmor and kubearmor-init container, by only allowing necessary syscalls needed by Kubearmor to run and function properly.

Does this PR introduce a breaking change?

Although there may not be any breaking change, we may need to be on the lookout incase we missed to whitelist any necessary syscall.

Additional information for reviewer? :

Couple of things that still needs to be done:
Define custom Kubelet directory incase it is different than default (Default is /var/lib/kubelet/seccomp) Also will be done later. Seccomp will simply not load but kubearmor will run normally if path is different, and that's okay for now
Runtime default seccomp for all other Kubearmor pods. Will be done in another PR/release

Checklist:

  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • PR Title follows the convention of <type>(<scope>): <subject>
  • Commit has unit tests
  • Commit has integration tests

@daemon1024
Copy link
Member

Add an option to not add seccomp to security context of daemonset based on config crd

daemon1024
daemon1024 previously approved these changes Mar 8, 2024
Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

Config file added for seccomp path

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

reversed config file (will need another approach

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

reversed helm value

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

reversed config value

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

Added license

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

feat(operator): check if seccomp path is there

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

revert something

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

reverting init seccomp

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>
Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

Fix(init): seccomp added to make init work

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

Attempting to fix synk vulns

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

synk vuln check

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

Custom syscall types added

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

chore(update): Licensing and ubi image tests for operator

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

fix(seccomp): Liveness probe fix

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

revert seccomp tests

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>
@PrimalPimmy
Copy link
Member Author

Won't squash these 3 commits, might need them for reference

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

Clean up and fixes

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

Config logic fix

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

Seperated config map

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>
Copy link
Collaborator

@rksharma95 rksharma95 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@daemon1024 daemon1024 merged commit ed0ea33 into kubearmor:main Mar 8, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants