TIPCommon.soar_ops
The TIPCommon.soar_ops module contains a collection of operational helpers designed to streamline common tasks in the Google Security Operations platform. These utilities range from managing Service Level Objectives (SLO) to handling cross-platform file storage and retrieving paginated user metadata.
SLO monitoring and comments
These functions help maintain awareness of Service Level Objectives by generating warnings and identifying breach-related communications within case comments.
| Function | Parameters | Description & Returns |
|---|---|---|
create_slo_message() |
|
Returns: str | None
Generates an SLO warning message based on specified time intervals. For
example, using Raises |
is_slo_comment() |
|
Returns: bool
Identifies if a string is a standard platform SLO warning or breach message (such as "SLO was breached."). |
get_clean_comment_body() |
|
Returns: str
Removes a specific prefix from a comment string or object. Raises |
remove_prefix_from_comments() |
|
Returns: list[str]
Bulk utility to strip a specific prefix from a collection of comment strings. |
File and storage operations
Operational helpers for interacting with the file system or Google Cloud storage buckets, ensuring consistent file handling across different execution environments.
| Function | Parameters | Description & Returns |
|---|---|---|
get_file() |
|
Returns: bytes | None
Retrieves the raw content of a file from the environment. Returns |
save_file() |
|
Returns: str | None
Persists a file to a Google Cloud bucket or a local path. Returns the final path to the saved file. |
get_secops_mode() |
None |
Returns: str | None
Retrieves the |
User management and profiles
Standardized functions for fetching user metadata and paginating through the platform's user directory.
| Function | Parameters | Description & Returns |
|---|---|---|
get_user_by_id() |
|
Returns: UserProfileCard | None
Fetches a specific user's profile card using their platform-wide unique identifier. Returns |
get_users_profile_cards_with_pagination() |
|
Returns: list[UserProfileCard]
Retrieves user profiles using iterative pagination. This handles the underlying offset logic automatically to prevent memory overhead in large environments. |
get_soar_case_comments() |
|
Returns: list[CaseComment]
Fetches a collection of all comment objects associated with a specific case ID. |