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

tracee: signatures-dir accept multiple values #3246

Conversation

josedonizetti
Copy link
Collaborator

@josedonizetti josedonizetti commented Jun 15, 2023

1. Explain what the PR does

Fix #3179

Author: Jose Donizetti <jdbjunior@gmail.com>
Date:   Wed Jun 14 20:48:42 2023 -0300

    feat: signatures-dir accept multiple values

2. Explain how to test it

The tracee-rules binary should be working as before:

mkdir /tmp/test

./dist/tracee-rules --help # should still only support one dir
./dist/tracee-rules --list 
./dist/tracee-rules --list --rules-dir=/tmp # should find no signatures

The unified binary should now support multiple directories:

mkdir /tmp/test

./dist/tracee list
./dist/tracee list --signatures-dir=/tmp/test # should not find any signatures
./dist/tracee list --signatures-dir=/tmp/test --signatures-dir=./dist/signatures # should find normal signatures

./dist/tracee --signatures-dir=/tmp/test -f e=anti_debugging # should fail because it can't find the signatures
./dist/tracee --signatures-dir=/tmp/test --signatures-dir=./dist/signatures  -f e=anti_debugging # should work normally

3. Other comments

@josedonizetti josedonizetti force-pushed the signatures-dir-accept-multiple-values branch from a3d41b5 to ab03daf Compare June 22, 2023 16:15
@josedonizetti josedonizetti marked this pull request as ready for review June 22, 2023 16:16
@@ -54,10 +54,15 @@ func main() {
return fmt.Errorf("invalid target specified: %s", strings.ToLower(c.String("rego-runtime-target")))
}

var rulesDir []string
if c.String("rules-dir") != "" {
rulesDir = []string{c.String("rules-dir")}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't this be GetStringArray?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We are not changing tracee-rules, only tracee.

Copy link
Collaborator

@yanivagman yanivagman left a comment

Choose a reason for hiding this comment

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

LGTM

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 9d5eefe into aquasecurity:main Jun 23, 2023
25 checks passed
@josedonizetti josedonizetti deleted the signatures-dir-accept-multiple-values branch July 13, 2023 10:40
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.

signatures-dir should accept multiple directories
3 participants