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

[REFACTOR] Separate probes and add new required field for probe dependencies #1791

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions cmd/tracee-ebpf/capabilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"fmt"

"github.com/aquasecurity/tracee/pkg/capabilities"
tracee "github.com/aquasecurity/tracee/pkg/ebpf"
"github.com/syndtr/gocapability/capability"
Expand Down Expand Up @@ -54,10 +55,10 @@ func generateTraceeEbpfRequiredCapabilities(OSInfo IKernelVersionInfo, cfg *trac

func getCapabilitiesRequiredByTraceeEvents(cfg *tracee.Config) []capability.Cap {
usedEvents := cfg.Filter.EventsToTrace
for eventID := range tracee.CreateEssentialEventsList(cfg) {
for eventID := range tracee.GetEssentialEventsList(cfg) {
usedEvents = append(usedEvents, eventID)
}
for eventID := range tracee.GetCaptureEventsConfig(cfg) {
for eventID := range tracee.GetCaptureEventsList(cfg) {
usedEvents = append(usedEvents, eventID)
}
caps := tracee.GetCapabilitiesRequiredByEvents(usedEvents)
Expand Down
3 changes: 2 additions & 1 deletion cmd/tracee-ebpf/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ func main() {
}

cfg.ChanEvents = make(chan trace.Event)
cfg.ChanErrors = make(chan error)
// We buffer the error channel because we may want to publish errors before we start flusing this channel
cfg.ChanErrors = make(chan error, 10)

t, err := tracee.New(cfg)
if err != nil {
Expand Down
Loading