You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
case.py returns typed objects inconsistent with rest of SDK #210
The case module returns Case and CaseList typed objects from several functions, which is inconsistent with every other SDK module (rule.py, alert.py, entity.py, etc.) that returns dict[str, Any] or a list directly from the API response.
Affected functions:
get_case() → Case
patch_case() → Case
get_cases_from_list() → CaseList
Unaffected functions in the same file return dict[str, Any] as expected (list_cases, get_cases, execute_bulk_*, merge_cases), creating inconsistency even within case.py itself.
Additional issue: fields lost during deserialization
Case.from_dict() only maps a subset of fields from the API response (id, displayName, stage, priority, status, soarPlatformInfo, alertIds). Any additional fields returned by the API are silently dropped, which can cause data loss for callers who need the full response.
Proposed fix
Remove the Case and CaseList classes from models.py
Update get_case(), patch_case(), and get_cases_from_list() to return dict[str, Any]
Update any CLI handlers and tests that depend on attribute access on Case/CaseList objects
This makes the case module consistent with the rest of the SDK and ensures no API response data is lost.
Activity