Skip to content

Commit

Permalink
minor updates
Browse files Browse the repository at this point in the history
Signed-off-by: Aryan-sharma11 <[email protected]>
  • Loading branch information
Aryan-sharma11 committed Jan 16, 2025
1 parent f2bbe3d commit cb148bc
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions KubeArmor/BPF/filelessexec.bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ int BPF_PROG(enforce_bprm_check_security, struct linux_binprm *bprm){

// mapping not backed by any file with executable permission, denying mapping
if (*present == BLOCK) {
event_data->retval = -13;
event_data->retval = -EPERM;
bpf_ringbuf_submit(event_data, 0);
// bpf_printk("[bprm] fileless execution detected with pid %d, denying execution", event_data->pid);
return -13;

return -EPERM;
} else {
event_data->retval = 0;
bpf_ringbuf_submit(event_data, 0);
Expand Down
2 changes: 1 addition & 1 deletion KubeArmor/BPF/system_monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,7 @@ static __always_inline bool should_drop_alerts_per_container(sys_context_t *cont
{
__builtin_memset(&args_buf->argsArray, 0, sizeof(args_buf->argsArray));
bpf_probe_read_str(&args_buf->argsArray, sizeof(args_buf->argsArray), argp);
// bpf_printk("argp = %s argsBuf = %s" , argp , args_buf->argsArray);

bpf_map_update_elem(&args_store, &key, args_buf, BPF_ANY);
}
else {
Expand Down
1 change: 0 additions & 1 deletion KubeArmor/core/dockerHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,6 @@ func (dm *KubeArmorDaemon) GetAlreadyDeployedDockerContainers() {
dm.ContainersLock.Lock()
if _, ok := dm.Containers[container.ContainerID]; !ok {
dm.Containers[container.ContainerID] = container
fmt.Println("container id ", container.ContainerID)
dm.ContainersLock.Unlock()

// create/update endpoint in non-k8s mode
Expand Down
1 change: 1 addition & 0 deletions deployments/CRD/KubeArmorClusterPolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ spec:
items:
type: string
type: array
maxItems: 16
severity:
maximum: 10
minimum: 1
Expand Down
1 change: 1 addition & 0 deletions deployments/CRD/KubeArmorHostPolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ spec:
items:
type: string
type: array
maxItems: 16
severity:
maximum: 10
minimum: 1
Expand Down
1 change: 1 addition & 0 deletions deployments/CRD/KubeArmorPolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ spec:
items:
type: string
type: array
maxItems: 16
severity:
maximum: 10
minimum: 1
Expand Down

0 comments on commit cb148bc

Please sign in to comment.