New tests for rule + exception, macro with unknown source

Add new test cases for a rule with an unknown source *and* an
exception, and a macro with an unknown source.

The first results in a rule warning (and no error), and the second
prints an error and skips.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
This commit is contained in:
Mark Stemm
2022-03-01 16:48:10 -08:00
committed by poiana
parent 3fbc90e99e
commit df219b5e1d
3 changed files with 29 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
- rule: Cloudtrail Create Instance
desc: Detect Creating an EC2 Instance
condition: evt.num > 0 and ct.name="StartInstances"
output: EC2 Instance Created (evtnum=%evt.num info=%evt.plugininfo id=%ct.id user name=%json.value[/userIdentity/userName])
exceptions:
- name: user_secreid
fields: [aws.user, aws.region]
priority: INFO
source: aws_cloudtrail

View File

@@ -0,0 +1,4 @@
- macro: Some Cloudtrail Macro
condition: aws.user=bob
source: aws_cloudtrail