Skip to content

Commit

Permalink
feature(types): add task identifier (aquasecurity#3425)
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaeldtinoco authored and josedonizetti committed Sep 1, 2023
1 parent 0da1426 commit 08707e9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion types/trace/trace.go
Expand Up @@ -42,10 +42,18 @@ type Event struct {
Syscall string `json:"syscall"`
StackAddresses []uint64 `json:"stackAddresses"`
ContextFlags ContextFlags `json:"contextFlags"`
Args []Argument `json:"args"` // Arguments are ordered according their appearance in the original event
EntityID uint32 `json:"-"` // task unique identifier (*)
Args []Argument `json:"args"` // args are ordered according their appearance in the original event
Metadata *Metadata `json:"metadata,omitempty"`
}

// (*) For an OS task to be uniquely identified, tracee builds a hash consisting of:
//
// u64: task start time (from event context)
// u32: task thread id (from event context)
//
// murmur([]byte) where slice of bytes is a concatenation (not a sum) of the 2 values above.

type Container struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Expand Down

0 comments on commit 08707e9

Please sign in to comment.