Skip to content

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

Open
wants to merge 20 commits into
base: develop
Choose a base branch
from

Conversation

janberg-ts
Copy link
Contributor

Refactored ingest endpoint
Added tests for a few different scenarios
Fixed mypy error in mapping of status

@Copilot Copilot AI review requested due to automatic review settings June 9, 2025 09:37
Copilot

This comment was marked as outdated.

@janberg-ts janberg-ts requested a review from Copilot June 9, 2025 09:46
Copy link

@Copilot Copilot AI left a 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)],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants