soar_ops 모듈
TIPCommon.soar_ops.create_slo_message
TIPCommon.soar_ops.create_slo_message(slo: int, interval_days: Iterable[int], existing_comments: Iterable[str])
시간 간격 및 기존 댓글을 기반으로 SLO 경고 메시지를 가져옵니다.
interval_days=[0, 1, 7, 14]
매개변수의 경우 함수는 다음 일정에 따라 SLO가 위반된다는 경고 메시지를 보냅니다.
- 만료 시간까지 7~14일 남음
- 만료 시간까지 1~7일 남음
- SLO가 위반된 시간입니다.
현재 위반 간격에서 이미 댓글이 전송된 경우 새 댓글이 반환되지 않습니다 (None
이 반환됨).
매개변수 | |
---|---|
slo |
int Unix 마이크로초 단위의 SLO 위반 날짜입니다 (예: 1_673_774_674_567). |
interval_days |
Iterable[int] 시간 위반 경고가 전송되어야 하는 일수를 포함하는 이터러블입니다 (예: [0, 1, 3, 7, 14]). |
existing_comments |
Iterable[int] 댓글이 이미 전송되었는지 확인하기 위한 기존 댓글입니다. |
발생 오류
ValueError
- 시간 간격 중 하나가 음수인 경우
반환
해당하는 경우 댓글이 반환됩니다. 그렇지 않으면 None
이 반환됩니다.
TIPCommon.soar_ops.get_clean_comment_body
TIPCommon.soar_ops.get_clean_comment_body(comment: str | CaseComment, prefix: str)
댓글 문자열 또는 댓글 객체에서 접두사를 삭제합니다.
매개변수 | |
---|---|
comment |
str | CaseComment 접두사를 삭제할 댓글 문자열 또는 댓글 객체입니다. |
prefix |
str 삭제할 접두사입니다. |
발생 오류
TypeError
- 댓글 유형이 str
도 CaseComment
도 아닌 경우
반환
접두사가 없는 댓글입니다.
반환 유형
str
TIPCommon.soar_ops.get_file
TIPCommon.soar_ops.get_file(chronicle_soar: SiemplifyAction | SiemplifyConnectorExecution | SiemplifyJob, identifier: str)→ bytes | None
파일 콘텐츠를 바이트로 반환합니다.
매개변수
매개변수 | |
---|---|
chronicle_soar |
ChronicleSOAR Google Security Operations SOAR SDK 객체입니다. |
identifier |
str 전체 경로와 함께 파일 이름 식별자입니다. |
반환
제공된 식별자의 바이트 데이터입니다.
반환 유형
bytes | None
TIPCommon.soar_ops.get_secops_mode
TIPCommon.soar_ops.get_secops_mode()→ str | None
SECOPS_MODE
환경 변수를 반환합니다.
반환
SECOPS_MODE
환경 변수
반환 유형
str | None
TIPCommon.soar_ops.get_soar_case_comments
TIPCommon.soar_ops.get_soar_case_comments(chronicle_soar: SiemplifyAction | SiemplifyJob, case_id: str | int)
ID를 사용하여 케이스의 댓글 객체 목록을 반환합니다.
매개변수 | |
---|---|
chronicle_soar |
SiemplifyAction | SiemplifyJob SDK 객체입니다. |
case_id |
str | int 댓글을 가져올 케이스의 ID입니다. |
반환
의견 객체 목록입니다.
반환 유형
list[base.action.CaseComment]
TIPCommon.soar_ops.get_user_by_id
TIPCommon.soar_ops.get_user_by_id(chronicle_soar: SiemplifyAction | SiemplifyConnectorExecution | SiemplifyJob, user_id: str)→ UserProfileCard | None
사용자 ID에서 UserProfileCard 객체를 가져옵니다.
매개변수
매개변수 | |
---|---|
chronicle_soar |
ChronicleSOAR Google Security Operations SOAR SDK 객체입니다. |
user_id |
str 사용자 ID입니다(예: |
반환
사용자 객체가 있으면 사용자 객체, 그렇지 않으면 None
반환 유형
UserProfileCard | None
TIPCommon.soar_ops.get_users_profile_cards_with_pagination
TIPCommon.soar_ops.get_users_profile_cards_with_pagination(chronicle_soar: SiemplifyAction | SiemplifyConnectorExecution | SiemplifyJob, search_term: str = '', page_size: int = 20, filter_by_role: bool = False, filter_disabled_users: bool = False, filter_support_users: bool = False, fetch_only_support_users: bool = False, filter_permission_types: list[int] | None = None)→ list[UserProfileCard]
페이지로 나누기를 사용하여 모든 사용자 프로필 카드를 가져옵니다. 페이지 크기는 각 반복의 사용자 수 제한으로 사용됩니다.
매개변수
매개변수 | |
---|---|
chronicle_soar |
ChronicleSOAR Google Security Operations SOAR SDK 객체입니다. |
search_term |
str 검색어입니다. 기본값은 |
page_size |
int 반환할 사용자 수입니다. 기본값은 |
filter_by_role |
bool 역할별로 필터링할지 여부를 정의합니다. 기본값은 |
filter_disabled_users |
bool 사용 중지된 사용자를 필터링할지 여부를 정의합니다. 기본값은 |
filter_support_users |
bool 지원 사용자를 필터링할지 여부를 정의합니다. 기본값은 |
fetch_only_support_users |
bool 지원 사용자만 반환할지 여부를 정의합니다. 기본값은 |
filter_permission_types |
list[int] | None 필터 권한 유형 목록입니다 (예: 기본값은 |
반환
모든 사용자의 목록입니다.
반환 유형
list[UserProfileCard]
TIPCommon.soar_ops.is_slo_comment
TIPCommon.soar_ops.is_slo_comment(comment: str)
댓글이 SLO 경고 댓글인지 확인합니다.
SLO 댓글은 SLO 경고 ('{int}일 후에 SLO가 위반됨') 또는 SLO 위반 메시지 ('SLO가 위반됨')입니다.
매개변수 | |
---|---|
comment |
str 확인할 댓글입니다. |
반환
True
(댓글이 SLO 댓글인 경우) 그렇지 않으면 False
이 반환됩니다.
반환 유형
bool
TIPCommon.soar_ops.remove_prefix_from_comments
TIPCommon.soar_ops.remove_prefix_from_comments(comments: list[str], prefix: str)
댓글 목록에서 접두사를 삭제합니다 (있는 경우).
매개변수 | |
---|---|
comments |
list[str] 접두사를 삭제할 댓글입니다. |
prefix |
str 삭제할 접두사입니다. |
반환
접두사가 삭제된 후의 모든 댓글 목록
반환 유형
list[str]
TIPCommon.soar_ops.save_file
TIPCommon.soar_ops.save_file(chronicle_soar: SiemplifyAction | SiemplifyConnectorExecution | SiemplifyJob, path: str, name: str, content: bytes)→ bytes | None
파일을 Google Cloud 버킷 또는 로컬 경로에 저장합니다.
매개변수
매개변수 | |
---|---|
chronicle_soar |
ChronicleSOAR Google Security Operations SOAR SDK 객체입니다. |
path |
str 파일을 저장해야 하는 폴더의 경로입니다. |
name |
str 저장할 파일 이름입니다. |
content |
bytes 파일 콘텐츠(바이트 형식)입니다. |
반환
다운로드한 파일의 경로입니다.
반환 유형
str | None
도움이 더 필요하신가요? 커뮤니티 회원 및 Google SecOps 전문가로부터 답변을 받으세요.