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

fix: skip timestamp normalizing in derived events #3835

Merged

Conversation

NDStrahilevitz
Copy link
Collaborator

1. Explain what the PR does

a78e7c1: fix: skip timestamp normalizing in derived events

2. Explain how to test it

  1. tracee --events container_create
  2. docker run --rm ubuntu
  3. Timestamp should make sense

3. Other comments

Fix #3828

Copy link
Collaborator

@josedonizetti josedonizetti left a comment

Choose a reason for hiding this comment

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

Looks good, left a nitpick

@@ -331,6 +331,12 @@ func (t *Tracee) processPrintMemDump(event *trace.Event) error {
// normalizeEventCtxTimes normalizes the event context timings to be relative to tracee start time
// or current time in nanoseconds.
func (t *Tracee) normalizeEventCtxTimes(event *trace.Event) error {
eventId := events.ID(event.EventID)
if eventId > events.MaxCommonID && eventId < events.MaxUserSpace {
Copy link
Collaborator

@josedonizetti josedonizetti Jan 31, 2024

Choose a reason for hiding this comment

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

nitpick: can we extract for this with better naming? events.IsDerivedEvent()
wdyt?

Copy link
Member

Choose a reason for hiding this comment

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

nitpick: can we extract for this with better naming? events.IsDerivedEvent()
wdyt?

LGTM as well. The method suggested is a good idea.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think that when we do extensions, we will need specified "sections" per event type. Then we can easily classify by section location. I assume that that change will break this one, so we don't necessarily need this right now.

@NDStrahilevitz NDStrahilevitz merged commit 92ac6f2 into aquasecurity:main Jan 31, 2024
33 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.

Tracee outputs bogus timestamps
3 participants