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

feat(events): create global event id enum #4053

Merged
merged 2 commits into from
May 31, 2024

Conversation

rscampos
Copy link
Contributor

@rscampos rscampos commented May 16, 2024

1. Explain what the PR does

fix #1098

53d93ea fix(tests): event ID translation
4806e8a feat(events): create global event id enum

4806e8a feat(events): create global event id enum

- create an array for translation internal ID to external ID;
- External syscall event starts at 1;
- External common event starts at 1000;
- External originated from user-space event start at 2000.

2. Explain how to test it

3. Other comments

pkg/server/grpc/tracee.go Outdated Show resolved Hide resolved
@rscampos rscampos requested a review from yanivagman May 16, 2024 15:12
@rscampos rscampos force-pushed the 1098_global_event_id_num branch 2 times, most recently from 23bb9c0 to 01a4fa6 Compare May 16, 2024 18:36
@rscampos rscampos changed the title Create global event id enum feat(events): create global event id enum May 16, 2024
api/v1beta1/event.proto Outdated Show resolved Hide resolved
api/v1beta1/event.proto Outdated Show resolved Hide resolved
api/v1beta1/event.proto Outdated Show resolved Hide resolved
pkg/server/grpc/tracee.go Outdated Show resolved Hide resolved
pkg/server/grpc/tracee.go Outdated Show resolved Hide resolved
@rscampos rscampos force-pushed the 1098_global_event_id_num branch 2 times, most recently from b046e08 to 28bbed6 Compare May 20, 2024 20:32
@rscampos rscampos marked this pull request as ready for review May 20, 2024 20:33
Copy link
Member

@geyslan geyslan left a comment

Choose a reason for hiding this comment

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

LGTM

go.mod Outdated
@@ -45,6 +45,8 @@ require (
sigs.k8s.io/controller-runtime v0.16.3
)

replace github.com/aquasecurity/tracee/api => github.com/rscampos/tracee/api v0.0.0-20240520202449-d199291ce929
Copy link
Member

Choose a reason for hiding this comment

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

don't forget to split this pr into 2, go.mod enters api first, main go.mod follows it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

API: #4085

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@geyslan splited the PR into 2, if you don't mind to do the last review, tks again :)

@@ -19,6 +19,574 @@ import (
"github.com/aquasecurity/tracee/types/trace"
)

// EventTranslationTable - translate internal to external Event ID
Copy link
Member

Choose a reason for hiding this comment

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

nit:

Suggested change
// EventTranslationTable - translate internal to external Event ID
// EventTranslationTable translates internal to external protobuf Event Id

- create an array for translation internal ID to external ID;
- External syscall event starts at 1;
- External common event starts at 1000;
- External originated from user-space event start at 2000.
@rscampos rscampos requested a review from geyslan May 31, 2024 15:01
Copy link
Member

@geyslan geyslan left a comment

Choose a reason for hiding this comment

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

LGTM - green in E2E tests (1553).

@rscampos rscampos merged commit 73839cf into aquasecurity:main May 31, 2024
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a global event id enum
4 participants