-
Notifications
You must be signed in to change notification settings - Fork 37
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
Address yara-x compile findings #640
Address yara-x compile findings #640
Conversation
Signed-off-by: egibs <[email protected]>
@@ -44,34 +44,3 @@ rule linux_kernel_module_hide_self: critical linux { | |||
condition: | |||
filesize < 1MB and $register_kprobe and any of ($hide*) | |||
} | |||
|
|||
rule funky_high_signal_killer: high { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a line-for-line duplicate.
filesize < 10MB and any of them | ||
} | ||
|
||
rule linux_rootkit_terms: critical linux { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a line-for-line duplicate.
@@ -29,15 +29,3 @@ rule fetch_run_sleep_delete: critical { | |||
condition: | |||
filesize < 1KB and $url and $sleep and $rm and any of ($path*) and any of ($run*) | |||
} | |||
|
|||
rule self_delete: high { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a line-for-line duplicate.
@@ -117,22 +141,3 @@ jobs: | |||
version: v1.62.0 | |||
args: --timeout=5m | |||
|
|||
lint: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was doing nothing and we're already covering what it would handle via the other Jobs.
921f93a
to
ef8d963
Compare
Signed-off-by: egibs <[email protected]>
ef8d963
to
3c80132
Compare
Addresses: #638
Running
yr compile rules/
returned ~73 errors which were mostly duplicate rule names. Some of these rules were direct duplicates of each other; others were just needed a more appropriate (if longer) name.In cases where
(elf or macho)
was used, the private rules needed to be renamed because the compiler thought we were referencing the import name (with astruct
type).Otherwise, I fixed a few strings and regenerated all of the test data to account for the updated rules.
To catch future rule warnings or errors, I added another CI check that will run
yr compile
on the entire rules directory which barely takes a second. If any findings exist, the Job will fail.