-
Notifications
You must be signed in to change notification settings - Fork 3
Fix/sentinel endpoint improvements #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Fix/sentinel endpoint improvements #27
Conversation
…esponse-code-on-empty-incident
…nel-endpoint-improvements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR improves the Sentinel ingest endpoint by refactoring the endpoint logic, adding additional tests for various incident and alert scenarios, and fixing mypy errors related to status mapping.
- Refactored ingest endpoint with clearer error handling and logging
- Added more extensive tests covering incident updates and alert-less incidents
- Updated mapping logic for Sentinel incidents and XDR alerts to align with current requirements
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
plugins/sentinel/test/unit/test_ingest.py | Added tests for incident ingestion and status updates |
plugins/sentinel/test/unit/sentinel.json | Updated sample JSON data and status values for consistent mapping |
plugins/sentinel/sentinel/routes/ingest.py | Refactored endpoint logic with improved exception handling and logging |
plugins/sentinel/sentinel/mapping/xdr_alert.py | Changed alert mapping from a dossier structure to a simplified data field |
plugins/sentinel/sentinel/mapping/sentinel_incident.py | Updated mapping and docstrings for consistent naming and status handling |
Comments suppressed due to low confidence (1)
plugins/sentinel/sentinel/mapping/xdr_alert.py:235
- The mapping now packages the entire graph_alert as a JSON string under 'data' instead of the previous 'dossier' structure; confirm that downstream systems can handle this change.
"data": [json.dumps(graph_alert)],
Co-authored-by: Matthew Rafuse <[email protected]>
Co-authored-by: Matthew Rafuse <[email protected]>
Co-authored-by: Matthew Rafuse <[email protected]>
Co-authored-by: Matthew Rafuse <[email protected]>
Refactored ingest endpoint
Added tests for a few different scenarios
Fixed mypy error in mapping of status