Issue

When trying to add a rule filter to a Panther-managed rule, the following error message occurs in my Panther Console:

Cannot save an enabled rule with failing unit tests

How can I fix this and save my changes?

Resolution

To resolve this issue, you can perform the following steps:

In addition, this behavior is described in our documentation, in the section Working with failed unit tests with filters.

Cause

That test expects the rule to trigger an alert, but because the field value included in the unit test does not match the filter, the test case no longer meets the conditions for triggering the alert, so the test fails.