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

[v0.16.0] fix: derived event not triggering if base filtered #3287

Merged
Merged
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
6 changes: 3 additions & 3 deletions pkg/ebpf/events_pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -510,16 +510,16 @@ func (t *Tracee) deriveEvents(ctx context.Context, in <-chan *trace.Event) (
t.handleError(err)
}

for i, derivative := range derivatives {
for i := range derivatives {
// Skip events that dont work with filtering due to missing types being handled.
// https://github.com/aquasecurity/tracee/issues/2486
switch events.ID(derivative.EventID) {
switch events.ID(derivatives[i].EventID) {
case events.SymbolsLoaded:
case events.SharedObjectLoaded:
case events.PrintMemDump:
default:
// Derived events might need filtering as well
if t.matchPolicies(&derivative) == 0 {
if t.matchPolicies(&derivatives[i]) == 0 {
_ = t.stats.EventsFiltered.Increment()
continue
}
Expand Down