fixed test due to check regexes based on exe dirpath.
This commit is contained in:
@@ -523,8 +523,8 @@ mod tests {
|
|||||||
- ホスト アプリケーション
|
- ホスト アプリケーション
|
||||||
ImagePath:
|
ImagePath:
|
||||||
min_length: 1234321
|
min_length: 1234321
|
||||||
regexes: ./rules/config/regex/detectlist_suspicous_services.txt
|
regexes: ./../../../rules/config/regex/detectlist_suspicous_services.txt
|
||||||
allowlist: ./rules/config/regex/allowlist_legitimate_services.txt
|
allowlist: ./../../../rules/config/regex/allowlist_legitimate_services.txt
|
||||||
falsepositives:
|
falsepositives:
|
||||||
- unknown
|
- unknown
|
||||||
level: medium
|
level: medium
|
||||||
@@ -1111,7 +1111,7 @@ mod tests {
|
|||||||
selection:
|
selection:
|
||||||
EventID: 4103
|
EventID: 4103
|
||||||
Channel:
|
Channel:
|
||||||
- allowlist: ./rules/config/regex/allowlist_legitimate_services.txt
|
- allowlist: ./../../../rules/config/regex/allowlist_legitimate_services.txt
|
||||||
details: 'command=%CommandLine%'
|
details: 'command=%CommandLine%'
|
||||||
"#;
|
"#;
|
||||||
|
|
||||||
@@ -1145,7 +1145,7 @@ mod tests {
|
|||||||
selection:
|
selection:
|
||||||
EventID: 4103
|
EventID: 4103
|
||||||
Channel:
|
Channel:
|
||||||
- allowlist: ./rules/config/regex/allowlist_legitimate_services.txt
|
- allowlist: ./../../../rules/config/regex/allowlist_legitimate_services.txt
|
||||||
details: 'command=%CommandLine%'
|
details: 'command=%CommandLine%'
|
||||||
"#;
|
"#;
|
||||||
|
|
||||||
@@ -1179,7 +1179,7 @@ mod tests {
|
|||||||
selection:
|
selection:
|
||||||
EventID: 4103
|
EventID: 4103
|
||||||
Channel:
|
Channel:
|
||||||
- allowlist: ./rules/config/regex/allowlist_legitimate_services.txt
|
- allowlist: ./../../../rules/config/regex/allowlist_legitimate_services.txt
|
||||||
details: 'command=%CommandLine%'
|
details: 'command=%CommandLine%'
|
||||||
"#;
|
"#;
|
||||||
|
|
||||||
|
|||||||
@@ -443,7 +443,7 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn test_check_regex() {
|
fn test_check_regex() {
|
||||||
let regexes: Vec<Regex> =
|
let regexes: Vec<Regex> =
|
||||||
utils::read_txt("./rules/config/regex/detectlist_suspicous_services.txt")
|
utils::read_txt("./../../../rules/config/regex/detectlist_suspicous_services.txt")
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|regex_str| Regex::new(®ex_str).unwrap())
|
.map(|regex_str| Regex::new(®ex_str).unwrap())
|
||||||
@@ -459,7 +459,7 @@ mod tests {
|
|||||||
fn test_check_allowlist() {
|
fn test_check_allowlist() {
|
||||||
let commandline = "\"C:\\Program Files\\Google\\Update\\GoogleUpdate.exe\"";
|
let commandline = "\"C:\\Program Files\\Google\\Update\\GoogleUpdate.exe\"";
|
||||||
let allowlist: Vec<Regex> =
|
let allowlist: Vec<Regex> =
|
||||||
utils::read_txt("./rules/config/regex/allowlist_legitimate_services.txt")
|
utils::read_txt("./../../../rules/config/regex/allowlist_legitimate_services.txt")
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|allow_str| Regex::new(&allow_str).unwrap())
|
.map(|allow_str| Regex::new(&allow_str).unwrap())
|
||||||
|
|||||||
Reference in New Issue
Block a user