Skip to content

Commit

Permalink
Add priority_filter flag to artifact processor (#914)
Browse files Browse the repository at this point in the history
* Add priority_filter flag to artifact processor

* lint

* Update recipe

* fix recipe
  • Loading branch information
jleaniz authored Sep 6, 2024
1 parent 5871dfb commit 4eaebec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion data/recipes/upload_turbinia.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"turbinia_api": "@turbinia_api",
"incident_id": "@incident_id",
"output_directory": null,
"priority_filter": "@priority_filter",
"sketch_id": null
}
}],
Expand All @@ -40,6 +41,7 @@
["--turbinia_api", "Turbinia API server endpoint.", "http://127.0.0.1:8000"],
["--local_turbinia_results", "Directory where Turbinia results will be downloaded to.", null],
["--turbinia_zone", "The GCP zone the disk to process and Turbinia workers are in.", "us-central1-f", {"format": "gcp_zone"}],
["--sketch_id", "Timesketch sketch ID.", null, {"format": "integer"}]
["--sketch_id", "Timesketch sketch ID.", null, {"format": "integer"}],
["--priority_filter", "Filter report findings, range from 0 to 100, 0 is the highest.", "100", {"format": "integer"}]
]
}
4 changes: 3 additions & 1 deletion dftimewolf/lib/processors/turbinia_artifact.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ def __init__(
def SetUp(
self, project: str, turbinia_recipe: Optional[str],
turbinia_zone: str, turbinia_api: str, output_directory: str,
incident_id: str, sketch_id: str, turbinia_auth: bool = False) -> None:
incident_id: str, sketch_id: str, priority_filter: int = 100,
turbinia_auth: bool = False) -> None:
"""Sets up the object attributes.
Args:
Expand All @@ -70,6 +71,7 @@ def SetUp(
turbinia_api,
incident_id,
int(sketch_id) if sketch_id else 0,
priority_filter,
turbinia_auth)

# pytype: disable=signature-mismatch
Expand Down

0 comments on commit 4eaebec

Please sign in to comment.