Add rule for recent Crate compromises; run fmt to pick up new yara-x newline formatting#1140
Merged
Merged
Conversation
…newline formatting Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
Comment on lines
+111
to
+113
| $regex1 = "Regex::new(r#\"\\[(?:\\s*0x[0-9a-fA-F]{1,2}\\s*,?\\s*)+\\]|\\[(?:\\s*\\d{1,3}\\s*,?\\s*)+\\]\"#)?" | ||
| $regex2 = "Regex::new(r#\"\"[1-9A-HJ-NP-Za-km-z]{32,44}\"\"#)?" | ||
| $regex3 = "Regex::new(r#\"\"0x[0-9a-fA-F]{64}\"\"#)?" |
Member
There was a problem hiding this comment.
Can these be given different variable names besides "regex" to indicate the types of patterns they're trying to match? I'm guessing they are wallet addresses for various coin types... but that's a guess.
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
stevebeattie
approved these changes
Sep 26, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a rule for the recent Crates.io compromises. It's a bit contrived for the specific sample (i.e., it likely won't apply in a generic sense).
Also, yara-x now formats rules in a slightly different way so I handled that as part of compiling and formatting the new rule.