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(analyze): bind flags with viper #3981

Merged
merged 2 commits into from
Apr 17, 2024

Conversation

AlonZivony
Copy link
Contributor

1. Explain what the PR does

Restore the binding of the analyze mode flags with viper. This should fix the issue that they weren't usable since they were commented out.

Fix #3980

2. Explain how to test it

3. Other comments

@AlonZivony AlonZivony requested a review from geyslan April 16, 2024 11:05
@AlonZivony AlonZivony force-pushed the bugfix/analyze-unbound-flags branch from 597d102 to d092436 Compare April 16, 2024 11:16
@AlonZivony AlonZivony force-pushed the bugfix/analyze-unbound-flags branch 2 times, most recently from 044ea38 to f2890e0 Compare April 16, 2024 16:23
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, tested the returned flags and they seem to work nicely.


This seems not related to your PR but would be nice to have a better output in these cases:

sudo ./dist/tracee analyze
Error: accepts 1 arg(s), received 0
sudo ./dist/tracee analyze -l -e anti_debugging events.json
Error: accepts 1 arg(s), received 2

cmd/tracee/cmd/analyze.go Outdated Show resolved Hide resolved
Restore the binding of the analyze mode flags with viper.
This should fix the issue that they weren't usable since they were commented out.
Changed print to logger and added some more information to it.
@AlonZivony
Copy link
Contributor Author

LGTM, tested the returned flags and they seem to work nicely.

This seems not related to your PR but would be nice to have a better output in these cases:

sudo ./dist/tracee analyze
Error: accepts 1 arg(s), received 0
sudo ./dist/tracee analyze -l -e anti_debugging events.json
Error: accepts 1 arg(s), received 2

The first case is OK in my opinion.
The second is unclear. We can just remove the args constraints, but it should be in another PR so it will have its own commit.

@AlonZivony AlonZivony force-pushed the bugfix/analyze-unbound-flags branch from f2890e0 to 9d66b4d Compare April 16, 2024 18:28
@yanivagman yanivagman merged commit 44115a5 into aquasecurity:main Apr 17, 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.

Analyze mode flags don't work
3 participants