tcex 4.0.9.dev0__tar.gz → 4.0.11__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.
- {tcex-4.0.9.dev0/tcex.egg-info → tcex-4.0.11}/PKG-INFO +16 -16
- {tcex-4.0.9.dev0 → tcex-4.0.11}/pyproject.toml +38 -37
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/__init__.py +0 -2
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/__metadata__.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/tc.py +9 -5
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/ti_transform/model/__init__.py +1 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/ti_transform/model/transform_model.py +86 -4
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/ti_transform/ti_predefined_functions.py +55 -8
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/ti_transform/ti_transform.py +127 -23
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/ti_transform/transform_abc.py +162 -56
- tcex-4.0.11/tcex/api/tc/ti_transform/transform_builder/__init__.py +32 -0
- tcex-4.0.11/tcex/api/tc/ti_transform/transform_builder/v2/__init__.py +3 -0
- tcex-4.0.11/tcex/api/tc/ti_transform/transform_builder/v2/errors.py +42 -0
- tcex-4.0.11/tcex/api/tc/ti_transform/transform_builder/v2/load_transform.py +336 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/util/threat_intel_util.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/batch/__init__.py +2 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/batch/batch.py +94 -88
- tcex-4.0.11/tcex/api/tc/v2/batch/batch_cleaner.py +451 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/batch/batch_submit.py +62 -2
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/batch/batch_writer.py +30 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/email.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/_gen/_gen.py +3 -3
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/_gen/_gen_abc.py +4 -3
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/_gen/_gen_args_abc.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/_gen/_gen_filter_abc.py +25 -13
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/_gen/_gen_model_abc.py +3 -5
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/_gen/_gen_object_abc.py +54 -14
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/_gen/_options_data_object.py +3 -6
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/_gen/model/_filter_model.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/_gen/model/_property_model.py +2 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/artifact_types/artifact_type.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/artifact_types/artifact_type_model.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/artifacts/artifact.py +4 -4
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/artifacts/artifact_filter.py +5 -5
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/artifacts/artifact_model.py +7 -7
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/attribute_types/attribute_type.py +11 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/attribute_types/attribute_type_model.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/case_attributes/case_attribute.py +2 -2
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/case_attributes/case_attribute_filter.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/case_attributes/case_attribute_model.py +10 -3
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/cases/case.py +19 -11
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/cases/case_filter.py +13 -13
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/cases/case_model.py +14 -14
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/file_occurrences/file_occurrence_model.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/group_attributes/group_attribute.py +2 -2
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/group_attributes/group_attribute_filter.py +4 -2
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/group_attributes/group_attribute_model.py +11 -4
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/groups/group.py +11 -9
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/groups/group_filter.py +120 -29
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/groups/group_model.py +31 -13
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/indicator_attributes/indicator_attribute.py +2 -2
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/indicator_attributes/indicator_attribute_filter.py +4 -2
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/indicator_attributes/indicator_attribute_model.py +11 -4
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/indicators/indicator.py +10 -8
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/indicators/indicator_filter.py +35 -15
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/indicators/indicator_model.py +17 -10
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/intel_requirements/categories/category.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/intel_requirements/categories/category_model.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/intel_requirements/intel_requirement.py +12 -9
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/intel_requirements/intel_requirement_filter.py +14 -12
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/intel_requirements/intel_requirement_model.py +31 -10
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/intel_requirements/results/result.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/intel_requirements/results/result_filter.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/intel_requirements/results/result_model.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/intel_requirements/subtypes/subtype.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/intel_requirements/subtypes/subtype_model.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/notes/note.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/notes/note_filter.py +3 -3
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/notes/note_model.py +5 -5
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/object_abc.py +13 -2
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/object_collection_abc.py +8 -7
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/security/exclusion_lists/exclusion_list.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/security/exclusion_lists/exclusion_list_model.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/security/owner_roles/owner_role.py +11 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/security/owner_roles/owner_role_model.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/security/owners/owner.py +9 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/security/owners/owner_model.py +1 -8
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/security/system_roles/system_role.py +11 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/security/system_roles/system_role_model.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/security/task_assignee_model.py +3 -3
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/security/user_groups/user_group.py +11 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/security/user_groups/user_group_model.py +2 -2
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/security/users/user.py +11 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/security/users/user_model.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/security_labels/security_label.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/security_labels/security_label_filter.py +3 -3
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/security_labels/security_label_model.py +1 -1
- tcex-4.0.11/tcex/api/tc/v3/tags/mitre_tags.py +160 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/tags/naics_tags.py +11 -3
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/tags/tag.py +3 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/tags/tag_filter.py +55 -4
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/tags/tag_model.py +14 -5
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/tasks/task.py +13 -5
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/tasks/task_filter.py +4 -4
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/tasks/task_model.py +5 -5
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/threat_intelligence/threat_intelligence.py +6 -18
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/v3_model_abc.py +13 -13
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/victim_assets/victim_asset.py +2 -2
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/victim_assets/victim_asset_filter.py +3 -3
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/victim_assets/victim_asset_model.py +2 -2
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/victim_attributes/victim_attribute.py +2 -2
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/victim_attributes/victim_attribute_filter.py +4 -2
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/victim_attributes/victim_attribute_model.py +10 -3
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/victims/victim.py +8 -6
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/victims/victim_filter.py +18 -12
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/victims/victim_model.py +6 -6
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/workflow_events/workflow_event.py +2 -2
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/workflow_events/workflow_event_model.py +4 -4
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/workflow_templates/workflow_template.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/workflow_templates/workflow_template_model.py +3 -3
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/app.py +11 -3
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/config/app_spec_yml.py +6 -2
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/config/install_json.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/config/install_json_update.py +3 -3
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/config/install_json_validate.py +2 -2
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/config/layout_json.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/config/model/app_spec_yml_model.py +15 -9
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/config/model/install_json_model.py +22 -21
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/config/model/job_json_model.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/config/permutation.py +10 -10
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/decorator/benchmark.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/key_value_store/__init__.py +0 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/key_value_store/key_value_abc.py +0 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/key_value_store/key_value_api.py +0 -2
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/key_value_store/key_value_mock.py +0 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/key_value_store/key_value_redis.py +3 -4
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/key_value_store/key_value_store.py +3 -7
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/key_value_store/redis_client.py +0 -2
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/key_value_store/redis_client_ssl.py +0 -2
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/playbook/advanced_request.py +6 -5
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/playbook/playbook.py +0 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/playbook/playbook_create.py +31 -18
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/playbook/playbook_delete.py +0 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/playbook/playbook_output.py +0 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/playbook/playbook_read.py +2 -3
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/service/common_service.py +1 -2
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/service/common_service_trigger.py +2 -2
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/service/mqtt_message_broker.py +41 -34
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/service/webhook_trigger_service.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/token/__init__.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/token/token.py +2 -2
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/field_type/datetime.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/field_type/edit_choice.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/field_type/key_value.py +3 -3
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/field_type/string.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/field_type/validator.py +8 -2
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/input.py +20 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/logger/api_handler.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/pleb/cached_property.py +3 -3
- tcex-4.0.11/tcex/pleb/cached_property_filesystem.py +275 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/pleb/event.py +0 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/pleb/exception_thread.py +0 -1
- tcex-4.0.11/tcex/pleb/jmespath_custom.py +66 -0
- tcex-4.0.11/tcex/pleb/jmespath_functions_array_mixin.py +665 -0
- tcex-4.0.11/tcex/pleb/jmespath_functions_base.py +43 -0
- tcex-4.0.11/tcex/pleb/jmespath_functions_control_mixin.py +91 -0
- tcex-4.0.11/tcex/pleb/jmespath_functions_crypto_mixin.py +65 -0
- tcex-4.0.11/tcex/pleb/jmespath_functions_datetime_mixin.py +130 -0
- tcex-4.0.11/tcex/pleb/jmespath_functions_math_mixin.py +236 -0
- tcex-4.0.11/tcex/pleb/jmespath_functions_object_mixin.py +253 -0
- tcex-4.0.11/tcex/pleb/jmespath_functions_string_mixin.py +602 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/pleb/proxies.py +2 -3
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/pleb/scoped_property.py +0 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/pleb/singleton.py +0 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/registry.py +1 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/requests_external/external_session.py +8 -4
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/requests_tc/auth/hmac_auth.py +6 -3
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/requests_tc/auth/tc_auth.py +2 -3
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/requests_tc/auth/token_auth.py +6 -3
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/requests_tc/requests_tc.py +5 -4
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/requests_tc/tc_session.py +13 -15
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/util/aes_operation.py +2 -4
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/util/code_operation.py +22 -7
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/util/datetime_operation.py +2 -3
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/util/file_operation.py +0 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/util/model/playbook_variable_model.py +0 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/util/render/render.py +0 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/util/render/render_panel.py +0 -2
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/util/render/render_prompt.py +0 -2
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/util/render/render_table.py +0 -2
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/util/requests_to_curl.py +6 -6
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/util/string_operation.py +47 -4
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/util/util.py +0 -1
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/util/variable.py +7 -4
- {tcex-4.0.9.dev0 → tcex-4.0.11/tcex.egg-info}/PKG-INFO +16 -16
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex.egg-info/SOURCES.txt +14 -2
- tcex-4.0.11/tcex.egg-info/requires.txt +15 -0
- tcex-4.0.9.dev0/tcex/api/tc/v3/tags/mitre_tags.py +0 -79
- tcex-4.0.9.dev0/tcex/logger/local-rotating_file_handler_custom.py +0 -113
- tcex-4.0.9.dev0/tcex/pleb/env_path.py +0 -56
- tcex-4.0.9.dev0/tcex/pleb/jmespath_custom.py +0 -355
- tcex-4.0.9.dev0/tcex.egg-info/requires.txt +0 -15
- {tcex-4.0.9.dev0 → tcex-4.0.11}/LICENSE +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/README.md +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/setup.cfg +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/api.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/ti_transform/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/util/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/batch/association.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/batch/attribute.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/batch/group.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/batch/indicator.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/batch/security_label.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/batch/tag.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/datastore/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/datastore/cache.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/datastore/datastore.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/metric/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/metric/metric.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/notification/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/notification/notification.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/filters.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/group/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/group/group.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/adversary.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/attack_pattern.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/campaign.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/course_of_action.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/document.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/event.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/incident.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/intrusion_set.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/malware.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/report.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/signature.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/tactic.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/threat.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/tool.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/vulnerability.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/indicator/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/indicator/indicator.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/indicator/indicator_type/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/indicator/indicator_type/address.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/indicator/indicator_type/email_address.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/indicator/indicator_type/file.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/indicator/indicator_type/host.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/indicator/indicator_type/url.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/mapping.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/owner.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/security_label.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/tag.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/tags.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/task.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/mapping/victim.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/tcex_ti_tc_request.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/threat_intelligence/threat_intelligence.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v2/v2.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/_gen/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/_gen/_options_abc.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/_gen/_options_data_filter.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/_gen/model/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/adversary_assets/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/api_endpoints.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/artifact_types/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/artifact_types/artifact_type_filter.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/artifacts/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/attribute_types/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/attribute_types/attribute_type_filter.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/attributes/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/attributes/attribute_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/case_attributes/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/case_management/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/case_management/case_management.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/cases/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/file_actions/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/file_actions/file_action_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/file_occurrences/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/filter_abc.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/group_attributes/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/groups/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/indicator_attributes/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/indicators/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/intel_requirement/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/intel_requirement/ir.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/intel_requirements/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/intel_requirements/categories/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/intel_requirements/categories/category_filter.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/intel_requirements/intel_req_type_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/intel_requirements/keyword_sections/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/intel_requirements/keyword_sections/keyword_section_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/intel_requirements/results/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/intel_requirements/subtypes/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/intel_requirements/subtypes/subtype_filter.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/notes/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/security/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/security/assignee_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/security/assignee_user_group_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/security/assignee_user_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/security/exclusion_lists/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/security/exclusion_lists/exclusion_list_filter.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/security/owner_roles/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/security/owner_roles/owner_role_filter.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/security/owners/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/security/owners/owner_filter.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/security/security.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/security/system_roles/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/security/system_roles/system_role_filter.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/security/user_groups/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/security/user_groups/user_group_filter.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/security/users/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/security/users/user_filter.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/security_labels/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/tags/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/tags/default_naics_tags.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/tasks/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/threat_intelligence/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/tql/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/tql/tql.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/tql/tql_operator.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/tql/tql_type.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/v3.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/v3_types.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/victim_assets/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/victim_attributes/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/victims/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/workflow_events/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/workflow_events/workflow_event_filter.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/workflow_templates/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/api/tc/v3/workflow_templates/workflow_template_filter.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/config/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/config/job_json.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/config/model/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/config/model/layout_json_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/config/model/tcex_json_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/config/tcex_json.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/config/tcex_json_update.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/decorator/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/decorator/debug.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/decorator/fail_on_output.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/decorator/on_exception.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/decorator/on_success.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/decorator/output.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/playbook/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/service/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/app/service/api_service.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/exit/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/exit/error_code.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/exit/exit.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/field_type/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/field_type/binary.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/field_type/case_management_entity.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/field_type/choice.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/field_type/exception.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/field_type/group_entity.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/field_type/indicator_entity.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/field_type/integer.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/field_type/ip_address.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/field_type/sensitive.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/field_type/tc_entity.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/model/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/model/advanced_request_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/model/api_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/model/app_api_service_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/model/app_external_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/model/app_feed_api_service_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/model/app_organization_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/model/app_playbook_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/model/app_system_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/model/app_trigger_service_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/model/app_webhook_trigger_service_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/model/batch_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/model/cal_setting_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/model/cert_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/model/common_advanced_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/model/common_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/model/create_config_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/model/logging_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/model/model_map.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/model/module_app_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/model/module_requests_session_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/model/organization_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/model/path_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/model/playbook_common_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/model/playbook_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/model/proxy_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/model/service_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/input/model/smtp_setting_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/logger/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/logger/cache_handler.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/logger/logger.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/logger/rotating_file_handler_custom.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/logger/sensitive_filter.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/logger/trace_logger.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/pleb/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/pleb/none_model.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/requests_external/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/requests_external/rate_limit_handler.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/requests_external/requests_external.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/requests_tc/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/requests_tc/auth/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/tcex.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/util/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/util/model/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex/util/render/__init__.py +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex.egg-info/dependency_links.txt +0 -0
- {tcex-4.0.9.dev0 → tcex-4.0.11}/tcex.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tcex
|
|
3
|
-
Version: 4.0.
|
|
3
|
+
Version: 4.0.11
|
|
4
4
|
Summary: ThreatConnect Exchange App Framework
|
|
5
5
|
Author-email: ThreatConnect <support@threatconnect.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -20,21 +20,21 @@ Classifier: Topic :: Security
|
|
|
20
20
|
Requires-Python: >=3.11
|
|
21
21
|
Description-Content-Type: text/markdown
|
|
22
22
|
License-File: LICENSE
|
|
23
|
-
Requires-Dist: arrow
|
|
24
|
-
Requires-Dist: black
|
|
25
|
-
Requires-Dist: inflection
|
|
26
|
-
Requires-Dist: isort
|
|
27
|
-
Requires-Dist: jmespath
|
|
28
|
-
Requires-Dist: paho-mqtt
|
|
29
|
-
Requires-Dist: pyaes
|
|
30
|
-
Requires-Dist: pydantic
|
|
31
|
-
Requires-Dist: python-dateutil
|
|
32
|
-
Requires-Dist: pyyaml
|
|
33
|
-
Requires-Dist: redis
|
|
34
|
-
Requires-Dist: requests
|
|
35
|
-
Requires-Dist: rich
|
|
36
|
-
Requires-Dist: semantic-version
|
|
37
|
-
Requires-Dist: wrapt
|
|
23
|
+
Requires-Dist: arrow~=1.4.0
|
|
24
|
+
Requires-Dist: black~=26.5.1
|
|
25
|
+
Requires-Dist: inflection~=0.5.1
|
|
26
|
+
Requires-Dist: isort~=8.0.1
|
|
27
|
+
Requires-Dist: jmespath~=1.1.0
|
|
28
|
+
Requires-Dist: paho-mqtt~=2.1.0
|
|
29
|
+
Requires-Dist: pyaes~=1.6.1
|
|
30
|
+
Requires-Dist: pydantic~=1.10.26
|
|
31
|
+
Requires-Dist: python-dateutil~=2.9.0.post0
|
|
32
|
+
Requires-Dist: pyyaml~=6.0.3
|
|
33
|
+
Requires-Dist: redis~=8.0.0
|
|
34
|
+
Requires-Dist: requests~=2.34.2
|
|
35
|
+
Requires-Dist: rich~=15.0.0
|
|
36
|
+
Requires-Dist: semantic-version~=2.10.0
|
|
37
|
+
Requires-Dist: wrapt~=2.2.1
|
|
38
38
|
Dynamic: license-file
|
|
39
39
|
|
|
40
40
|
# tcex - ThreatConnect Exchange App Framework
|
|
@@ -24,21 +24,21 @@ classifiers = [
|
|
|
24
24
|
|
|
25
25
|
# List of runtime dependencies
|
|
26
26
|
dependencies = [
|
|
27
|
-
"arrow
|
|
28
|
-
"black
|
|
29
|
-
"inflection
|
|
30
|
-
"isort
|
|
31
|
-
"jmespath
|
|
32
|
-
"paho-mqtt
|
|
33
|
-
"pyaes
|
|
34
|
-
"pydantic
|
|
35
|
-
"python-dateutil
|
|
36
|
-
"pyyaml
|
|
37
|
-
"redis
|
|
38
|
-
"requests
|
|
39
|
-
"rich
|
|
40
|
-
"semantic-version
|
|
41
|
-
"wrapt
|
|
27
|
+
"arrow~=1.4.0",
|
|
28
|
+
"black~=26.5.1",
|
|
29
|
+
"inflection~=0.5.1",
|
|
30
|
+
"isort~=8.0.1",
|
|
31
|
+
"jmespath~=1.1.0",
|
|
32
|
+
"paho-mqtt~=2.1.0",
|
|
33
|
+
"pyaes~=1.6.1",
|
|
34
|
+
"pydantic~=1.10.26",
|
|
35
|
+
"python-dateutil~=2.9.0.post0",
|
|
36
|
+
"pyyaml~=6.0.3",
|
|
37
|
+
"redis~=8.0.0",
|
|
38
|
+
"requests~=2.34.2",
|
|
39
|
+
"rich~=15.0.0",
|
|
40
|
+
"semantic-version~=2.10.0",
|
|
41
|
+
"wrapt~=2.2.1",
|
|
42
42
|
]
|
|
43
43
|
|
|
44
44
|
# Short description of the project
|
|
@@ -69,21 +69,21 @@ Source = "https://github.com/ThreatConnect-Inc/tcex"
|
|
|
69
69
|
# Dependency groups for development and testing
|
|
70
70
|
[dependency-groups]
|
|
71
71
|
dev = [
|
|
72
|
-
"bandit>=1.
|
|
73
|
-
"pre-commit>=4.
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"typer>=0.
|
|
72
|
+
"bandit>=1.9.4",
|
|
73
|
+
"pre-commit>=4.6.0",
|
|
74
|
+
"pyupgrade>=3.21.2",
|
|
75
|
+
"ruff>=0.15.16",
|
|
76
|
+
"ty==0.0.51",
|
|
77
|
+
"typer>=0.26.7",
|
|
78
78
|
]
|
|
79
79
|
test = [
|
|
80
|
-
"deepdiff>=
|
|
81
|
-
"fakeredis>=2.
|
|
82
|
-
"pytest>=
|
|
83
|
-
"pytest-cov>=
|
|
84
|
-
"pytest-html>=4.
|
|
80
|
+
"deepdiff>=9.1.0",
|
|
81
|
+
"fakeredis>=2.36.0",
|
|
82
|
+
"pytest>=9.0.3",
|
|
83
|
+
"pytest-cov>=7.1.0",
|
|
84
|
+
"pytest-html>=4.2.0",
|
|
85
85
|
"pytest-ordering>=0.6",
|
|
86
|
-
"pytest-xdist>=3.
|
|
86
|
+
"pytest-xdist>=3.8.0",
|
|
87
87
|
]
|
|
88
88
|
|
|
89
89
|
# Dynamic configuration for setuptools
|
|
@@ -108,7 +108,7 @@ commit = false
|
|
|
108
108
|
# Additional arguments to pass to the git commit command
|
|
109
109
|
commit_args = "--no-verify"
|
|
110
110
|
# The current version of the project
|
|
111
|
-
current_version = "4.0.
|
|
111
|
+
current_version = "4.0.11"
|
|
112
112
|
# The commit message template used when committing version bumps
|
|
113
113
|
message = "Version updated from {current_version} to {new_version}"
|
|
114
114
|
# Regular expression for parsing version strings
|
|
@@ -147,7 +147,7 @@ filename = "tcex/__metadata__.py"
|
|
|
147
147
|
[tool.codespell]
|
|
148
148
|
# https://streetsidesoftware.com/vscode-spell-checker/
|
|
149
149
|
ignore-words-list = "ore"
|
|
150
|
-
skip = "*.cspell*,*.history,*local,uv.lock"
|
|
150
|
+
skip = "*.cspell*,*.history,*local,uv.lock,*enforce_us_spelling.sh"
|
|
151
151
|
|
|
152
152
|
# Configuration for isort import sorter
|
|
153
153
|
[tool.isort]
|
|
@@ -162,9 +162,13 @@ known_third_party = ""
|
|
|
162
162
|
line_length = 100
|
|
163
163
|
profile = "black"
|
|
164
164
|
|
|
165
|
-
# Configuration for
|
|
166
|
-
|
|
167
|
-
|
|
165
|
+
# Configuration for ty type checker
|
|
166
|
+
# https://docs.astral.sh/ty/reference/configuration/
|
|
167
|
+
[tool.ty.environment]
|
|
168
|
+
python-platform = "linux"
|
|
169
|
+
python-version = "3.11"
|
|
170
|
+
|
|
171
|
+
[tool.ty.src]
|
|
168
172
|
exclude = [
|
|
169
173
|
"**/.history",
|
|
170
174
|
"**/__pycache__",
|
|
@@ -172,14 +176,10 @@ exclude = [
|
|
|
172
176
|
"tcex/api/tc/v2",
|
|
173
177
|
"tests",
|
|
174
178
|
]
|
|
175
|
-
pythonPlatform = "Linux"
|
|
176
|
-
pythonVersion = "3.11"
|
|
177
|
-
reportIncompatibleMethodOverride = false
|
|
178
|
-
reportIncompatibleVariableOverride = false
|
|
179
|
-
reportPrivateImportUsage = false
|
|
180
179
|
|
|
181
180
|
# Configuration for pytest test runner
|
|
182
181
|
[tool.pytest.ini_options]
|
|
182
|
+
addopts = "-n auto"
|
|
183
183
|
filterwarnings = []
|
|
184
184
|
junit_family = "xunit2"
|
|
185
185
|
testpaths = [
|
|
@@ -240,6 +240,7 @@ ignore = [
|
|
|
240
240
|
"PLR0915", # Too many statements
|
|
241
241
|
"PT006", # Wrong name(s) type in ..., expected ...
|
|
242
242
|
"TC001", # Move application import ... into a type-checking block
|
|
243
|
+
"TC003", # Use `if TYPE_CHECKING:` for imports only used for type checking
|
|
243
244
|
"TC006", # Checks for unquoted type expressions in typing.cast() calls.
|
|
244
245
|
"TID252", # Prefer absolute imports over relative imports from parent modules
|
|
245
246
|
]
|
|
@@ -5,7 +5,11 @@ from requests import Session # TYPE-CHECKING
|
|
|
5
5
|
|
|
6
6
|
# first-party
|
|
7
7
|
from tcex.api.tc.ti_transform import TiTransform, TiTransforms
|
|
8
|
-
from tcex.api.tc.ti_transform.model import
|
|
8
|
+
from tcex.api.tc.ti_transform.model import (
|
|
9
|
+
AssociationTransformModel,
|
|
10
|
+
GroupTransformModel,
|
|
11
|
+
IndicatorTransformModel,
|
|
12
|
+
)
|
|
9
13
|
from tcex.api.tc.util.threat_intel_util import ThreatIntelUtil
|
|
10
14
|
from tcex.api.tc.v2.v2 import V2
|
|
11
15
|
from tcex.api.tc.v3.v3 import V3
|
|
@@ -39,7 +43,7 @@ class TC:
|
|
|
39
43
|
@staticmethod
|
|
40
44
|
def ti_transform(
|
|
41
45
|
ti_dict: dict,
|
|
42
|
-
transforms: list[GroupTransformModel | IndicatorTransformModel],
|
|
46
|
+
transforms: list[AssociationTransformModel | GroupTransformModel | IndicatorTransformModel],
|
|
43
47
|
) -> TiTransform:
|
|
44
48
|
"""Return an instance of TI Transform class."""
|
|
45
49
|
return TiTransform(ti_dict, transforms)
|
|
@@ -47,13 +51,13 @@ class TC:
|
|
|
47
51
|
@staticmethod
|
|
48
52
|
def ti_transforms(
|
|
49
53
|
ti_dict: list[dict],
|
|
50
|
-
transforms: list[GroupTransformModel | IndicatorTransformModel],
|
|
54
|
+
transforms: list[AssociationTransformModel | GroupTransformModel | IndicatorTransformModel],
|
|
51
55
|
*,
|
|
52
|
-
|
|
56
|
+
separate_batch_associations: bool = False,
|
|
53
57
|
) -> TiTransforms:
|
|
54
58
|
"""Return an instance of TI Transforms class."""
|
|
55
59
|
return TiTransforms(
|
|
56
|
-
ti_dict, transforms,
|
|
60
|
+
ti_dict, transforms, separate_batch_associations=separate_batch_associations
|
|
57
61
|
)
|
|
58
62
|
|
|
59
63
|
@cached_property
|
|
@@ -129,7 +129,7 @@ class AssociatedIndicatorFromIndicatorTransform(BaseModel, extra=Extra.forbid):
|
|
|
129
129
|
"""."""
|
|
130
130
|
|
|
131
131
|
summary: str | MetadataTransformModel = Field(..., description='')
|
|
132
|
-
|
|
132
|
+
indicator_type: str | MetadataTransformModel = Field(..., description='')
|
|
133
133
|
association_type: str | MetadataTransformModel = Field(..., description='')
|
|
134
134
|
|
|
135
135
|
|
|
@@ -198,6 +198,8 @@ class GroupTransformModel(TiTransformModel, extra=Extra.forbid):
|
|
|
198
198
|
file_text: MetadataTransformModel | None = Field(None, description='')
|
|
199
199
|
# document, signature
|
|
200
200
|
file_name: MetadataTransformModel | None = Field(None, description='')
|
|
201
|
+
# Case
|
|
202
|
+
severity: MetadataTransformModel | None = Field(None, description='')
|
|
201
203
|
|
|
202
204
|
|
|
203
205
|
class IndicatorTransformModel(TiTransformModel, extra=Extra.forbid):
|
|
@@ -233,8 +235,88 @@ class IndicatorTransformModel(TiTransformModel, extra=Extra.forbid):
|
|
|
233
235
|
values.get('value3'),
|
|
234
236
|
]
|
|
235
237
|
):
|
|
236
|
-
ex_msg = (
|
|
237
|
-
|
|
238
|
-
|
|
238
|
+
ex_msg = 'An indicator transform must be defined (e.g., value1, value2, value3).'
|
|
239
|
+
raise ValueError(ex_msg)
|
|
240
|
+
return values
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
class GroupToGroupAssociation(BaseModel, extra=Extra.forbid):
|
|
244
|
+
"""."""
|
|
245
|
+
|
|
246
|
+
xid_1: MetadataTransformModel = Field(..., description='')
|
|
247
|
+
xid_2: MetadataTransformModel = Field(..., description='')
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
class GroupToIndicatorAssociation(BaseModel, extra=Extra.forbid):
|
|
251
|
+
"""."""
|
|
252
|
+
|
|
253
|
+
xid: MetadataTransformModel = Field(..., description='')
|
|
254
|
+
indicator_value: MetadataTransformModel = Field(..., description='')
|
|
255
|
+
indicator_type: MetadataTransformModel = Field(..., description='')
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
class IndicatorToIndicatorAssociation(BaseModel, extra=Extra.forbid):
|
|
259
|
+
"""."""
|
|
260
|
+
|
|
261
|
+
indicator_value_1: MetadataTransformModel = Field(..., description='')
|
|
262
|
+
indicator_type_1: MetadataTransformModel = Field(..., description='')
|
|
263
|
+
indicator_value_2: MetadataTransformModel = Field(..., description='')
|
|
264
|
+
indicator_type_2: MetadataTransformModel = Field(..., description='')
|
|
265
|
+
custom_association_type: MetadataTransformModel = Field(..., description='')
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
class AssociationTransformModel(BaseModel, extra='forbid'):
|
|
269
|
+
"""."""
|
|
270
|
+
|
|
271
|
+
applies: Callable | None = Field(None, description='')
|
|
272
|
+
associations: list[
|
|
273
|
+
GroupToGroupAssociation | GroupToIndicatorAssociation | IndicatorToIndicatorAssociation
|
|
274
|
+
] = Field(default_factory=list, description='')
|
|
275
|
+
|
|
276
|
+
# root validator to handle union of types in associations list
|
|
277
|
+
@root_validator(pre=True)
|
|
278
|
+
@classmethod
|
|
279
|
+
def _one_indicator_value(cls, values):
|
|
280
|
+
"""Validate that one set of credentials is provided for the TC API."""
|
|
281
|
+
association_types = {
|
|
282
|
+
GroupToGroupAssociation,
|
|
283
|
+
GroupToIndicatorAssociation,
|
|
284
|
+
IndicatorToIndicatorAssociation,
|
|
285
|
+
}
|
|
286
|
+
if associations := values.get('associations'):
|
|
287
|
+
validated_associations = []
|
|
288
|
+
for association in associations:
|
|
289
|
+
match association:
|
|
290
|
+
case (
|
|
291
|
+
GroupToGroupAssociation()
|
|
292
|
+
| GroupToIndicatorAssociation()
|
|
293
|
+
| IndicatorToIndicatorAssociation()
|
|
294
|
+
):
|
|
295
|
+
validated_associations.append(association)
|
|
296
|
+
case dict():
|
|
297
|
+
for association_type in association_types:
|
|
298
|
+
try:
|
|
299
|
+
validated_association = association_type(**association)
|
|
300
|
+
validated_associations.append(validated_association)
|
|
301
|
+
break
|
|
302
|
+
except Exception:
|
|
303
|
+
continue # nosec
|
|
304
|
+
else:
|
|
305
|
+
ex_msg = (
|
|
306
|
+
'Association must be one of the following types: '
|
|
307
|
+
f'{association_types}.'
|
|
308
|
+
)
|
|
309
|
+
raise ValueError(ex_msg)
|
|
310
|
+
|
|
311
|
+
case _:
|
|
312
|
+
ex_msg = (
|
|
313
|
+
f'Association must be one of the following types: {association_types}.'
|
|
314
|
+
)
|
|
315
|
+
raise ValueError(ex_msg)
|
|
316
|
+
|
|
317
|
+
values['associations'] = validated_associations
|
|
318
|
+
|
|
319
|
+
else:
|
|
320
|
+
ex_msg = 'At least one association must be defined.'
|
|
239
321
|
raise ValueError(ex_msg)
|
|
240
322
|
return values
|
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
import hashlib
|
|
5
5
|
import json
|
|
6
6
|
import uuid
|
|
7
|
+
import warnings
|
|
7
8
|
from collections.abc import Iterable
|
|
8
9
|
from inspect import _empty, signature
|
|
9
|
-
from typing import TypedDict
|
|
10
|
+
from typing import TYPE_CHECKING, TypedDict
|
|
10
11
|
|
|
11
12
|
# first-party
|
|
12
13
|
from tcex.api.tc.ti_transform.model.transform_model import (
|
|
@@ -14,6 +15,10 @@ from tcex.api.tc.ti_transform.model.transform_model import (
|
|
|
14
15
|
IndicatorTransformModel,
|
|
15
16
|
)
|
|
16
17
|
|
|
18
|
+
if TYPE_CHECKING:
|
|
19
|
+
# first-party
|
|
20
|
+
from tcex import TcEx
|
|
21
|
+
|
|
17
22
|
|
|
18
23
|
class TransformBuilderExport(TypedDict):
|
|
19
24
|
"""Basic definition of a transform exported from Transform Builder."""
|
|
@@ -23,10 +28,18 @@ class TransformBuilderExport(TypedDict):
|
|
|
23
28
|
|
|
24
29
|
|
|
25
30
|
def transform_builder_to_model(
|
|
26
|
-
transform: TransformBuilderExport,
|
|
27
|
-
processing_functions: 'ProcessingFunctions',
|
|
31
|
+
transform: TransformBuilderExport, processing_functions: 'ProcessingFunctions', **_kwargs
|
|
28
32
|
) -> IndicatorTransformModel | GroupTransformModel:
|
|
29
33
|
"""Convert a transform from Transform Builder to one of the tcex transform models."""
|
|
34
|
+
if not _kwargs.get('internal_call'):
|
|
35
|
+
warnings.warn(
|
|
36
|
+
(
|
|
37
|
+
'Use of transform_builder_to_model will be deprecated in tcex5. instead, use '
|
|
38
|
+
'tcex.api.tc.ti_transform.transform_builder.load'
|
|
39
|
+
),
|
|
40
|
+
PendingDeprecationWarning,
|
|
41
|
+
stacklevel=2,
|
|
42
|
+
)
|
|
30
43
|
|
|
31
44
|
def find_entries(data, key, context='') -> Iterable[tuple[str, dict]]:
|
|
32
45
|
"""Find entries in a dict with a given name, regardless of depth."""
|
|
@@ -98,9 +111,9 @@ def custom_function_definition(definition: FunctionDefinition):
|
|
|
98
111
|
class ProcessingFunctions:
|
|
99
112
|
"""Predefined functions to use in transforms."""
|
|
100
113
|
|
|
101
|
-
def __init__(self, tcex) -> None:
|
|
114
|
+
def __init__(self, tcex: 'TcEx') -> None:
|
|
102
115
|
"""."""
|
|
103
|
-
self.tcex = tcex
|
|
116
|
+
self.tcex: TcEx = tcex
|
|
104
117
|
self.custom_fns = {}
|
|
105
118
|
|
|
106
119
|
@custom_function_definition(
|
|
@@ -145,6 +158,22 @@ class ProcessingFunctions:
|
|
|
145
158
|
mapping = json.loads(mapping)
|
|
146
159
|
return mapping.get(str(value), value)
|
|
147
160
|
|
|
161
|
+
def deduplicate_array(self, value: list) -> list:
|
|
162
|
+
"""Remove duplicate values from an array."""
|
|
163
|
+
return list(set(value))
|
|
164
|
+
|
|
165
|
+
def slice_array(self, value: list, start: int = 0, end: int | None = None) -> list:
|
|
166
|
+
"""Slice an array."""
|
|
167
|
+
return value[start:end]
|
|
168
|
+
|
|
169
|
+
def remove_trailing_whitespace(self, value: str) -> str:
|
|
170
|
+
"""Remove trailing whitespace from a string."""
|
|
171
|
+
return value.rstrip()
|
|
172
|
+
|
|
173
|
+
def remove_leading_whitespace(self, value: str) -> str:
|
|
174
|
+
"""Remove leading whitespace from a string."""
|
|
175
|
+
return value.lstrip()
|
|
176
|
+
|
|
148
177
|
def value_in(self, value, values: str, delimiter: str = ','):
|
|
149
178
|
"""Return the value if it is in the list of values, else return None."""
|
|
150
179
|
if not values.startswith('"'):
|
|
@@ -172,6 +201,14 @@ class ProcessingFunctions:
|
|
|
172
201
|
|
|
173
202
|
return table
|
|
174
203
|
|
|
204
|
+
def defang(self, value: str) -> str:
|
|
205
|
+
"""Defangs URLs, IPs, and common indicators to make them inert."""
|
|
206
|
+
return self.tcex.util.defang(value)
|
|
207
|
+
|
|
208
|
+
def refang(self, value: str) -> str:
|
|
209
|
+
"""Refangs URLs, IPs, and common indicators to make them active."""
|
|
210
|
+
return self.tcex.util.refang(value)
|
|
211
|
+
|
|
175
212
|
def any_to_datetime(self, value):
|
|
176
213
|
"""Convert any value to a datetime object."""
|
|
177
214
|
return self.tcex.util.any_to_datetime(value).isoformat()
|
|
@@ -268,8 +305,9 @@ class ProcessingFunctions:
|
|
|
268
305
|
api_def['kwargs'][kwarg]
|
|
269
306
|
)
|
|
270
307
|
except Exception as ex:
|
|
308
|
+
# import here to avoid circular import
|
|
271
309
|
# first-party
|
|
272
|
-
from tcex.api.tc.ti_transform import TransformException
|
|
310
|
+
from tcex.api.tc.ti_transform import TransformException # noqa: PLC0415
|
|
273
311
|
|
|
274
312
|
ex_msg = f'{context}{additional_context}'
|
|
275
313
|
raise TransformException(ex_msg, ex, context=api_def) from ex
|
|
@@ -308,6 +346,15 @@ class ProcessingFunctions:
|
|
|
308
346
|
def _snake_to_titlecase(name):
|
|
309
347
|
return name.replace('_', ' ').title()
|
|
310
348
|
|
|
349
|
+
@staticmethod
|
|
350
|
+
def _get_type_string_from_annotation(annotation) -> str:
|
|
351
|
+
"""Get a string representation of a type annotation."""
|
|
352
|
+
if annotation is None:
|
|
353
|
+
return 'str'
|
|
354
|
+
if hasattr(annotation, '__name__'):
|
|
355
|
+
return annotation.__name__
|
|
356
|
+
return str(annotation)
|
|
357
|
+
|
|
311
358
|
@staticmethod
|
|
312
359
|
def _get_params_defs(fn) -> list[ParamDefinition]:
|
|
313
360
|
"""Get the arguments for a function.
|
|
@@ -327,8 +374,8 @@ class ProcessingFunctions:
|
|
|
327
374
|
),
|
|
328
375
|
'name': p,
|
|
329
376
|
'label': ProcessingFunctions._snake_to_titlecase(p),
|
|
330
|
-
'type': (
|
|
331
|
-
sig.parameters[p].annotation
|
|
377
|
+
'type': ProcessingFunctions._get_type_string_from_annotation(
|
|
378
|
+
sig.parameters[p].annotation
|
|
332
379
|
),
|
|
333
380
|
'help': '',
|
|
334
381
|
'required': True,
|