Skip to content

Commit

Permalink
Unit test for appending to skipped rules
Browse files Browse the repository at this point in the history
Unit test verifies fix for appending to skipped rules. One rules file
defines a rule with priority WARNING, a second rules file appends to
that rules file, and the configured priority is ERROR.

Ensures that falco rules without errors.
  • Loading branch information
mstemm committed Apr 5, 2018
1 parent ce97f1e commit 856fda4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test/falco_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,14 @@ trace_files: !mux
- rules/rule_append_failure.yaml
trace_file: trace_files/cat_write.scap

rule_append_skipped:
detect: False
priority: ERROR
rules_file:
- rules/single_rule.yaml
- rules/append_single_rule.yaml
trace_file: trace_files/cat_write.scap

rule_append:
detect: True
detect_level: WARNING
Expand Down Expand Up @@ -670,4 +678,4 @@ trace_files: !mux
detect_level: INFO
rules_file:
- rules/detect_connect_using_in.yaml
trace_file: trace_files/connect_localhost.scap
trace_file: trace_files/connect_localhost.scap
3 changes: 3 additions & 0 deletions test/rules/append_single_rule.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- rule: open_from_cat
append: true
condition: and fd.name=/tmp

0 comments on commit 856fda4

Please sign in to comment.