tcex 4.0.11.dev2__tar.gz → 5.0.0.dev0__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.11.dev2/tcex.egg-info → tcex-5.0.0.dev0}/PKG-INFO +3 -2
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/pyproject.toml +85 -17
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/__init__.py +1 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/__metadata__.py +1 -1
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/api.py +1 -6
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/tc.py +10 -10
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/ti_transform/__init__.py +0 -1
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/ti_transform/model/__init__.py +0 -1
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/ti_transform/model/transform_model.py +89 -30
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/ti_transform/ti_predefined_functions.py +33 -19
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/ti_transform/ti_transform.py +34 -30
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/ti_transform/transform_abc.py +171 -64
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/util/threat_intel_util.py +1 -4
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/__init__.py +0 -1
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/batch/__init__.py +0 -1
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/batch/attribute.py +0 -2
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/batch/batch.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/batch/batch_submit.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/batch/batch_writer.py +2 -5
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/batch/group.py +0 -2
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/batch/indicator.py +0 -2
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/batch/security_label.py +0 -1
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/batch/tag.py +0 -1
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/datastore/cache.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/datastore/datastore.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/metric/metric.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/notification/notification.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/adversary.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/attack_pattern.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/campaign.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/course_of_action.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/document.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/email.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/event.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/incident.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/intrusion_set.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/malware.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/report.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/signature.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/tactic.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/threat.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/tool.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/vulnerability.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/indicator/indicator.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/indicator/indicator_type/address.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/indicator/indicator_type/email_address.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/indicator/indicator_type/file.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/indicator/indicator_type/host.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/indicator/indicator_type/url.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/mapping.py +0 -4
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/owner.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/security_label.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/tag.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/tags.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/task.py +0 -2
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/victim.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/tcex_ti_tc_request.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/threat_intelligence.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/v2.py +0 -2
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/_gen/_gen.py +9 -6
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/_gen/_gen_abc.py +18 -6
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/_gen/_gen_args_abc.py +5 -6
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/_gen/_gen_filter_abc.py +92 -38
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/_gen/_gen_model_abc.py +127 -120
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/_gen/_gen_object_abc.py +7 -24
- tcex-4.0.11.dev2/tcex/api/tc/v3/_gen/_options_data_object.py → tcex-5.0.0.dev0/tcex/api/tc/v3/_gen/_options_data.py +16 -7
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/_gen/model/__init__.py +0 -1
- tcex-5.0.0.dev0/tcex/api/tc/v3/_gen/model/_extra_model.py +31 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/_gen/model/_filter_model.py +12 -15
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/_gen/model/_property_model.py +35 -52
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/api_endpoints.py +5 -6
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/artifact_types/artifact_type.py +0 -2
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/artifact_types/artifact_type_filter.py +0 -2
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/artifact_types/artifact_type_model.py +33 -34
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/artifacts/artifact.py +1 -27
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/artifacts/artifact_filter.py +5 -8
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/artifacts/artifact_model.py +105 -110
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/attribute_types/attribute_type.py +1 -13
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/attribute_types/attribute_type_filter.py +0 -2
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/attribute_types/attribute_type_model.py +36 -37
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/attributes/attribute_model.py +25 -23
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/case_attributes/case_attribute.py +1 -18
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/case_attributes/case_attribute_filter.py +1 -4
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/case_attributes/case_attribute_model.py +56 -59
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/case_management/case_management.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/cases/case.py +10 -42
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/cases/case_filter.py +7 -10
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/cases/case_model.py +161 -170
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/file_actions/file_action_model.py +19 -14
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/file_occurrences/file_occurrence_model.py +10 -13
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/filter_abc.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/group_attributes/group_attribute.py +1 -18
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/group_attributes/group_attribute_filter.py +2 -5
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/group_attributes/group_attribute_model.py +57 -65
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/groups/group.py +4 -64
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/groups/group_filter.py +10 -13
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/groups/group_model.py +242 -261
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/indicator_attributes/indicator_attribute.py +1 -18
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/indicator_attributes/indicator_attribute_filter.py +2 -5
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/indicator_attributes/indicator_attribute_model.py +57 -65
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/indicators/indicator.py +1 -68
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/indicators/indicator_filter.py +10 -13
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/indicators/indicator_model.py +255 -260
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/intel_requirement/ir.py +0 -2
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/intel_requirements/categories/category.py +1 -8
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/intel_requirements/categories/category_filter.py +0 -2
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/intel_requirements/categories/category_model.py +23 -24
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/intel_requirements/intel_req_type_model.py +5 -8
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/intel_requirements/intel_requirement.py +1 -30
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/intel_requirements/intel_requirement_filter.py +7 -10
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/intel_requirements/intel_requirement_model.py +108 -111
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/intel_requirements/keyword_sections/keyword_section_model.py +7 -12
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/intel_requirements/results/result.py +1 -9
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/intel_requirements/results/result_filter.py +1 -4
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/intel_requirements/results/result_model.py +66 -68
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/intel_requirements/subtypes/subtype.py +1 -8
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/intel_requirements/subtypes/subtype_filter.py +0 -2
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/intel_requirements/subtypes/subtype_model.py +23 -24
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/notes/note.py +1 -13
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/notes/note_filter.py +3 -6
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/notes/note_model.py +70 -80
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/object_abc.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/object_collection_abc.py +3 -3
- tcex-5.0.0.dev0/tcex/api/tc/v3/security/assignee_model.py +66 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/security/assignee_user_group_model.py +3 -6
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/security/assignee_user_model.py +5 -6
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/security/exclusion_lists/exclusion_list.py +1 -13
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/security/exclusion_lists/exclusion_list_filter.py +0 -2
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/security/exclusion_lists/exclusion_list_model.py +43 -44
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/security/owner_roles/owner_role.py +0 -2
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/security/owner_roles/owner_role_filter.py +0 -2
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/security/owner_roles/owner_role_model.py +44 -45
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/security/owners/owner.py +0 -2
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/security/owners/owner_filter.py +0 -2
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/security/owners/owner_model.py +95 -96
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/security/security.py +8 -10
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/security/system_roles/system_role.py +0 -2
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/security/system_roles/system_role_filter.py +0 -2
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/security/system_roles/system_role_model.py +32 -33
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/security/task_assignee_model.py +17 -16
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/security/user_groups/user_group.py +0 -2
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/security/user_groups/user_group_filter.py +0 -2
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/security/user_groups/user_group_model.py +28 -30
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/security/users/user.py +0 -2
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/security/users/user_filter.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/security/users/user_model.py +20 -21
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/security_labels/security_label.py +1 -10
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/security_labels/security_label_filter.py +3 -6
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/security_labels/security_label_model.py +32 -34
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/tags/mitre_tags.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/tags/naics_tags.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/tags/tag.py +1 -13
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/tags/tag_filter.py +4 -7
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/tags/tag_model.py +67 -75
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/tasks/task.py +10 -26
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/tasks/task_filter.py +3 -6
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/tasks/task_model.py +88 -98
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/threat_intelligence/threat_intelligence.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/tql/tql.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/tql/tql_operator.py +0 -1
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/tql/tql_type.py +0 -1
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/v3.py +0 -1
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/v3_model_abc.py +11 -14
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/v3_types.py +0 -2
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/victim_assets/victim_asset.py +1 -19
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/victim_assets/victim_asset_filter.py +3 -5
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/victim_assets/victim_asset_model.py +72 -68
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/victim_attributes/victim_attribute.py +1 -18
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/victim_attributes/victim_attribute_filter.py +2 -5
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/victim_attributes/victim_attribute_model.py +56 -59
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/victims/victim.py +1 -25
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/victims/victim_filter.py +7 -9
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/victims/victim_model.py +66 -74
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/workflow_events/workflow_event.py +1 -15
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/workflow_events/workflow_event_filter.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/workflow_events/workflow_event_model.py +60 -70
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/workflow_templates/workflow_template.py +1 -10
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/workflow_templates/workflow_template_filter.py +0 -2
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/workflow_templates/workflow_template_model.py +54 -61
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/app.py +0 -6
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/config/app_spec_yml.py +1 -5
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/config/install_json.py +2 -4
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/config/install_json_update.py +0 -2
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/config/install_json_validate.py +0 -1
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/config/job_json.py +0 -1
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/config/layout_json.py +4 -7
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/config/model/app_spec_yml_model.py +55 -79
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/config/model/install_json_model.py +69 -100
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/config/model/job_json_model.py +14 -36
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/config/model/layout_json_model.py +15 -38
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/config/model/tcex_json_model.py +9 -22
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/config/permutation.py +2 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/config/tcex_json.py +1 -2
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/config/tcex_json_update.py +1 -2
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/decorator/__init__.py +0 -1
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/decorator/benchmark.py +0 -5
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/decorator/debug.py +0 -5
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/decorator/fail_on_output.py +0 -5
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/decorator/on_exception.py +0 -5
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/decorator/on_success.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/decorator/output.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/service/__init__.py +0 -1
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/service/api_service.py +1 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/service/common_service.py +54 -18
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/service/common_service_trigger.py +4 -6
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/service/mqtt_message_broker.py +0 -4
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/service/webhook_trigger_service.py +3 -6
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/token/token.py +1 -4
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/exit/__init__.py +0 -1
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/exit/error_code.py +0 -2
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/exit/exit.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/field_type/__init__.py +0 -1
- tcex-5.0.0.dev0/tcex/input/field_type/binary.py +78 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/field_type/case_management_entity.py +10 -11
- tcex-5.0.0.dev0/tcex/input/field_type/choice.py +78 -0
- tcex-5.0.0.dev0/tcex/input/field_type/datetime.py +34 -0
- tcex-5.0.0.dev0/tcex/input/field_type/edit_choice.py +410 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/field_type/exception.py +2 -2
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/field_type/group_entity.py +10 -11
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/field_type/indicator_entity.py +10 -11
- tcex-5.0.0.dev0/tcex/input/field_type/integer.py +61 -0
- tcex-5.0.0.dev0/tcex/input/field_type/ip_address.py +71 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/field_type/key_value.py +9 -15
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/field_type/sensitive.py +55 -65
- tcex-5.0.0.dev0/tcex/input/field_type/string.py +86 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/field_type/tc_entity.py +8 -14
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/field_type/validator.py +34 -30
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/input.py +10 -22
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/model/advanced_request_model.py +35 -22
- tcex-5.0.0.dev0/tcex/input/model/api_model.py +104 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/model/app_api_service_model.py +0 -1
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/model/app_external_model.py +0 -1
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/model/app_feed_api_service_model.py +0 -1
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/model/app_organization_model.py +0 -1
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/model/app_playbook_model.py +0 -1
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/model/app_system_model.py +0 -1
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/model/app_trigger_service_model.py +0 -1
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/model/app_webhook_trigger_service_model.py +0 -1
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/model/batch_model.py +29 -18
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/model/cal_setting_model.py +13 -6
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/model/cert_model.py +10 -11
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/model/common_advanced_model.py +0 -1
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/model/common_model.py +0 -1
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/model/create_config_model.py +4 -10
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/model/logging_model.py +18 -13
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/model/model_map.py +0 -1
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/model/module_app_model.py +2 -7
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/model/module_requests_session_model.py +2 -7
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/model/organization_model.py +2 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/model/path_model.py +9 -11
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/model/playbook_common_model.py +15 -12
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/model/playbook_model.py +7 -8
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/model/proxy_model.py +12 -9
- tcex-5.0.0.dev0/tcex/input/model/service_model.py +71 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/model/smtp_setting_model.py +16 -13
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/logger/api_handler.py +0 -2
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/logger/cache_handler.py +0 -1
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/logger/logger.py +1 -4
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/logger/rotating_file_handler_custom.py +0 -1
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/logger/sensitive_filter.py +0 -1
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/logger/trace_logger.py +0 -1
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/registry.py +0 -2
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/requests_external/__init__.py +0 -1
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/requests_external/external_session.py +2 -5
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/requests_external/rate_limit_handler.py +0 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/requests_external/requests_external.py +0 -2
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/tcex.py +0 -2
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0/tcex.egg-info}/PKG-INFO +3 -2
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex.egg-info/SOURCES.txt +2 -3
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex.egg-info/requires.txt +2 -1
- tcex-4.0.11.dev2/tcex/api/tc/v3/_gen/_options_abc.py +0 -27
- tcex-4.0.11.dev2/tcex/api/tc/v3/_gen/_options_data_filter.py +0 -91
- tcex-4.0.11.dev2/tcex/api/tc/v3/security/assignee_model.py +0 -53
- tcex-4.0.11.dev2/tcex/input/field_type/binary.py +0 -85
- tcex-4.0.11.dev2/tcex/input/field_type/choice.py +0 -48
- tcex-4.0.11.dev2/tcex/input/field_type/datetime.py +0 -30
- tcex-4.0.11.dev2/tcex/input/field_type/edit_choice.py +0 -112
- tcex-4.0.11.dev2/tcex/input/field_type/integer.py +0 -92
- tcex-4.0.11.dev2/tcex/input/field_type/ip_address.py +0 -60
- tcex-4.0.11.dev2/tcex/input/field_type/string.py +0 -103
- tcex-4.0.11.dev2/tcex/input/model/api_model.py +0 -92
- tcex-4.0.11.dev2/tcex/input/model/service_model.py +0 -71
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/LICENSE +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/README.md +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/setup.cfg +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/util/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/batch/association.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/datastore/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/metric/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/notification/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/filters.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/group/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/indicator/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v2/threat_intelligence/mapping/indicator/indicator_type/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/_gen/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/adversary_assets/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/artifact_types/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/artifacts/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/attribute_types/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/attributes/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/case_attributes/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/case_management/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/cases/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/file_actions/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/file_occurrences/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/group_attributes/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/groups/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/indicator_attributes/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/indicators/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/intel_requirement/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/intel_requirements/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/intel_requirements/categories/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/intel_requirements/keyword_sections/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/intel_requirements/results/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/intel_requirements/subtypes/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/notes/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/security/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/security/exclusion_lists/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/security/owner_roles/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/security/owners/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/security/system_roles/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/security/user_groups/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/security/users/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/security_labels/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/tags/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/tags/default_naics_tags.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/tasks/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/threat_intelligence/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/tql/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/victim_assets/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/victim_attributes/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/victims/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/workflow_events/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/api/tc/v3/workflow_templates/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/config/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/config/model/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/key_value_store/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/key_value_store/key_value_abc.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/key_value_store/key_value_api.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/key_value_store/key_value_mock.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/key_value_store/key_value_redis.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/key_value_store/key_value_store.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/key_value_store/redis_client.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/key_value_store/redis_client_ssl.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/playbook/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/playbook/advanced_request.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/playbook/playbook.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/playbook/playbook_create.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/playbook/playbook_delete.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/playbook/playbook_output.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/playbook/playbook_read.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/app/token/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/input/model/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/logger/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/pleb/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/pleb/cached_property.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/pleb/event.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/pleb/exception_thread.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/pleb/jmespath_custom.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/pleb/none_model.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/pleb/proxies.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/pleb/scoped_property.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/pleb/singleton.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/requests_tc/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/requests_tc/auth/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/requests_tc/auth/hmac_auth.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/requests_tc/auth/tc_auth.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/requests_tc/auth/token_auth.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/requests_tc/requests_tc.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/requests_tc/tc_session.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/util/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/util/aes_operation.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/util/code_operation.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/util/datetime_operation.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/util/file_operation.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/util/model/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/util/model/playbook_variable_model.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/util/render/__init__.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/util/render/render.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/util/render/render_panel.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/util/render/render_prompt.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/util/render/render_table.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/util/requests_to_curl.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/util/string_operation.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/util/util.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex/util/variable.py +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex.egg-info/dependency_links.txt +0 -0
- {tcex-4.0.11.dev2 → tcex-5.0.0.dev0}/tcex.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tcex
|
|
3
|
-
Version:
|
|
3
|
+
Version: 5.0.0.dev0
|
|
4
4
|
Summary: ThreatConnect Exchange App Framework
|
|
5
5
|
Author-email: ThreatConnect <support@threatconnect.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -27,7 +27,8 @@ Requires-Dist: isort>=6.0.0
|
|
|
27
27
|
Requires-Dist: jmespath>=1.0.1
|
|
28
28
|
Requires-Dist: paho-mqtt<3.0.0
|
|
29
29
|
Requires-Dist: pyaes>=1.6.1
|
|
30
|
-
Requires-Dist: pydantic<
|
|
30
|
+
Requires-Dist: pydantic-core<3.0.0,>=2.10.0
|
|
31
|
+
Requires-Dist: pydantic<3.0.0,>=2.10.0
|
|
31
32
|
Requires-Dist: python-dateutil>=2.9.0.post0
|
|
32
33
|
Requires-Dist: pyyaml>=6.0.2
|
|
33
34
|
Requires-Dist: redis<5.0.0
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Specify the build backend for PEP 517 builds
|
|
2
2
|
[build-system]
|
|
3
3
|
build-backend = "setuptools.build_meta"
|
|
4
|
-
requires = ["setuptools>=61"]
|
|
4
|
+
requires = ["requests", "setuptools>=61"]
|
|
5
5
|
|
|
6
6
|
# Project metadata and configuration
|
|
7
7
|
[project]
|
|
@@ -31,7 +31,8 @@ dependencies = [
|
|
|
31
31
|
"jmespath>=1.0.1",
|
|
32
32
|
"paho-mqtt<3.0.0",
|
|
33
33
|
"pyaes>=1.6.1",
|
|
34
|
-
"pydantic
|
|
34
|
+
"pydantic-core>=2.10.0,<3.0.0",
|
|
35
|
+
"pydantic>=2.10.0,<3.0.0",
|
|
35
36
|
"python-dateutil>=2.9.0.post0",
|
|
36
37
|
"pyyaml>=6.0.2",
|
|
37
38
|
"redis<5.0.0",
|
|
@@ -78,6 +79,7 @@ dev = [
|
|
|
78
79
|
]
|
|
79
80
|
test = [
|
|
80
81
|
"deepdiff>=8.2.0",
|
|
82
|
+
"python-dotenv>=1.2.1",
|
|
81
83
|
"fakeredis>=2.27.0",
|
|
82
84
|
"pytest>=8.3.4",
|
|
83
85
|
"pytest-cov>=6.0.0",
|
|
@@ -99,6 +101,34 @@ exclude = ["tests*", "local-*"]
|
|
|
99
101
|
# Tool configurations
|
|
100
102
|
#
|
|
101
103
|
|
|
104
|
+
# This must remain while code_operations still uses isort directly.
|
|
105
|
+
[tool.isort]
|
|
106
|
+
dedup_headings = false
|
|
107
|
+
include_trailing_comma = true
|
|
108
|
+
known_first_party = ""
|
|
109
|
+
known_local_folder = "."
|
|
110
|
+
known_third_party = ""
|
|
111
|
+
line_length = 100
|
|
112
|
+
profile = "black"
|
|
113
|
+
|
|
114
|
+
[tool.uv.extra-build-dependencies]
|
|
115
|
+
tcex = [
|
|
116
|
+
"arrow>=1.3.0",
|
|
117
|
+
"black>=25.1.0",
|
|
118
|
+
"inflection>=0.5.1",
|
|
119
|
+
"jmespath>=1.0.1",
|
|
120
|
+
"paho-mqtt<2.0.0",
|
|
121
|
+
"pyaes>=1.6.1",
|
|
122
|
+
"pydantic>2.0.0",
|
|
123
|
+
"python-dateutil>=2.9.0.post0",
|
|
124
|
+
"pyyaml>=6.0.2",
|
|
125
|
+
"redis<5.0.0",
|
|
126
|
+
"requests>=2.32.3",
|
|
127
|
+
"rich>=13.9.4",
|
|
128
|
+
"semantic-version>=2.10.0",
|
|
129
|
+
"wrapt>=1.17.2",
|
|
130
|
+
]
|
|
131
|
+
|
|
102
132
|
# Configuration for bumpversion tool
|
|
103
133
|
[tool.bumpversion]
|
|
104
134
|
# Allow version bumping even if there are uncommitted changes
|
|
@@ -108,7 +138,7 @@ commit = false
|
|
|
108
138
|
# Additional arguments to pass to the git commit command
|
|
109
139
|
commit_args = "--no-verify"
|
|
110
140
|
# The current version of the project
|
|
111
|
-
current_version = "
|
|
141
|
+
current_version = "5.0.0-dev0"
|
|
112
142
|
# The commit message template used when committing version bumps
|
|
113
143
|
message = "Version updated from {current_version} to {new_version}"
|
|
114
144
|
# Regular expression for parsing version strings
|
|
@@ -149,19 +179,6 @@ filename = "tcex/__metadata__.py"
|
|
|
149
179
|
ignore-words-list = "ore"
|
|
150
180
|
skip = "*.cspell*,*.history,*local,uv.lock"
|
|
151
181
|
|
|
152
|
-
# Configuration for isort import sorter
|
|
153
|
-
[tool.isort]
|
|
154
|
-
dedup_headings = false
|
|
155
|
-
import_heading_firstparty = "first-party"
|
|
156
|
-
import_heading_stdlib = "standard library"
|
|
157
|
-
import_heading_thirdparty = "third-party"
|
|
158
|
-
include_trailing_comma = true
|
|
159
|
-
known_first_party = ""
|
|
160
|
-
known_local_folder = "."
|
|
161
|
-
known_third_party = ""
|
|
162
|
-
line_length = 100
|
|
163
|
-
profile = "black"
|
|
164
|
-
|
|
165
182
|
# Configuration for pyright type checker
|
|
166
183
|
[tool.pyright]
|
|
167
184
|
# https://github.com/microsoft/pyright/blob/main/docs/configuration.md#sample-pyprojecttoml-file
|
|
@@ -185,6 +202,8 @@ junit_family = "xunit2"
|
|
|
185
202
|
testpaths = [
|
|
186
203
|
"tests",
|
|
187
204
|
]
|
|
205
|
+
# Enable multiprocessing support for pytest
|
|
206
|
+
# addopts = "--numprocesses=auto --dist=loadgroup"
|
|
188
207
|
|
|
189
208
|
# Configuration for ruff linter and formatter
|
|
190
209
|
[tool.ruff]
|
|
@@ -240,7 +259,7 @@ ignore = [
|
|
|
240
259
|
"PLR0915", # Too many statements
|
|
241
260
|
"PT006", # Wrong name(s) type in ..., expected ...
|
|
242
261
|
"TC001", # Move application import ... into a type-checking block
|
|
243
|
-
"TC003", #
|
|
262
|
+
"TC003", # Move standard library import ... into a type-checking block
|
|
244
263
|
"TC006", # Checks for unquoted type expressions in typing.cast() calls.
|
|
245
264
|
"TID252", # Prefer absolute imports over relative imports from parent modules
|
|
246
265
|
]
|
|
@@ -306,8 +325,57 @@ select = [
|
|
|
306
325
|
[tool.ruff.lint.extend-per-file-ignores]
|
|
307
326
|
"__init__.py" = ["F401"]
|
|
308
327
|
|
|
328
|
+
[tool.ruff.lint.isort]
|
|
329
|
+
# Define a default section for any imports that don't fit into the specified section-order.
|
|
330
|
+
default-section = "first-party"
|
|
331
|
+
|
|
332
|
+
# A list of modules to consider standard-library, in addition to those known to Ruff in advance
|
|
333
|
+
extra-standard-library = []
|
|
334
|
+
|
|
335
|
+
# Map known_first_party to known-first-party
|
|
336
|
+
known-first-party = ["tcex"]
|
|
337
|
+
|
|
338
|
+
# Map known_local_folder to known-local-folder
|
|
339
|
+
known-local-folder = ["."]
|
|
340
|
+
|
|
341
|
+
# Map known_third_party to known-third-party
|
|
342
|
+
known-third-party = [
|
|
343
|
+
"arrow",
|
|
344
|
+
"cryptography",
|
|
345
|
+
"dotenv",
|
|
346
|
+
"pydantic",
|
|
347
|
+
"pydantic_core",
|
|
348
|
+
"pydantic_settings",
|
|
349
|
+
"pytest",
|
|
350
|
+
"redis",
|
|
351
|
+
"requests",
|
|
352
|
+
"semantic_version",
|
|
353
|
+
]
|
|
354
|
+
|
|
355
|
+
# Override in which order the sections should be output. Can be used to move custom sections.
|
|
356
|
+
section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"]
|
|
357
|
+
|
|
358
|
+
# Equivalent to include_trailing_comma = true
|
|
359
|
+
split-on-trailing-comma = true
|
|
360
|
+
|
|
309
361
|
# Pydocstyle configuration for ruff linter
|
|
310
362
|
[tool.ruff.lint.pydocstyle]
|
|
311
363
|
# https://docs.astral.sh/ruff/linter/
|
|
312
364
|
|
|
313
365
|
convention = "google"
|
|
366
|
+
|
|
367
|
+
[tool.cibuildwheel]
|
|
368
|
+
# You can also put cibuildwheel config here instead of env vars
|
|
369
|
+
build = "cp38-* cp39-* cp310-* cp311-* cp312-*"
|
|
370
|
+
skip = "*-win32 *-manylinux_i686 *-musllinux_i686 pp*"
|
|
371
|
+
|
|
372
|
+
[tool.cibuildwheel.linux]
|
|
373
|
+
before-build = "pip install -U pip setuptools wheel"
|
|
374
|
+
repair-wheel-command = "auditwheel repair -w {dest_dir} {wheel}"
|
|
375
|
+
|
|
376
|
+
[tool.cibuildwheel.macos]
|
|
377
|
+
before-build = "pip install -U pip setuptools wheel"
|
|
378
|
+
repair-wheel-command = "delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"
|
|
379
|
+
|
|
380
|
+
[tool.cibuildwheel.windows]
|
|
381
|
+
before-build = "pip install -U pip setuptools wheel"
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"""TcEx Framework Module"""
|
|
2
2
|
|
|
3
|
-
# standard library
|
|
4
3
|
import contextlib
|
|
5
4
|
import logging
|
|
6
5
|
|
|
7
|
-
# first-party
|
|
8
6
|
from tcex.__metadata__ import __license__, __version__
|
|
9
7
|
from tcex.logger.cache_handler import CacheHandler
|
|
10
8
|
from tcex.logger.trace_logger import TraceLogger
|
|
@@ -33,6 +31,6 @@ def initialize_logger():
|
|
|
33
31
|
# init logger before instantiating tcex
|
|
34
32
|
initialize_logger()
|
|
35
33
|
|
|
34
|
+
|
|
36
35
|
with contextlib.suppress(ImportError):
|
|
37
|
-
# first-party
|
|
38
36
|
from tcex.tcex import TcEx
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"""TcEx Framework Module"""
|
|
2
2
|
|
|
3
|
-
# third-party
|
|
4
3
|
from requests import Session # TYPE-CHECKING
|
|
5
4
|
|
|
6
|
-
# first-party
|
|
7
5
|
from tcex.api.tc.tc import TC
|
|
8
6
|
from tcex.input.input import Input # TYPE-CHECKING
|
|
9
7
|
from tcex.pleb.cached_property import cached_property
|
|
@@ -24,8 +22,5 @@ class API:
|
|
|
24
22
|
|
|
25
23
|
@cached_property
|
|
26
24
|
def tc(self) -> TC:
|
|
27
|
-
"""Return a
|
|
28
|
-
|
|
29
|
-
TC is a top-level class for accessing the ThreatConnect API.
|
|
30
|
-
"""
|
|
25
|
+
"""Return a case management instance."""
|
|
31
26
|
return TC(self.inputs, self.session_tc)
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"""TcEx Framework Module"""
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
from requests import Session # TYPE-CHECKING
|
|
3
|
+
from requests import Session
|
|
5
4
|
|
|
6
|
-
# first-party
|
|
7
5
|
from tcex.api.tc.ti_transform import TiTransform, TiTransforms
|
|
8
6
|
from tcex.api.tc.ti_transform.model import GroupTransformModel, IndicatorTransformModel
|
|
7
|
+
from tcex.api.tc.ti_transform.model.transform_model import AssociationTransformModel
|
|
9
8
|
from tcex.api.tc.util.threat_intel_util import ThreatIntelUtil
|
|
10
9
|
from tcex.api.tc.v2.v2 import V2
|
|
11
10
|
from tcex.api.tc.v3.v3 import V3
|
|
@@ -26,6 +25,11 @@ class TC:
|
|
|
26
25
|
self.inputs = inputs
|
|
27
26
|
self.session_tc = session_tc
|
|
28
27
|
|
|
28
|
+
@staticmethod
|
|
29
|
+
def association_transform(transform: dict) -> AssociationTransformModel:
|
|
30
|
+
"""Return a association transform model."""
|
|
31
|
+
return AssociationTransformModel(**transform)
|
|
32
|
+
|
|
29
33
|
@staticmethod
|
|
30
34
|
def group_transform(transform: dict) -> GroupTransformModel:
|
|
31
35
|
"""Return a group transform model."""
|
|
@@ -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,14 +51,10 @@ class TC:
|
|
|
47
51
|
@staticmethod
|
|
48
52
|
def ti_transforms(
|
|
49
53
|
ti_dict: list[dict],
|
|
50
|
-
transforms: list[GroupTransformModel | IndicatorTransformModel],
|
|
51
|
-
*,
|
|
52
|
-
seperate_batch_associations: bool = False,
|
|
54
|
+
transforms: list[AssociationTransformModel | GroupTransformModel | IndicatorTransformModel],
|
|
53
55
|
) -> TiTransforms:
|
|
54
56
|
"""Return an instance of TI Transforms class."""
|
|
55
|
-
return TiTransforms(
|
|
56
|
-
ti_dict, transforms, seperate_batch_associations=seperate_batch_associations
|
|
57
|
-
)
|
|
57
|
+
return TiTransforms(ti_dict, transforms)
|
|
58
58
|
|
|
59
59
|
@cached_property
|
|
60
60
|
def utils(self) -> ThreatIntelUtil:
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"""Model Definition"""
|
|
2
2
|
|
|
3
|
-
# standard library
|
|
4
3
|
from collections.abc import Callable
|
|
4
|
+
from typing import Annotated, Any, TypeAlias
|
|
5
|
+
|
|
6
|
+
from pydantic import BaseModel, Discriminator, Field, Tag, field_validator, model_validator
|
|
5
7
|
|
|
6
|
-
# third-party
|
|
7
8
|
from jmespath import compile as jmespath_compile
|
|
8
|
-
from pydantic import BaseModel, Extra, Field, root_validator, validator
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
# reusable validator
|
|
@@ -16,14 +16,14 @@ def _always_array(value: list | str) -> list[str]:
|
|
|
16
16
|
return value
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
class PredefinedFunctionModel(BaseModel, extra=
|
|
19
|
+
class PredefinedFunctionModel(BaseModel, extra='forbid'):
|
|
20
20
|
"""Model Definitions"""
|
|
21
21
|
|
|
22
22
|
name: str = Field(..., description='The name of the static method.')
|
|
23
23
|
params: dict | None = Field({}, description='The parameters for the static method.')
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
class TransformModel(BaseModel, extra=
|
|
26
|
+
class TransformModel(BaseModel, extra='forbid'):
|
|
27
27
|
"""Model Definition"""
|
|
28
28
|
|
|
29
29
|
filter_map: dict | None = Field(None, description='')
|
|
@@ -32,7 +32,7 @@ class TransformModel(BaseModel, extra=Extra.forbid):
|
|
|
32
32
|
for_each: Callable | PredefinedFunctionModel | None = Field(None, description='')
|
|
33
33
|
static_map: dict | None = Field(None, description='')
|
|
34
34
|
|
|
35
|
-
@
|
|
35
|
+
@field_validator('filter_map', 'static_map', mode='before')
|
|
36
36
|
@classmethod
|
|
37
37
|
def _lower_map_keys(cls, v):
|
|
38
38
|
"""Validate static_map."""
|
|
@@ -41,7 +41,7 @@ class TransformModel(BaseModel, extra=Extra.forbid):
|
|
|
41
41
|
return v
|
|
42
42
|
|
|
43
43
|
# root validator that ensure at least one indicator value/summary is set
|
|
44
|
-
@
|
|
44
|
+
@model_validator(mode='before')
|
|
45
45
|
@classmethod
|
|
46
46
|
def _required_transform(cls, v: dict):
|
|
47
47
|
"""Validate either static_map or method is defined."""
|
|
@@ -58,13 +58,13 @@ class TransformModel(BaseModel, extra=Extra.forbid):
|
|
|
58
58
|
return v
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
class PathTransformModel(BaseModel, extra=
|
|
61
|
+
class PathTransformModel(BaseModel, extra='forbid'):
|
|
62
62
|
"""."""
|
|
63
63
|
|
|
64
|
-
default: str | None = Field(None, description='')
|
|
64
|
+
default: int | str | None = Field(None, description='')
|
|
65
65
|
path: str | None = Field(None, description='')
|
|
66
66
|
|
|
67
|
-
@
|
|
67
|
+
@field_validator('path')
|
|
68
68
|
@classmethod
|
|
69
69
|
def _validate_path(cls, v):
|
|
70
70
|
"""Validate path."""
|
|
@@ -77,7 +77,7 @@ class PathTransformModel(BaseModel, extra=Extra.forbid):
|
|
|
77
77
|
return v
|
|
78
78
|
|
|
79
79
|
# root validator that ensure at least one indicator value/summary is set
|
|
80
|
-
@
|
|
80
|
+
@model_validator(mode='before')
|
|
81
81
|
@classmethod
|
|
82
82
|
def _default_or_path(cls, values):
|
|
83
83
|
"""Validate either default or path is defined."""
|
|
@@ -87,22 +87,22 @@ class PathTransformModel(BaseModel, extra=Extra.forbid):
|
|
|
87
87
|
return values
|
|
88
88
|
|
|
89
89
|
|
|
90
|
-
class MetadataTransformModel(PathTransformModel, extra=
|
|
90
|
+
class MetadataTransformModel(PathTransformModel, extra='forbid'):
|
|
91
91
|
"""."""
|
|
92
92
|
|
|
93
93
|
transform: list[TransformModel] | None = Field(None, description='')
|
|
94
94
|
|
|
95
95
|
# validators
|
|
96
|
-
_transform_array =
|
|
96
|
+
_transform_array = field_validator('transform', mode='before')(_always_array)
|
|
97
97
|
|
|
98
98
|
|
|
99
|
-
class ValueTransformModel(BaseModel, extra=
|
|
99
|
+
class ValueTransformModel(BaseModel, extra='forbid'):
|
|
100
100
|
"""."""
|
|
101
101
|
|
|
102
102
|
value: str | MetadataTransformModel
|
|
103
103
|
|
|
104
104
|
|
|
105
|
-
class FileOccurrenceTransformModel(BaseModel, extra=
|
|
105
|
+
class FileOccurrenceTransformModel(BaseModel, extra='forbid'):
|
|
106
106
|
"""."""
|
|
107
107
|
|
|
108
108
|
file_name: str | MetadataTransformModel | None = Field(None, description='')
|
|
@@ -110,22 +110,22 @@ class FileOccurrenceTransformModel(BaseModel, extra=Extra.forbid):
|
|
|
110
110
|
date: str | MetadataTransformModel | None = Field(None, description='')
|
|
111
111
|
|
|
112
112
|
|
|
113
|
-
class DatetimeTransformModel(PathTransformModel, extra=
|
|
113
|
+
class DatetimeTransformModel(PathTransformModel, extra='forbid'):
|
|
114
114
|
"""."""
|
|
115
115
|
|
|
116
116
|
|
|
117
|
-
class AssociatedGroupTransform(ValueTransformModel, extra=
|
|
117
|
+
class AssociatedGroupTransform(ValueTransformModel, extra='forbid'):
|
|
118
118
|
"""."""
|
|
119
119
|
|
|
120
120
|
|
|
121
|
-
class AssociatedIndicatorFromGroupTransform(BaseModel, extra=
|
|
121
|
+
class AssociatedIndicatorFromGroupTransform(BaseModel, extra='forbid'):
|
|
122
122
|
"""."""
|
|
123
123
|
|
|
124
124
|
summary: str | MetadataTransformModel = Field(..., description='')
|
|
125
125
|
indicator_type: str | MetadataTransformModel = Field(..., description='')
|
|
126
126
|
|
|
127
127
|
|
|
128
|
-
class AssociatedIndicatorFromIndicatorTransform(BaseModel, extra=
|
|
128
|
+
class AssociatedIndicatorFromIndicatorTransform(BaseModel, extra='forbid'):
|
|
129
129
|
"""."""
|
|
130
130
|
|
|
131
131
|
summary: str | MetadataTransformModel = Field(..., description='')
|
|
@@ -133,7 +133,7 @@ class AssociatedIndicatorFromIndicatorTransform(BaseModel, extra=Extra.forbid):
|
|
|
133
133
|
association_type: str | MetadataTransformModel = Field(..., description='')
|
|
134
134
|
|
|
135
135
|
|
|
136
|
-
class AttributeTransformModel(ValueTransformModel, extra=
|
|
136
|
+
class AttributeTransformModel(ValueTransformModel, extra='forbid'):
|
|
137
137
|
"""."""
|
|
138
138
|
|
|
139
139
|
displayed: bool | MetadataTransformModel = Field(default=False, description='')
|
|
@@ -142,18 +142,18 @@ class AttributeTransformModel(ValueTransformModel, extra=Extra.forbid):
|
|
|
142
142
|
pinned: bool | MetadataTransformModel = Field(default=False, description='')
|
|
143
143
|
|
|
144
144
|
|
|
145
|
-
class SecurityLabelTransformModel(ValueTransformModel, extra=
|
|
145
|
+
class SecurityLabelTransformModel(ValueTransformModel, extra='forbid'):
|
|
146
146
|
"""."""
|
|
147
147
|
|
|
148
148
|
color: MetadataTransformModel | None = Field(None, description='')
|
|
149
149
|
description: MetadataTransformModel | None = Field(None, description='')
|
|
150
150
|
|
|
151
151
|
|
|
152
|
-
class TagTransformModel(ValueTransformModel, extra=
|
|
152
|
+
class TagTransformModel(ValueTransformModel, extra='forbid'):
|
|
153
153
|
"""."""
|
|
154
154
|
|
|
155
155
|
|
|
156
|
-
class TiTransformModel(BaseModel, extra=
|
|
156
|
+
class TiTransformModel(BaseModel, extra='forbid'):
|
|
157
157
|
"""."""
|
|
158
158
|
|
|
159
159
|
applies: Callable | None = Field(None, description='')
|
|
@@ -172,7 +172,7 @@ class TiTransformModel(BaseModel, extra=Extra.forbid):
|
|
|
172
172
|
xid: MetadataTransformModel | None = Field(None, description='')
|
|
173
173
|
|
|
174
174
|
|
|
175
|
-
class GroupTransformModel(TiTransformModel, extra=
|
|
175
|
+
class GroupTransformModel(TiTransformModel, extra='forbid'):
|
|
176
176
|
"""."""
|
|
177
177
|
|
|
178
178
|
associated_indicators: list[AssociatedIndicatorFromGroupTransform] = Field([], description='')
|
|
@@ -202,7 +202,7 @@ class GroupTransformModel(TiTransformModel, extra=Extra.forbid):
|
|
|
202
202
|
severity: MetadataTransformModel | None = Field(None, description='')
|
|
203
203
|
|
|
204
204
|
|
|
205
|
-
class IndicatorTransformModel(TiTransformModel, extra=
|
|
205
|
+
class IndicatorTransformModel(TiTransformModel, extra='forbid'):
|
|
206
206
|
"""."""
|
|
207
207
|
|
|
208
208
|
associated_indicators: list[AssociatedIndicatorFromIndicatorTransform] = Field(
|
|
@@ -223,10 +223,10 @@ class IndicatorTransformModel(TiTransformModel, extra=Extra.forbid):
|
|
|
223
223
|
active: MetadataTransformModel | None = Field(None, description='')
|
|
224
224
|
|
|
225
225
|
# root validator that ensure at least one indicator value/summary is set
|
|
226
|
-
@
|
|
226
|
+
@model_validator(mode='before')
|
|
227
227
|
@classmethod
|
|
228
228
|
def _one_indicator_value(cls, values):
|
|
229
|
-
"""Validate that one
|
|
229
|
+
"""Validate that at least one indicator value is provided."""
|
|
230
230
|
|
|
231
231
|
if not any(
|
|
232
232
|
[
|
|
@@ -235,8 +235,67 @@ class IndicatorTransformModel(TiTransformModel, extra=Extra.forbid):
|
|
|
235
235
|
values.get('value3'),
|
|
236
236
|
]
|
|
237
237
|
):
|
|
238
|
-
ex_msg = (
|
|
239
|
-
'An indicator transform must be defined (e.g., summary, value1, value2, value3).'
|
|
240
|
-
)
|
|
238
|
+
ex_msg = 'An indicator transform must be defined (e.g., value1, value2, value3).'
|
|
241
239
|
raise ValueError(ex_msg)
|
|
242
240
|
return values
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
class GroupToGroupAssociation(BaseModel, extra='forbid'):
|
|
244
|
+
"""."""
|
|
245
|
+
|
|
246
|
+
xid_1: MetadataTransformModel = Field(..., description='')
|
|
247
|
+
xid_2: MetadataTransformModel = Field(..., description='')
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
class GroupToIndicatorAssociation(BaseModel, 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='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
|
+
def get_association_discriminator(v: Any) -> str:
|
|
269
|
+
"""Return the association type discriminator value."""
|
|
270
|
+
if isinstance(v, BaseModel):
|
|
271
|
+
return v.__class__.__name__
|
|
272
|
+
|
|
273
|
+
if 'xid_1' in v and 'xid_2' in v:
|
|
274
|
+
return GroupToGroupAssociation.__name__
|
|
275
|
+
if 'xid' in v and 'indicator_value' in v and 'indicator_type' in v:
|
|
276
|
+
return GroupToIndicatorAssociation.__name__
|
|
277
|
+
if (
|
|
278
|
+
'indicator_value_1' in v
|
|
279
|
+
and 'indicator_type_1' in v
|
|
280
|
+
and 'indicator_value_2' in v
|
|
281
|
+
and 'indicator_type_2' in v
|
|
282
|
+
and 'custom_association_type' in v
|
|
283
|
+
):
|
|
284
|
+
return IndicatorToIndicatorAssociation.__name__
|
|
285
|
+
msg = f'Could not determine association type for {v}.'
|
|
286
|
+
raise ValueError(msg)
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
AssociationTypes: TypeAlias = Annotated[
|
|
290
|
+
Annotated[GroupToGroupAssociation, Tag(GroupToGroupAssociation.__name__)]
|
|
291
|
+
| Annotated[GroupToIndicatorAssociation, Tag(GroupToIndicatorAssociation.__name__)]
|
|
292
|
+
| Annotated[IndicatorToIndicatorAssociation, Tag(IndicatorToIndicatorAssociation.__name__)],
|
|
293
|
+
Discriminator(get_association_discriminator),
|
|
294
|
+
]
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
class AssociationTransformModel(BaseModel, extra='forbid'):
|
|
298
|
+
"""."""
|
|
299
|
+
|
|
300
|
+
applies: Callable | None = Field(None, description='')
|
|
301
|
+
associations: list[AssociationTypes] = Field(default_factory=list, description='')
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
"""TcEx Framework Module"""
|
|
2
2
|
|
|
3
|
-
# standard library
|
|
4
3
|
import hashlib
|
|
5
4
|
import json
|
|
6
5
|
import uuid
|
|
7
6
|
from collections.abc import Iterable
|
|
8
7
|
from inspect import _empty, signature
|
|
9
|
-
from typing import TypedDict
|
|
8
|
+
from typing import TYPE_CHECKING, TypedDict
|
|
10
9
|
|
|
11
|
-
# first-party
|
|
12
10
|
from tcex.api.tc.ti_transform.model.transform_model import (
|
|
13
11
|
GroupTransformModel,
|
|
14
12
|
IndicatorTransformModel,
|
|
15
13
|
)
|
|
16
14
|
|
|
15
|
+
if TYPE_CHECKING:
|
|
16
|
+
from tcex import TcEx
|
|
17
|
+
|
|
17
18
|
|
|
18
19
|
class TransformBuilderExport(TypedDict):
|
|
19
20
|
"""Basic definition of a transform exported from Transform Builder."""
|
|
@@ -98,9 +99,9 @@ def custom_function_definition(definition: FunctionDefinition):
|
|
|
98
99
|
class ProcessingFunctions:
|
|
99
100
|
"""Predefined functions to use in transforms."""
|
|
100
101
|
|
|
101
|
-
def __init__(self, tcex) -> None:
|
|
102
|
+
def __init__(self, tcex: 'TcEx') -> None:
|
|
102
103
|
"""."""
|
|
103
|
-
self.tcex = tcex
|
|
104
|
+
self.tcex: TcEx = tcex
|
|
104
105
|
self.custom_fns = {}
|
|
105
106
|
|
|
106
107
|
@custom_function_definition(
|
|
@@ -132,20 +133,9 @@ class ProcessingFunctions:
|
|
|
132
133
|
"""Allow for custom processing to be described."""
|
|
133
134
|
fn = self.custom_fns.get(name.lower())
|
|
134
135
|
if not fn:
|
|
135
|
-
ex_msg = f'Custom function not implemented: {
|
|
136
|
-
ex_msg += f'\ncustom_fns: {self.custom_fns}'
|
|
136
|
+
ex_msg = f'Custom function not implemented: {description}'
|
|
137
137
|
raise NotImplementedError(ex_msg)
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
# Build params dynamically based on the function signature
|
|
141
|
-
all_args = {'ti_dict': ti_dict, 'transform': transform, **kwargs}
|
|
142
|
-
sig_params = signature(fn).parameters
|
|
143
|
-
|
|
144
|
-
# Only pass arguments that the function accepts
|
|
145
|
-
filtered_args = {
|
|
146
|
-
k: v for k, v in all_args.items() if k in sig_params or 'kwargs' in sig_params
|
|
147
|
-
}
|
|
148
|
-
return fn(value, **filtered_args)
|
|
138
|
+
return fn(value, ti_dict=ti_dict, transform=transform, **kwargs)
|
|
149
139
|
|
|
150
140
|
def static_map(self, value, mapping: dict):
|
|
151
141
|
"""Map values to static values.
|
|
@@ -156,6 +146,22 @@ class ProcessingFunctions:
|
|
|
156
146
|
mapping = json.loads(mapping)
|
|
157
147
|
return mapping.get(str(value), value)
|
|
158
148
|
|
|
149
|
+
def deduplicate_array(self, value: list) -> list:
|
|
150
|
+
"""Remove duplicate values from an array."""
|
|
151
|
+
return list(set(value))
|
|
152
|
+
|
|
153
|
+
def slice_array(self, value: list, start: int = 0, end: int | None = None) -> list:
|
|
154
|
+
"""Slice an array."""
|
|
155
|
+
return value[start:end]
|
|
156
|
+
|
|
157
|
+
def remove_trailing_whitespace(self, value: str) -> str:
|
|
158
|
+
"""Remove trailing whitespace from a string."""
|
|
159
|
+
return value.rstrip()
|
|
160
|
+
|
|
161
|
+
def remove_leading_whitespace(self, value: str) -> str:
|
|
162
|
+
"""Remove leading whitespace from a string."""
|
|
163
|
+
return value.lstrip()
|
|
164
|
+
|
|
159
165
|
def value_in(self, value, values: str, delimiter: str = ','):
|
|
160
166
|
"""Return the value if it is in the list of values, else return None."""
|
|
161
167
|
if not values.startswith('"'):
|
|
@@ -183,6 +189,14 @@ class ProcessingFunctions:
|
|
|
183
189
|
|
|
184
190
|
return table
|
|
185
191
|
|
|
192
|
+
def defang(self, value: str) -> str:
|
|
193
|
+
"""Defangs URLs, IPs, and common indicators to make them inert."""
|
|
194
|
+
return self.tcex.util.defang(value)
|
|
195
|
+
|
|
196
|
+
def refang(self, value: str) -> str:
|
|
197
|
+
"""Refangs URLs, IPs, and common indicators to make them active."""
|
|
198
|
+
return self.tcex.util.refang(value)
|
|
199
|
+
|
|
186
200
|
def any_to_datetime(self, value):
|
|
187
201
|
"""Convert any value to a datetime object."""
|
|
188
202
|
return self.tcex.util.any_to_datetime(value).isoformat()
|
|
@@ -279,7 +293,7 @@ class ProcessingFunctions:
|
|
|
279
293
|
api_def['kwargs'][kwarg]
|
|
280
294
|
)
|
|
281
295
|
except Exception as ex:
|
|
282
|
-
#
|
|
296
|
+
# import here to avoid circular import
|
|
283
297
|
from tcex.api.tc.ti_transform import TransformException # noqa: PLC0415
|
|
284
298
|
|
|
285
299
|
ex_msg = f'{context}{additional_context}'
|