Skip to content

Commit

Permalink
Add volatile keyword
Browse files Browse the repository at this point in the history
Following CERT-Polska/karton#167, here's a simple support for the "volatile" keyword.
This gives users the ability to choose what tasks they don't want reported, examples of situations where you'd want that are given in the issue.
  • Loading branch information
yankovs authored Aug 15, 2022
1 parent 197c3cd commit b3cb74b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions karton/mwdb_reporter/mwdb_reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,11 @@ def process_blob(self, task: Task) -> None:
)

def process(self, task: Task) -> None:
if task.has_payload("properties"):
if task.get_payload("properties").get("volatile"):
self.log.info("Not reporting volatile task")
return

object_type = task.headers["type"]
mwdb_object: Optional[MWDBObject]

Expand Down

0 comments on commit b3cb74b

Please sign in to comment.