-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2374 from e3rd/sieve-time
sieve bot gets :before and :after keywords
- Loading branch information
Showing
8 changed files
with
141 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# SPDX-FileCopyrightText: 2017 Antoine Neuenschwander | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
pendulum | ||
textX>=1.5.1 |
This file contains 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
This file contains 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
This file contains 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
28 changes: 28 additions & 0 deletions
28
intelmq/tests/bots/experts/sieve/test_sieve_files/test_date_match.sieve
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
if time.observation :before '1 week' { | ||
append extra.list 'before 1 week' | ||
} | ||
|
||
if time.observation :after '1 week' { | ||
append extra.list 'after 1 week' | ||
} | ||
|
||
if time.observation :before '2023-06-01' { | ||
append extra.list 'before 2023-06-01' | ||
} | ||
|
||
if time.observation :after '2023-06-01' { | ||
# when time is not set, '2023-06-01 00:01' resolves here | ||
append extra.list 'after 2023-06-01' | ||
} | ||
|
||
if time.observation :before '2023-06-01 15:00' { | ||
append extra.list 'before 2023-06-01 15:00' | ||
} | ||
|
||
if time.observation :after '2023-06-01 15:00' { | ||
append extra.list 'after 2023-06-01 15:00' | ||
} | ||
|
||
if extra.str == 'few-hours' && time.observation :after '10 h' { | ||
append extra.list 'after 10 h' | ||
} |
2 changes: 2 additions & 0 deletions
2
intelmq/tests/bots/experts/sieve/test_sieve_files/test_date_match.sieve.license
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SPDX-FileCopyrightText: 2023 Edvard Rejthar CSIRT.cz | ||
SPDX-License-Identifier: AGPL-3.0-or-later |