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

fix(core): handle bpf as an exception for setting node annotations #1786

Merged
merged 4 commits into from
Aug 6, 2024

Conversation

tesla59
Copy link
Contributor

@tesla59 tesla59 commented Jun 21, 2024

Purpose of PR?:

Fixes #1765

Does this PR introduce a breaking change?
No

If the changes in this PR are manually verified, list down the scenarios covered::
In progress (draft PR)

Additional information for reviewer? :
No

Checklist:

  • Bug fix. Fixes Host Security Policy not enforced #1765
  • 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

@DelusionalOptimist DelusionalOptimist marked this pull request as ready for review July 23, 2024 07:56
@tesla59
Copy link
Contributor Author

tesla59 commented Jul 23, 2024

@DelusionalOptimist i have updated the logic to check for annotation. its ready to review
also rebased to main

@tesla59
Copy link
Contributor Author

tesla59 commented Jul 28, 2024

@DelusionalOptimist added error handling for empty lsm file and also refactored byte->string conversion (and vice-versa) logic

Aryan-sharma11
Aryan-sharma11 previously approved these changes Jul 31, 2024
tesla59 and others added 4 commits August 6, 2024 17:04
Signed-off-by: tesla59 <nishant@heim.id>
…sm from the system

Signed-off-by: tesla59 <nishant@heim.id>
Signed-off-by: tesla59 <nishant@heim.id>
Signed-off-by: Rudraksh Pareek <rudraksh@accuknox.com>
Copy link
Member

@DelusionalOptimist DelusionalOptimist left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for seeing this through @tesla59 🚀

@DelusionalOptimist
Copy link
Member

CRI-O test failing due to upstream issues. Irrelevant to the changes here.

@DelusionalOptimist DelusionalOptimist merged commit d7c50e0 into kubearmor:main Aug 6, 2024
16 of 17 checks passed
Manik2708 added a commit to Manik2708/KubeArmor that referenced this pull request Aug 6, 2024
Co-authored-by: Barun Acharya <barun1024@gmail.com>
Signed-off-by: Manik2708 <mehtamanik96@gmail.com>

fix(helm): create release in charts repo  stable release updates

Signed-off-by: daemon1024 <barun1024@gmail.com>
Signed-off-by: Manik2708 <mehtamanik96@gmail.com>

fix: pass PAT as env var for gh-cli

Signed-off-by: Rudraksh Pareek <rudraksh@accuknox.com>

updated the main diagram

Signed-off-by: Rahul Jadhav <nyrahul@gmail.com>

added the updater script

Signed-off-by: Rahul Jadhav <nyrahul@gmail.com>

added an FAQ for WSL2

Signed-off-by: Rahul Jadhav <nyrahul@gmail.com>

fix(core):timeout when host & cluster security policies crds are not found

Signed-off-by: Prateek <prateeknandle@gmail.com>

fix(apparmor): reenable profile after parsing to make whitelist policies work

idk why we need to do this, but this fixes things for now

Signed-off-by: daemon1024 <barun1024@gmail.com>

fix: default posture logs for system generated permission denied events

Signed-off-by: Aryan-sharma11 <aryan1126.sharma@gmail.com>

fix controller image updation issue

Signed-off-by: rksharma95 <ramakant@accuknox.com>

remove kustomize binary from the repo

I think this was in there by mistake so removing the same via this
patch.

Signed-off-by: kranurag7 <81210977+kranurag7@users.noreply.github.com>

fix CI

Signed-off-by: Aryan-sharma11 <aryan1126.sharma@gmail.com>

update go.mod

Signed-off-by: Aryan-sharma11 <aryan1126.sharma@gmail.com>

fix hyperlink in hardening guide

Signed-off-by: Sujay <sujaydey641@gmail.com>

add multienforcer controller

Signed-off-by: rksharma95 <ramakant@accuknox.com>

feat : add annotate resources flag

Signed-off-by: Aryan-sharma11 <aryan1126.sharma@gmail.com>

remove /sys/kernel/security hostmount

Signed-off-by: Aryan-sharma11 <aryan1126.sharma@gmail.com>

deploy snitch on node restarts

Signed-off-by: Aryan-sharma11 <aryan1126.sharma@gmail.com>

configure ci to build controller when controller pkg is updated

Signed-off-by: Aryan-sharma11 <aryan1126.sharma@gmail.com>

set annotateResources=true in MakeFile

Signed-off-by: Aryan-sharma11 <aryan1126.sharma@gmail.com>

fix(helm): create release in charts repo  stable release updates

Signed-off-by: daemon1024 <barun1024@gmail.com>

Update STABLE-RELEASE to v1.4.0

Signed-off-by: Barun Acharya <barun1024@gmail.com>

fix(core): handle bpf as an exception for setting node annotations (kubearmor#1786)

* handle bpf as an exception for setting node annotations

Signed-off-by: tesla59 <nishant@heim.id>

* check if enforcer is set in the node annotations before reading the lsm from the system

Signed-off-by: tesla59 <nishant@heim.id>

* handle empty lsm file

Signed-off-by: tesla59 <nishant@heim.id>

* minor changes based on latest operator

Signed-off-by: Rudraksh Pareek <rudraksh@accuknox.com>

---------

Signed-off-by: tesla59 <nishant@heim.id>
Signed-off-by: Rudraksh Pareek <rudraksh@accuknox.com>
Co-authored-by: Rudraksh Pareek <rudrakshpareek3601@gmail.com>

[skip ci] Update Helm Chart To v1.4.0

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Manik2708 pushed a commit to Manik2708/KubeArmor that referenced this pull request Aug 6, 2024
…ubearmor#1786)

* handle bpf as an exception for setting node annotations

Signed-off-by: tesla59 <nishant@heim.id>

* check if enforcer is set in the node annotations before reading the lsm from the system

Signed-off-by: tesla59 <nishant@heim.id>

* handle empty lsm file

Signed-off-by: tesla59 <nishant@heim.id>

* minor changes based on latest operator

Signed-off-by: Rudraksh Pareek <rudraksh@accuknox.com>

---------

Signed-off-by: tesla59 <nishant@heim.id>
Signed-off-by: Rudraksh Pareek <rudraksh@accuknox.com>
Co-authored-by: Rudraksh Pareek <rudrakshpareek3601@gmail.com>
Signed-off-by: Manik2708 <mehtamanik96@gmail.com>
prady0t pushed a commit to prady0t/KubeArmor that referenced this pull request Oct 15, 2024
…ubearmor#1786)

* handle bpf as an exception for setting node annotations

Signed-off-by: tesla59 <nishant@heim.id>

* check if enforcer is set in the node annotations before reading the lsm from the system

Signed-off-by: tesla59 <nishant@heim.id>

* handle empty lsm file

Signed-off-by: tesla59 <nishant@heim.id>

* minor changes based on latest operator

Signed-off-by: Rudraksh Pareek <rudraksh@accuknox.com>

---------

Signed-off-by: tesla59 <nishant@heim.id>
Signed-off-by: Rudraksh Pareek <rudraksh@accuknox.com>
Co-authored-by: Rudraksh Pareek <rudrakshpareek3601@gmail.com>
Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com>
prady0t pushed a commit to prady0t/KubeArmor that referenced this pull request Oct 15, 2024
…ubearmor#1786)

* handle bpf as an exception for setting node annotations

Signed-off-by: tesla59 <nishant@heim.id>

* check if enforcer is set in the node annotations before reading the lsm from the system

Signed-off-by: tesla59 <nishant@heim.id>

* handle empty lsm file

Signed-off-by: tesla59 <nishant@heim.id>

* minor changes based on latest operator

Signed-off-by: Rudraksh Pareek <rudraksh@accuknox.com>

---------

Signed-off-by: tesla59 <nishant@heim.id>
Signed-off-by: Rudraksh Pareek <rudraksh@accuknox.com>
Co-authored-by: Rudraksh Pareek <rudrakshpareek3601@gmail.com>
Signed-off-by: prady0t <rickprimeranjan@gmail.com>
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.

Host Security Policy not enforced
4 participants