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(signatures): add simple proctree datasource envelope #3692

Conversation

AlonZivony
Copy link
Contributor

1. Explain what the PR does

I donate this signatures helper code in the hope that it will help other people to use the process tree datasource.

0737108 feat(signatures): add simple proctree datasource envelope

2. Explain how to test it

3. Other comments

Using datasources is pretty frustrating, as the API require
multiple steps to query.
Created a simple struct to envelope the proctree datasource,
exposing its API using simple methods.
@rafaeldtinoco
Copy link
Contributor

rafaeldtinoco commented Nov 16, 2023

@AlonZivony

This is actually the reason why I started the discussion about having data sources with generic types or having the package types to include the types of whatever we're saving there.

Like you do in this change, you wrap the type casting/checking, to make it easier to be used. I believe this change, for now, is a good change. Im just afraid of having this code not being used by anything hanging there and not tested.

I believe, besides having a simple unit testing (not sure is needed) but, maybe have a signature using the feature (and helper). Do you think we can open source a simple signature using process tree ? Or include a feature in one of the existing signatures ?

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

@rafaeldtinoco rafaeldtinoco merged commit de3ac5c into aquasecurity:main Nov 16, 2023
31 checks passed
@AlonZivony
Copy link
Contributor Author

@AlonZivony

This is actually the reason why I started the discussion about having data sources with generic types or having the package types to include the types of whatever we're saving there.

Like you do in this change, you wrap the type casting/checking, to make it easier to be used. I believe this change, for now, is a good change. Im just afraid of having this code not being used by anything hanging there and not tested.

I believe, besides having a simple unit testing (not sure is needed) but, maybe have a signature using the feature (and helper). Do you think we can open source a simple signature using process tree ? Or include a feature in one of the existing signatures ?

Hmm I think we can add a feature of adding lineage to all signatures upon trigger for example.
Also, we can use this helper type now for the e2e test of the process tree. WDYT?

@AlonZivony AlonZivony deleted the feature/proctree-datasource-helpers branch November 16, 2023 19:30
@rafaeldtinoco
Copy link
Contributor

Also, we can use this helper type now for the e2e test of the process tree. WDYT?

Yep, I would go for this at least. Because then if something brakes we will get on the tests right away.

@AlonZivony AlonZivony restored the feature/proctree-datasource-helpers branch June 13, 2024 12:56
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