center-for-threat-informed-defense / sightings_ecosystem

Sightings Ecosystem gives cyber defenders visibility into what adversaries actually do in the wild. With your help, we are tracking MITRE ATT&CK® techniques observed to give defenders real data on technique prevalence.
https://ctid.io/sightings-ecosystem
Apache License 2.0
33 stars 8 forks source link

ImportError: cannot import name 'get_current_traceback' from 'werkzeug.debug.tbtools' #6

Closed zmallen closed 6 months ago

zmallen commented 2 years ago

Reproduce:

  1. run make start-pipeline

Logs:

pipeline_1  | [+] postgres:5432 is available after 0 seconds
pipeline_1  | Counting Sightings...
2 Sightings counted
pipeline_1  | Inserting Sightings into database...
  1. run make start-analysis

Logs:

analysis_1  | [*] Waiting for postgres:5432 without a timeout
analysis_1  | [+] postgres:5432 is available after 0 seconds
analysis_1  | Traceback (most recent call last):
analysis_1  |   File "/analysis/sightings_dash.py", line 9, in <module>
analysis_1  |     import dash
analysis_1  |   File "//analysis/.venv/lib/python3.9/site-packages/dash/__init__.py", line 5, in <module>
analysis_1  |     from .dash import Dash, no_update  # noqa: F401,E402
analysis_1  |   File "//analysis/.venv/lib/python3.9/site-packages/dash/dash.py", line 22, in <module>
analysis_1  |     from werkzeug.debug.tbtools import get_current_traceback
analysis_1  | ImportError: cannot import name 'get_current_traceback' from 'werkzeug.debug.tbtools' (//analysis/.venv/lib/python3.9/site-packages/werkzeug/debug/tbtools.py)

Data going into sightings:

└> ls -lah data/
total 8.0K
drwxr-xr-x  4 zack.allen staff 128 Jul 18 13:31 .
drwxr-xr-x 23 zack.allen staff 736 Jul 18 13:35 ..
-rw-r--r--  1 zack.allen staff 572 Jul 18 13:31 data.json
-rw-r--r--  1 zack.allen staff 572 Jul 18 13:31 data2.json

Contents of each:

└> cat data/data.json
{"detection_type":"machine_validated","id":"2be14f20-586d-4bbd-9bd6-76676e87787d","sighting_type":"direct_technique","software_name":"stratus-red-team_4e5b7b88-982b-4a88-909e-405c95ba8978","start_time":"2022-07-16T15:06:34Z","techniques":[{"platform":"AWS","start_time":"2022-07-16T15:06:34Z","tactic":"persistence","technique_id":"T1136.003"},{"platform":"AWS","start_time":"2022-07-16T15:06:34Z","tactic":"persistence","technique_id":"T1136.003"},{"platform":"AWS","start_time":"2022-07-16T15:06:34Z","tactic":"persistence","technique_id":"T1136.003"}],"version":"1.0"}

└> cat data/data2.json
{"detection_type":"machine_validated","id":"0b86f649-4a34-4d09-a95e-d65dd7445036","sighting_type":"direct_technique","software_name":"stratus-red-team_f9c56ada-cd86-4402-891f-388d24cbba07","start_time":"2022-07-16T15:22:44Z","techniques":[{"platform":"AWS","start_time":"2022-07-16T15:22:44Z","tactic":"persistence","technique_id":"T1136.003"},{"platform":"AWS","start_time":"2022-07-16T15:22:44Z","tactic":"persistence","technique_id":"T1136.003"},{"platform":"AWS","start_time":"2022-07-16T15:22:44Z","tactic":"persistence","technique_id":"T1136.003"}],"version":"1.0"}

Any idea what the issue is here? I'm pretty close to getting this up and running, just need some direction on the ImportError :)