howler-sentinel-plugin 0.2.0.dev96__tar.gz → 0.2.0.dev97__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (17) hide show
  1. {howler_sentinel_plugin-0.2.0.dev96 → howler_sentinel_plugin-0.2.0.dev97}/PKG-INFO +1 -1
  2. {howler_sentinel_plugin-0.2.0.dev96 → howler_sentinel_plugin-0.2.0.dev97}/pyproject.toml +1 -1
  3. {howler_sentinel_plugin-0.2.0.dev96 → howler_sentinel_plugin-0.2.0.dev97}/sentinel/actions/send_to_sentinel.py +15 -1
  4. {howler_sentinel_plugin-0.2.0.dev96 → howler_sentinel_plugin-0.2.0.dev97}/sentinel/actions/update_defender_xdr_alert.py +1 -1
  5. {howler_sentinel_plugin-0.2.0.dev96 → howler_sentinel_plugin-0.2.0.dev97}/LICENSE +0 -0
  6. {howler_sentinel_plugin-0.2.0.dev96 → howler_sentinel_plugin-0.2.0.dev97}/README.md +0 -0
  7. {howler_sentinel_plugin-0.2.0.dev96 → howler_sentinel_plugin-0.2.0.dev97}/sentinel/__init__.py +0 -0
  8. {howler_sentinel_plugin-0.2.0.dev96 → howler_sentinel_plugin-0.2.0.dev97}/sentinel/actions/ingestion.py +0 -0
  9. {howler_sentinel_plugin-0.2.0.dev96 → howler_sentinel_plugin-0.2.0.dev97}/sentinel/actions/synchronization.py +0 -0
  10. {howler_sentinel_plugin-0.2.0.dev96 → howler_sentinel_plugin-0.2.0.dev97}/sentinel/mapping/sentinel_incident.py +0 -0
  11. {howler_sentinel_plugin-0.2.0.dev96 → howler_sentinel_plugin-0.2.0.dev97}/sentinel/mapping/xdr_alert.py +0 -0
  12. {howler_sentinel_plugin-0.2.0.dev96 → howler_sentinel_plugin-0.2.0.dev97}/sentinel/mapping/xdr_alert_evidence.py +0 -0
  13. {howler_sentinel_plugin-0.2.0.dev96 → howler_sentinel_plugin-0.2.0.dev97}/sentinel/odm/hit.py +0 -0
  14. {howler_sentinel_plugin-0.2.0.dev96 → howler_sentinel_plugin-0.2.0.dev97}/sentinel/odm/models/sentinel.py +0 -0
  15. {howler_sentinel_plugin-0.2.0.dev96 → howler_sentinel_plugin-0.2.0.dev97}/sentinel/routes/__init__.py +0 -0
  16. {howler_sentinel_plugin-0.2.0.dev96 → howler_sentinel_plugin-0.2.0.dev97}/sentinel/routes/ingest.py +0 -0
  17. {howler_sentinel_plugin-0.2.0.dev96 → howler_sentinel_plugin-0.2.0.dev97}/sentinel/utils/tenant_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: howler-sentinel-plugin
3
- Version: 0.2.0.dev96
3
+ Version: 0.2.0.dev97
4
4
  Summary: A howler plugin for integration with Microsoft's Sentinel API
5
5
  License: MIT
6
6
  Author: CCCS
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "howler-sentinel-plugin"
3
- version = "0.2.0.dev96"
3
+ version = "0.2.0.dev97"
4
4
  description = "A howler plugin for integration with Microsoft's Sentinel API"
5
5
  authors = [{ name = "CCCS", email = "analysis-development@cyber.gc.ca" }]
6
6
  license = { text = "MIT" }
@@ -34,8 +34,22 @@ def execute(query: str, **kwargs):
34
34
  return report
35
35
 
36
36
  for hit in hits:
37
+ tenant_id = hit.azure.tenant_id
38
+ if not tenant_id and hit.organization.id:
39
+ tenant_id = hit.organization.id
40
+ elif not tenant_id:
41
+ report.append(
42
+ {
43
+ "query": f"howler.id:{hit.howler.id}",
44
+ "outcome": "skipped",
45
+ "title": "Azure Tenant ID is missing",
46
+ "message": "This alert does not have a set tenant ID.",
47
+ }
48
+ )
49
+ continue
50
+
37
51
  try:
38
- token, credentials = get_token(hit.azure.tenant_id)
52
+ token, credentials = get_token(tenant_id)
39
53
  except HowlerRuntimeError as err:
40
54
  logger.exception("Error on token fetching")
41
55
  report.append(
@@ -88,7 +88,7 @@ def execute(query: str, **kwargs):
88
88
  continue
89
89
 
90
90
  try:
91
- token = get_token(hit.azure.tenant_id)[0]
91
+ token = get_token(tenant_id)[0]
92
92
  except HowlerRuntimeError as err:
93
93
  logger.exception("Error on token fetching")
94
94
  report.append(