Commit graph

25 commits

Author SHA1 Message Date
mrrishi
3433e4b58f probe: fix namespace field to the policies list
Signed-off-by: mrrishi <mrrishi373@gmail.com>
Signed-off-by: jokestax <mrrishi373@gmail.com>
Signed-off-by: mrrishi <mrrishi373@gmail.com>

Signed-off-by: rksharma95 <ramakant@accuknox.com>
2026-01-02 10:21:04 +05:30
Manik Mehta
a5af11a35f
Karmor support for windows and removal of cilium (#471)
* windows support

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

* cilium removed

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

* some changes reverted

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

* add local-release to makefile

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

* remove contains element

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

* fix snyk failures and bump dependencies

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

---------

Signed-off-by: Manik2708 <mehtamanik96@gmail.com>
Signed-off-by: Aryan-sharma11 <aryan1126.sharma@gmail.com>
Co-authored-by: Aryan-sharma11 <aryan1126.sharma@gmail.com>
2025-01-16 17:03:45 +05:30
Rishikesh
844d84c9f8 fix(sysdump): ensure AppArmor tar is gzipped in sysdump
Signed-off-by: Rishikesh <rishikeshjagadale19@gmail.com>
2024-09-10 00:05:58 +05:30
Prateek Nandle
e7b1e60f7b
Merge pull request #449 from Manik2708/sysdump
probe added to sysdump
2024-08-28 03:16:55 +05:30
Manik2708
073bb1ee25 probe added to sysdump
Signed-off-by: Manik2708 <mehtamanik96@gmail.com>

lint error fixed

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

formatting error

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

nocolor-text feature add

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

Update probe/print.go

Co-authored-by: Aryan Sharma <54109867+Aryan-sharma11@users.noreply.github.com>
Signed-off-by: Manik2708 <mehtamanik96@gmail.com>

Update probe/print.go

Co-authored-by: Aryan Sharma <54109867+Aryan-sharma11@users.noreply.github.com>
Signed-off-by: Manik2708 <mehtamanik96@gmail.com>

enhancements

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

enhancements

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

echancement

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

Update cmd/probe.go

Co-authored-by: Aryan Sharma <54109867+Aryan-sharma11@users.noreply.github.com>
Signed-off-by: Manik2708 <mehtamanik96@gmail.com>

flags remoeved

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

os.Stdout fix

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

another enhancement

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

linting fixed

Signed-off-by: Manik2708 <mehtamanik96@gmail.com>
2024-08-28 02:14:29 +05:30
Ishaan Jain
e8a08bd1f7 Update label and add debug print statement for KubeArmor pods
Signed-off-by: Ishaan Jain <ishaan454@gmail.com>

added print statement stating that function checks all pods with kubearmor-app label

Signed-off-by: Ishaan Jain <ishaan454@gmail.com>

fixed lint error

Signed-off-by: Ishaan Jain <ishaan454@gmail.com>
2024-07-23 23:02:48 +05:30
Ankur Kothiwal
4507cc069e
feat(ns): update default namespace to "kubearmor" (#361)
* update default namespace to "kubearmor"

Signed-off-by: Ankur Kothiwal <ankur.kothiwal99@gmail.com>

* create default ns(kubearmor) before installing KubeArmor

Signed-off-by: Ankur Kothiwal <ankur.kothiwal99@gmail.com>

---------

Signed-off-by: Ankur Kothiwal <ankur.kothiwal99@gmail.com>
2023-09-26 11:41:52 +05:30
Sahil Raja
a0cf786477 Revert "chores(accuknox-cli): update karmor to accuknox-cli"
Signed-off-by: sahil <sahilraja242@gmail.com>
2023-04-13 12:51:33 +05:30
sahil
bcd6ed2d06 chores(accuknox-cli): update karmor to accuknox-cli
Signed-off-by: sahil <sahilraja242@gmail.com>
2023-04-13 12:24:34 +05:30
Prateeknandle
23c5e5f90f checking err for stream close
Signed-off-by: Prateeknandle <prateeknandle@gmail.com>
2023-02-09 21:03:36 +05:30
daemon1024
df5bff38ec chore: handle fmt and linter error/warnings
Signed-off-by: daemon1024 <barun.acharya@accuknox.com>
2022-08-12 19:58:23 +05:30
Rahul Jadhav
5e16c8d35a sysdump even if kubearmor pods are not found
currently, the sysdump expects the kubearmor daemon + pods to be
mandatorily present in the k8s. If not present, the sysdump errors out
and no zip file is produced. karmor sysdump could also be used in
cases where the user might just want to provide the snapshot of current
k8s cluster on which they intend to deploy kubearmor.
Similarly, sysdump is used in the context where kubearmor might be used
in host process mode (for e.g, dev env).

Signed-off-by: Rahul Jadhav <nyrahul@gmail.com>
2022-08-05 00:06:36 +05:30
Rahul Jadhav
967f195d44 ignore err if kubearmor daemonset not found
using `karmor sysdump` in the context of dev env causes problem since
kubearmor is not running in daemonset mode.

Signed-off-by: Rahul Jadhav <nyrahul@gmail.com>
2022-07-13 11:40:08 +05:30
Rahul Jadhav
4e82380e96 sysdump output file
* certain platforms do not allow colons to be part of filename (faced
  problem on GH action while uploading artifacts)
* ability to explicitly specify output file name

Signed-off-by: Rahul Jadhav <nyrahul@gmail.com>
2022-07-13 11:28:30 +05:30
Rahul Jadhav
78bfaf48e9 sysdump issue fixes
* gets apparmor profiles from all kubearmor pods
* if the exec to kubearmor pod fails, handle the failure graciously and
  get other information

Closes: #95

Signed-off-by: Rahul Jadhav <nyrahul@gmail.com>
2022-07-12 13:15:13 +05:30
Jaehyun Nam
c1056cfc1c add license headers
Signed-off-by: Jaehyun Nam <jn@accuknox.com>
2022-01-24 22:23:07 +09:00
daemon1024
c2e97c56a1 Add pod events to sysdump
Signed-off-by: Barun Acharya <barun.acharya@accuknox.com>
2021-10-12 13:03:41 +05:30
daemon1024
40c850923f concurrently dump resources
Fetch all the resources for sysdump concurrently, if there's an empty dump we return err, else if we have dump but there's an error, we create the partial sysdump and return error.

Signed-off-by: Barun Acharya <barun.acharya@accuknox.com>
2021-10-12 12:22:10 +05:30
daemon1024
09bb2c5f46 Add description of annotated pods to sysdump
Signed-off-by: Barun Acharya <barun.acharya@accuknox.com>
2021-10-12 12:22:10 +05:30
daemon1024
5793e57ab6 copy from inside kubearmor pod
* Removed host side deps
* Used Remote Command executor for streaming file for sysdump ( inspired from kubectl cp )
* Fixed sec vuln for file permission bits

Signed-off-by: Barun Acharya <barun.acharya@accuknox.com>
2021-10-11 20:59:25 +05:30
daemon1024
095d9f4dd7 add timestamp to sysdump archive name
Signed-off-by: Barun Acharya <barun.acharya@accuknox.com>
2021-10-06 16:45:33 +05:30
daemon1024
74287370fb dump more infromation using exec syscalls
added boot-config, ls,m, apparmor, dmesg to dump

Signed-off-by: Barun Acharya <barun.acharya@accuknox.com>
2021-10-06 16:44:50 +05:30
daemon1024
e1efd132bc Archive sysdump
Create dump files in the temp directory and then archive them into `karmor-sysdump.zip`

Signed-off-by: Barun Acharya <barun.acharya@accuknox.com>
2021-10-05 18:50:23 +05:30
daemon1024
4530b6702e collect logs from kubearmor pod
Signed-off-by: Barun Acharya <barun.acharya@accuknox.com>
2021-10-04 15:25:24 +05:30
daemon1024
bd0303aaf2 initial sysdump utility
Collect required System Information to troubleshoot issues from the various k8s resources available

Signed-off-by: Barun Acharya <barun.acharya@accuknox.com>
2021-10-04 15:10:16 +05:30