google / timesketch

Collaborative forensic timeline analysis
Apache License 2.0
2.58k stars 589 forks source link

API client method to delete Sigma rule #2924

Closed jaegeral closed 11 months ago

jaegeral commented 12 months ago

Have a Sigma rule delete method in the API client and corresponding end2end tests.

This also avoids error in end2end tests if you run them multiple times on a local machine, otherwise you would get:

Running test: test_create_sigma_rule ...Failed response: [403] Rule 5266a592-b793-11ea-b3de-bbbbbb was already found in the database FORBIDDEN
Failed response: [403] Rule 5266a592-b793-11ea-b3de-bbbbbb was already found in the database FORBIDDEN
Failed response: [403] Rule 5266a592-b793-11ea-b3de-bbbbbb was already found in the database FORBIDDEN
Failed response: [403] Rule 5266a592-b793-11ea-b3de-bbbbbb was already found in the database FORBIDDEN
Failed response: [403] Rule 5266a592-b793-11ea-b3de-bbbbbb was already found in the database FORBIDDEN

every time you run the end2end tests.

With this PR, the rules are emptied every time.

Closes #2922