mirror of
https://github.com/mblanke/ThreatHunt.git
synced 2026-03-01 05:50:21 -05:00
feat: Add Playbook Manager, Saved Searches, and Timeline View components
- Implemented PlaybookManager for creating and managing investigation playbooks with templates. - Added SavedSearches component for managing bookmarked queries and recurring scans. - Introduced TimelineView for visualizing forensic event timelines with zoomable charts. - Enhanced backend processing with auto-queued jobs for dataset uploads and improved database concurrency. - Updated frontend components for better user experience and performance optimizations. - Documented changes in update log for future reference.
This commit is contained in:
25
_fix_keywords_empty_guard.py
Normal file
25
_fix_keywords_empty_guard.py
Normal file
@@ -0,0 +1,25 @@
|
||||
from pathlib import Path
|
||||
p=Path(r'd:/Projects/Dev/ThreatHunt/backend/app/api/routes/keywords.py')
|
||||
t=p.read_text(encoding='utf-8')
|
||||
old=''' if not body.dataset_ids and not body.scan_hunts and not body.scan_annotations and not body.scan_messages:
|
||||
raise HTTPException(400, "Select at least one dataset or enable additional sources (hunts/annotations/messages)")
|
||||
|
||||
'''
|
||||
new=''' if not body.dataset_ids and not body.scan_hunts and not body.scan_annotations and not body.scan_messages:
|
||||
return {
|
||||
"total_hits": 0,
|
||||
"hits": [],
|
||||
"themes_scanned": 0,
|
||||
"keywords_scanned": 0,
|
||||
"rows_scanned": 0,
|
||||
"cache_used": False,
|
||||
"cache_status": "miss",
|
||||
"cached_at": None,
|
||||
}
|
||||
|
||||
'''
|
||||
if old not in t:
|
||||
raise SystemExit('scope guard block not found')
|
||||
t=t.replace(old,new)
|
||||
p.write_text(t,encoding='utf-8')
|
||||
print('adjusted empty scan guard to return fast empty result (200)')
|
||||
Reference in New Issue
Block a user