8000 types: add event metadata by josedonizetti · Pull Request #2752 · aquasecurity/tracee · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

types: add event metadata #2752

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

Merged
merged 1 commit into from
Feb 21, 2023

Conversation

josedonizetti
Copy link
Contributor
@josedonizetti josedonizetti commented Feb 20, 2023

1. Explain what the PR does

This PR adds support to Metadata to trace.Event. At first this will be used to add SignatureMetadata when a signature event is created from a detection. Instead of adding SignatureMetadata directly, we have a more generic approach allowing for future use by events that are not signatures (eg: derivations, ebpf)

The Metadata field is a pointer and marked as omitempty so we only print it if there are metadata.

This PR is part of #2355

2. Explain how to test it

Test the PR using this change to add signature metadata to signature events #2753

3. Other comments

The first implementation was using a more dynamic approach, but after discussion we decide to have a structure for the specific fields Version, Description, Tags, Properties. This is based on SignatureMetadata, but different because we don't need name, nor id, as events already have name and id of themselves.

@josedonizetti josedonizetti marked this pull request as ready for review February 20, 2023 20:30
@josedonizetti josedonizetti self-assigned this Feb 20, 2023
@rafaeldtinoco rafaeldtinoco self-requested a review February 21, 2023 03:04
Copy link
Contributor
@rafaeldtinoco rafaeldtinoco left a comment

Choose a reason for hiding this comment

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

LGTM. I'll let you merge @josedonizetti because I want to make sure this type is like you want for #2753. Either way we can change the type later if needed. Cheers!

@josedonizetti josedonizetti merged commit 1825fd3 into aquasecurity:main Feb 21, 2023
@josedonizetti josedonizetti deleted the add-event-metadata branch February 21, 2023 11:43
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.

2 participants
0