tcex 5.0.0.dev1__tar.gz → 5.0.0.dev3__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-5.0.0.dev1/tcex.egg-info → tcex-5.0.0.dev3}/PKG-INFO +1 -1
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/pyproject.toml +5 -22
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/__metadata__.py +1 -1
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/ti_transform/__init__.py +1 -5
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/ti_transform/model/transform_model.py +2 -3
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/ti_transform/ti_predefined_functions.py +23 -7
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/ti_transform/transform_abc.py +6 -2
- tcex-5.0.0.dev3/tcex/api/tc/ti_transform/transform_builder/__init__.py +30 -0
- tcex-5.0.0.dev3/tcex/api/tc/ti_transform/transform_builder/v2/__init__.py +3 -0
- tcex-5.0.0.dev3/tcex/api/tc/ti_transform/transform_builder/v2/errors.py +36 -0
- tcex-5.0.0.dev3/tcex/api/tc/ti_transform/transform_builder/v2/load_transform.py +319 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/_gen/_gen.py +4 -3
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/_gen/_gen_args_abc.py +1 -1
- tcex-5.0.0.dev3/tcex/api/tc/v3/_gen/_options_abc.py +26 -0
- tcex-5.0.0.dev3/tcex/api/tc/v3/_gen/_options_data_filter.py +88 -0
- tcex-5.0.0.dev3/tcex/api/tc/v3/_gen/_options_data_object.py +382 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/security/task_assignee_model.py +2 -2
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/config/model/install_json_model.py +3 -3
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/decorator/benchmark.py +1 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/decorator/debug.py +1 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/decorator/fail_on_output.py +1 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/decorator/on_exception.py +1 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/playbook/playbook_create.py +21 -12
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/service/mqtt_message_broker.py +1 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/field_type/binary.py +1 -1
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/pleb/cached_property_filesystem.py +3 -4
- tcex-5.0.0.dev3/tcex/pleb/jmespath_custom.py +66 -0
- tcex-5.0.0.dev3/tcex/pleb/jmespath_functions_array_mixin.py +665 -0
- tcex-5.0.0.dev3/tcex/pleb/jmespath_functions_base.py +43 -0
- tcex-5.0.0.dev3/tcex/pleb/jmespath_functions_control_mixin.py +91 -0
- tcex-5.0.0.dev3/tcex/pleb/jmespath_functions_crypto_mixin.py +65 -0
- tcex-5.0.0.dev3/tcex/pleb/jmespath_functions_datetime_mixin.py +130 -0
- tcex-5.0.0.dev3/tcex/pleb/jmespath_functions_math_mixin.py +235 -0
- tcex-5.0.0.dev3/tcex/pleb/jmespath_functions_object_mixin.py +253 -0
- tcex-5.0.0.dev3/tcex/pleb/jmespath_functions_string_mixin.py +602 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/util/code_operation.py +4 -1
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3/tcex.egg-info}/PKG-INFO +1 -1
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex.egg-info/SOURCES.txt +15 -0
- tcex-5.0.0.dev1/tcex/pleb/jmespath_custom.py +0 -353
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/LICENSE +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/README.md +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/setup.cfg +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/api.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/tc.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/ti_transform/model/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/ti_transform/ti_transform.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/util/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/util/threat_intel_util.py +1 -1
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/batch/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/batch/association.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/batch/attribute.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/batch/batch.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/batch/batch_cleaner.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/batch/batch_submit.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/batch/batch_writer.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/batch/group.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/batch/indicator.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/batch/security_label.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/batch/tag.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/datastore/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/datastore/cache.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/datastore/datastore.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/metric/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/metric/metric.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/notification/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/notification/notification.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/filters.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/group/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/group/group.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/adversary.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/attack_pattern.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/campaign.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/course_of_action.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/document.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/email.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/event.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/incident.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/intrusion_set.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/malware.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/report.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/signature.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/tactic.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/threat.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/tool.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/vulnerability.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/indicator/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/indicator/indicator.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/indicator/indicator_type/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/indicator/indicator_type/address.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/indicator/indicator_type/email_address.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/indicator/indicator_type/file.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/indicator/indicator_type/host.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/indicator/indicator_type/url.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/mapping.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/owner.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/security_label.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/tag.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/tags.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/task.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/mapping/victim.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/tcex_ti_tc_request.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/threat_intelligence/threat_intelligence.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v2/v2.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/_gen/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/_gen/_gen_abc.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/_gen/_gen_filter_abc.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/_gen/_gen_model_abc.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/_gen/_gen_object_abc.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/_gen/_options_data.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/_gen/model/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/_gen/model/_extra_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/_gen/model/_filter_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/_gen/model/_property_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/adversary_assets/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/api_endpoints.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/artifact_types/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/artifact_types/artifact_type.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/artifact_types/artifact_type_filter.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/artifact_types/artifact_type_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/artifacts/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/artifacts/artifact.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/artifacts/artifact_filter.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/artifacts/artifact_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/attribute_types/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/attribute_types/attribute_type.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/attribute_types/attribute_type_filter.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/attribute_types/attribute_type_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/attributes/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/attributes/attribute_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/case_attributes/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/case_attributes/case_attribute.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/case_attributes/case_attribute_filter.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/case_attributes/case_attribute_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/case_management/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/case_management/case_management.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/cases/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/cases/case.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/cases/case_filter.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/cases/case_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/file_actions/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/file_actions/file_action_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/file_occurrences/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/file_occurrences/file_occurrence_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/filter_abc.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/group_attributes/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/group_attributes/group_attribute.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/group_attributes/group_attribute_filter.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/group_attributes/group_attribute_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/groups/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/groups/group.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/groups/group_filter.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/groups/group_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/indicator_attributes/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/indicator_attributes/indicator_attribute.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/indicator_attributes/indicator_attribute_filter.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/indicator_attributes/indicator_attribute_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/indicators/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/indicators/indicator.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/indicators/indicator_filter.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/indicators/indicator_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/intel_requirement/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/intel_requirement/ir.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/intel_requirements/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/intel_requirements/categories/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/intel_requirements/categories/category.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/intel_requirements/categories/category_filter.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/intel_requirements/categories/category_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/intel_requirements/intel_req_type_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/intel_requirements/intel_requirement.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/intel_requirements/intel_requirement_filter.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/intel_requirements/intel_requirement_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/intel_requirements/keyword_sections/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/intel_requirements/keyword_sections/keyword_section_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/intel_requirements/results/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/intel_requirements/results/result.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/intel_requirements/results/result_filter.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/intel_requirements/results/result_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/intel_requirements/subtypes/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/intel_requirements/subtypes/subtype.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/intel_requirements/subtypes/subtype_filter.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/intel_requirements/subtypes/subtype_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/notes/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/notes/note.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/notes/note_filter.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/notes/note_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/object_abc.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/object_collection_abc.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/security/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/security/assignee_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/security/assignee_user_group_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/security/assignee_user_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/security/exclusion_lists/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/security/exclusion_lists/exclusion_list.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/security/exclusion_lists/exclusion_list_filter.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/security/exclusion_lists/exclusion_list_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/security/owner_roles/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/security/owner_roles/owner_role.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/security/owner_roles/owner_role_filter.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/security/owner_roles/owner_role_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/security/owners/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/security/owners/owner.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/security/owners/owner_filter.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/security/owners/owner_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/security/security.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/security/system_roles/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/security/system_roles/system_role.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/security/system_roles/system_role_filter.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/security/system_roles/system_role_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/security/user_groups/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/security/user_groups/user_group.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/security/user_groups/user_group_filter.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/security/user_groups/user_group_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/security/users/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/security/users/user.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/security/users/user_filter.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/security/users/user_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/security_labels/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/security_labels/security_label.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/security_labels/security_label_filter.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/security_labels/security_label_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/tags/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/tags/default_naics_tags.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/tags/mitre_tags.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/tags/naics_tags.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/tags/tag.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/tags/tag_filter.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/tags/tag_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/tasks/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/tasks/task.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/tasks/task_filter.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/tasks/task_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/threat_intelligence/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/threat_intelligence/threat_intelligence.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/tql/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/tql/tql.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/tql/tql_operator.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/tql/tql_type.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/v3.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/v3_model_abc.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/v3_types.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/victim_assets/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/victim_assets/victim_asset.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/victim_assets/victim_asset_filter.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/victim_assets/victim_asset_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/victim_attributes/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/victim_attributes/victim_attribute.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/victim_attributes/victim_attribute_filter.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/victim_attributes/victim_attribute_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/victims/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/victims/victim.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/victims/victim_filter.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/victims/victim_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/workflow_events/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/workflow_events/workflow_event.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/workflow_events/workflow_event_filter.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/workflow_events/workflow_event_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/workflow_templates/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/workflow_templates/workflow_template.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/workflow_templates/workflow_template_filter.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/api/tc/v3/workflow_templates/workflow_template_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/app.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/config/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/config/app_spec_yml.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/config/install_json.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/config/install_json_update.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/config/install_json_validate.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/config/job_json.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/config/layout_json.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/config/model/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/config/model/app_spec_yml_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/config/model/job_json_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/config/model/layout_json_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/config/model/tcex_json_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/config/permutation.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/config/tcex_json.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/config/tcex_json_update.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/decorator/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/decorator/on_success.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/decorator/output.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/key_value_store/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/key_value_store/key_value_abc.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/key_value_store/key_value_api.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/key_value_store/key_value_mock.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/key_value_store/key_value_redis.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/key_value_store/key_value_store.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/key_value_store/redis_client.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/key_value_store/redis_client_ssl.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/playbook/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/playbook/advanced_request.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/playbook/playbook.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/playbook/playbook_delete.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/playbook/playbook_output.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/playbook/playbook_read.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/service/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/service/api_service.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/service/common_service.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/service/common_service_trigger.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/service/webhook_trigger_service.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/token/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/app/token/token.py +1 -1
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/exit/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/exit/error_code.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/exit/exit.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/field_type/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/field_type/case_management_entity.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/field_type/choice.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/field_type/datetime.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/field_type/edit_choice.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/field_type/exception.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/field_type/group_entity.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/field_type/indicator_entity.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/field_type/integer.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/field_type/ip_address.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/field_type/key_value.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/field_type/sensitive.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/field_type/string.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/field_type/tc_entity.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/field_type/validator.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/input.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/model/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/model/advanced_request_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/model/api_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/model/app_api_service_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/model/app_external_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/model/app_feed_api_service_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/model/app_organization_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/model/app_playbook_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/model/app_system_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/model/app_trigger_service_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/model/app_webhook_trigger_service_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/model/batch_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/model/cal_setting_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/model/cert_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/model/common_advanced_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/model/common_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/model/create_config_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/model/logging_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/model/model_map.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/model/module_app_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/model/module_requests_session_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/model/organization_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/model/path_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/model/playbook_common_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/model/playbook_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/model/proxy_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/model/service_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/input/model/smtp_setting_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/logger/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/logger/api_handler.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/logger/cache_handler.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/logger/logger.py +1 -1
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/logger/rotating_file_handler_custom.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/logger/sensitive_filter.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/logger/trace_logger.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/pleb/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/pleb/cached_property.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/pleb/event.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/pleb/exception_thread.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/pleb/none_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/pleb/proxies.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/pleb/scoped_property.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/pleb/singleton.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/registry.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/requests_external/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/requests_external/external_session.py +2 -2
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/requests_external/rate_limit_handler.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/requests_external/requests_external.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/requests_tc/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/requests_tc/auth/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/requests_tc/auth/hmac_auth.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/requests_tc/auth/tc_auth.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/requests_tc/auth/token_auth.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/requests_tc/requests_tc.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/requests_tc/tc_session.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/tcex.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/util/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/util/aes_operation.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/util/datetime_operation.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/util/file_operation.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/util/model/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/util/model/playbook_variable_model.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/util/render/__init__.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/util/render/render.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/util/render/render_panel.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/util/render/render_prompt.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/util/render/render_table.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/util/requests_to_curl.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/util/string_operation.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/util/util.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex/util/variable.py +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex.egg-info/dependency_links.txt +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex.egg-info/requires.txt +0 -0
- {tcex-5.0.0.dev1 → tcex-5.0.0.dev3}/tcex.egg-info/top_level.txt +0 -0
|
@@ -129,7 +129,7 @@ commit = false
|
|
|
129
129
|
# Additional arguments to pass to the git commit command
|
|
130
130
|
commit_args = "--no-verify"
|
|
131
131
|
# The current version of the project
|
|
132
|
-
current_version = "5.0.0-
|
|
132
|
+
current_version = "5.0.0-dev3"
|
|
133
133
|
# The commit message template used when committing version bumps
|
|
134
134
|
message = "Version updated from {current_version} to {new_version}"
|
|
135
135
|
# Regular expression for parsing version strings
|
|
@@ -188,6 +188,7 @@ reportPrivateImportUsage = false
|
|
|
188
188
|
|
|
189
189
|
# Configuration for pytest test runner
|
|
190
190
|
[tool.pytest.ini_options]
|
|
191
|
+
addopts = "-n auto"
|
|
191
192
|
filterwarnings = []
|
|
192
193
|
junit_family = "xunit2"
|
|
193
194
|
testpaths = [
|
|
@@ -207,6 +208,8 @@ exclude = [
|
|
|
207
208
|
line-length = 100
|
|
208
209
|
# set the python target
|
|
209
210
|
target-version = "py311"
|
|
211
|
+
# define a default section for any imports that don't fit into the specified section-order.
|
|
212
|
+
src = ["tcex"]
|
|
210
213
|
|
|
211
214
|
# Configuration for ruff formatter
|
|
212
215
|
[tool.ruff.format]
|
|
@@ -320,28 +323,8 @@ select = [
|
|
|
320
323
|
# Define a default section for any imports that don't fit into the specified section-order.
|
|
321
324
|
default-section = "first-party"
|
|
322
325
|
|
|
323
|
-
# A list of modules to consider standard-library, in addition to those known to Ruff in advance
|
|
324
|
-
extra-standard-library = []
|
|
325
|
-
|
|
326
|
-
# Map known_first_party to known-first-party
|
|
327
|
-
known-first-party = ["tcex"]
|
|
328
|
-
|
|
329
326
|
# Map known_local_folder to known-local-folder
|
|
330
|
-
known-local-folder = ["
|
|
331
|
-
|
|
332
|
-
# Map known_third_party to known-third-party
|
|
333
|
-
known-third-party = [
|
|
334
|
-
"arrow",
|
|
335
|
-
"cryptography",
|
|
336
|
-
"dotenv",
|
|
337
|
-
"pydantic",
|
|
338
|
-
"pydantic_core",
|
|
339
|
-
"pydantic_settings",
|
|
340
|
-
"pytest",
|
|
341
|
-
"redis",
|
|
342
|
-
"requests",
|
|
343
|
-
"semantic_version",
|
|
344
|
-
]
|
|
327
|
+
known-local-folder = ["tcex"]
|
|
345
328
|
|
|
346
329
|
# Override in which order the sections should be output. Can be used to move custom sections.
|
|
347
330
|
section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"]
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
"""TcEx Framework Module"""
|
|
2
2
|
|
|
3
|
-
from tcex.api.tc.ti_transform.ti_predefined_functions import
|
|
4
|
-
ProcessingFunctions,
|
|
5
|
-
transform_builder_to_model,
|
|
6
|
-
)
|
|
3
|
+
from tcex.api.tc.ti_transform.ti_predefined_functions import ProcessingFunctions
|
|
7
4
|
from tcex.api.tc.ti_transform.ti_transform import TiTransform, TiTransforms
|
|
8
5
|
from tcex.api.tc.ti_transform.transform_abc import TransformException
|
|
9
6
|
|
|
@@ -12,5 +9,4 @@ __all__ = [
|
|
|
12
9
|
'TiTransform',
|
|
13
10
|
'TiTransforms',
|
|
14
11
|
'TransformException',
|
|
15
|
-
'transform_builder_to_model',
|
|
16
12
|
]
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
from collections.abc import Callable
|
|
4
4
|
from typing import Annotated, Any, TypeAlias
|
|
5
5
|
|
|
6
|
-
from pydantic import BaseModel, Discriminator, Field, Tag, field_validator, model_validator
|
|
7
|
-
|
|
8
6
|
from jmespath import compile as jmespath_compile
|
|
7
|
+
from pydantic import BaseModel, Discriminator, Field, Tag, field_validator, model_validator
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
# reusable validator
|
|
@@ -129,7 +128,7 @@ class AssociatedIndicatorFromIndicatorTransform(BaseModel, extra='forbid'):
|
|
|
129
128
|
"""."""
|
|
130
129
|
|
|
131
130
|
summary: str | MetadataTransformModel = Field(..., description='')
|
|
132
|
-
|
|
131
|
+
indicator_type: str | MetadataTransformModel = Field(..., description='')
|
|
133
132
|
association_type: str | MetadataTransformModel = Field(..., description='')
|
|
134
133
|
|
|
135
134
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""TcEx Framework Module"""
|
|
2
|
+
# ruff: noqa: TRY301
|
|
2
3
|
|
|
3
4
|
import hashlib
|
|
4
5
|
import json
|
|
@@ -23,11 +24,17 @@ class TransformBuilderExport(TypedDict):
|
|
|
23
24
|
transform: dict
|
|
24
25
|
|
|
25
26
|
|
|
26
|
-
def
|
|
27
|
+
def _transform_builder_to_model(
|
|
27
28
|
transform: TransformBuilderExport,
|
|
28
29
|
processing_functions: 'ProcessingFunctions',
|
|
29
30
|
) -> IndicatorTransformModel | GroupTransformModel:
|
|
30
|
-
"""Convert a transform from Transform Builder to one of the tcex transform models.
|
|
31
|
+
"""Convert a transform from Transform Builder to one of the tcex transform models.
|
|
32
|
+
|
|
33
|
+
This is for transforms exported from Transform Builder v1, and should not be called directly.
|
|
34
|
+
|
|
35
|
+
Instead, use tcex.api.tc.ti_transform.transform_builder.load, which will detect the version of
|
|
36
|
+
the transform and call the appropriate function to convert it to a tcex transform model.
|
|
37
|
+
"""
|
|
31
38
|
|
|
32
39
|
def find_entries(data, key, context='') -> Iterable[tuple[str, dict]]:
|
|
33
40
|
"""Find entries in a dict with a given name, regardless of depth."""
|
|
@@ -260,7 +267,7 @@ class ProcessingFunctions:
|
|
|
260
267
|
|
|
261
268
|
if not type_:
|
|
262
269
|
ex_msg = 'No method or for_each key found in definition.'
|
|
263
|
-
raise ValueError(ex_msg)
|
|
270
|
+
raise ValueError(ex_msg)
|
|
264
271
|
|
|
265
272
|
fn_name = api_def[type_]
|
|
266
273
|
|
|
@@ -271,7 +278,7 @@ class ProcessingFunctions:
|
|
|
271
278
|
|
|
272
279
|
if not fn:
|
|
273
280
|
ex_msg = f'Unknown function: {fn_name}'
|
|
274
|
-
raise ValueError(ex_msg)
|
|
281
|
+
raise ValueError(ex_msg)
|
|
275
282
|
|
|
276
283
|
translated[type_] = fn
|
|
277
284
|
|
|
@@ -281,7 +288,7 @@ class ProcessingFunctions:
|
|
|
281
288
|
for kwarg in api_def['kwargs']:
|
|
282
289
|
if kwarg not in sig.parameters:
|
|
283
290
|
ex_msg = f'Unknown argument {kwarg} for function {fn_name}'
|
|
284
|
-
raise ValueError(ex_msg)
|
|
291
|
+
raise ValueError(ex_msg)
|
|
285
292
|
|
|
286
293
|
annotation = sig.parameters[kwarg].annotation
|
|
287
294
|
additional_context = f', Argument: {kwarg}'
|
|
@@ -333,6 +340,15 @@ class ProcessingFunctions:
|
|
|
333
340
|
def _snake_to_titlecase(name):
|
|
334
341
|
return name.replace('_', ' ').title()
|
|
335
342
|
|
|
343
|
+
@staticmethod
|
|
344
|
+
def _get_type_string_from_annotation(annotation) -> str:
|
|
345
|
+
"""Get a string representation of a type annotation."""
|
|
346
|
+
if annotation is None:
|
|
347
|
+
return 'str'
|
|
348
|
+
if hasattr(annotation, '__name__'):
|
|
349
|
+
return annotation.__name__
|
|
350
|
+
return str(annotation)
|
|
351
|
+
|
|
336
352
|
@staticmethod
|
|
337
353
|
def _get_params_defs(fn) -> list[ParamDefinition]:
|
|
338
354
|
"""Get the arguments for a function.
|
|
@@ -352,8 +368,8 @@ class ProcessingFunctions:
|
|
|
352
368
|
),
|
|
353
369
|
'name': p,
|
|
354
370
|
'label': ProcessingFunctions._snake_to_titlecase(p),
|
|
355
|
-
'type': (
|
|
356
|
-
sig.parameters[p].annotation
|
|
371
|
+
'type': ProcessingFunctions._get_type_string_from_annotation(
|
|
372
|
+
sig.parameters[p].annotation
|
|
357
373
|
),
|
|
358
374
|
'help': '',
|
|
359
375
|
'required': True,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"""TcEx Framework Module"""
|
|
2
2
|
|
|
3
|
+
# ruff: noqa: TRY301
|
|
3
4
|
import collections
|
|
4
5
|
import logging
|
|
5
6
|
from abc import ABC, abstractmethod
|
|
@@ -9,6 +10,7 @@ from inspect import signature
|
|
|
9
10
|
from typing import Any, cast
|
|
10
11
|
|
|
11
12
|
import jmespath
|
|
13
|
+
|
|
12
14
|
from tcex.api.tc.ti_transform import ti_predefined_functions
|
|
13
15
|
from tcex.api.tc.ti_transform.model import (
|
|
14
16
|
AttributeTransformModel,
|
|
@@ -270,7 +272,7 @@ class TransformABC(ABC):
|
|
|
270
272
|
for i, association in enumerate(associations or [], 1):
|
|
271
273
|
try:
|
|
272
274
|
summary = self._process_metadata_transform_model(association.summary)
|
|
273
|
-
indicator_type = self._process_metadata_transform_model(association.
|
|
275
|
+
indicator_type = self._process_metadata_transform_model(association.indicator_type)
|
|
274
276
|
association_type = self._process_metadata_transform_model(
|
|
275
277
|
association.association_type
|
|
276
278
|
)
|
|
@@ -500,6 +502,8 @@ class TransformABC(ABC):
|
|
|
500
502
|
self._process_metadata('dnsActive', self.transform.dns_active)
|
|
501
503
|
self._process_metadata('whoisActive', self.transform.whois_active)
|
|
502
504
|
|
|
505
|
+
self._process_custom_association(self.transform.associated_indicators)
|
|
506
|
+
|
|
503
507
|
def _process_indicator_values(self):
|
|
504
508
|
"""Process Indicator value."""
|
|
505
509
|
if not isinstance(self.transform, IndicatorTransformModel):
|
|
@@ -626,7 +630,7 @@ class TransformABC(ABC):
|
|
|
626
630
|
f'path={transform.type.path}, value={_type}'
|
|
627
631
|
)
|
|
628
632
|
ex_msg = 'Invalid type'
|
|
629
|
-
raise RuntimeError(ex_msg)
|
|
633
|
+
raise RuntimeError(ex_msg)
|
|
630
634
|
except Exception as ex:
|
|
631
635
|
ex_msg = 'Type'
|
|
632
636
|
raise TransformException(ex_msg, ex, context=transform.type.model_dump()) from ex
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"""Module for various utilities for working with transforms created with Transform Builder."""
|
|
2
|
+
|
|
3
|
+
from collections.abc import Iterable
|
|
4
|
+
from typing import Literal
|
|
5
|
+
|
|
6
|
+
from tcex.api.tc.ti_transform.model.transform_model import (
|
|
7
|
+
GroupTransformModel,
|
|
8
|
+
IndicatorTransformModel,
|
|
9
|
+
)
|
|
10
|
+
from tcex.api.tc.ti_transform.ti_predefined_functions import (
|
|
11
|
+
ProcessingFunctions,
|
|
12
|
+
_transform_builder_to_model,
|
|
13
|
+
)
|
|
14
|
+
from tcex.api.tc.ti_transform.transform_builder.v2.load_transform import LoadTransform
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def load(
|
|
18
|
+
transform: dict,
|
|
19
|
+
processing_functions: 'ProcessingFunctions',
|
|
20
|
+
) -> IndicatorTransformModel | GroupTransformModel:
|
|
21
|
+
"""Convert a transform from Transform Builder to one of the tcex transform models."""
|
|
22
|
+
|
|
23
|
+
match transform:
|
|
24
|
+
case {'transform': dict(), 'type': str()}: # TB v1
|
|
25
|
+
return _transform_builder_to_model(transform, processing_functions) # type: ignore
|
|
26
|
+
case {'metadata': {'threatIntelType': str()}}: # TB v2
|
|
27
|
+
return LoadTransform(processing_functions).load_transform(transform)
|
|
28
|
+
case _:
|
|
29
|
+
ex_msg = 'Unrecognized transform format.'
|
|
30
|
+
raise ValueError(ex_msg)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"""Errors for the Transform Builder."""
|
|
2
|
+
|
|
3
|
+
from typing import Literal
|
|
4
|
+
|
|
5
|
+
from pydantic import BaseModel, ConfigDict
|
|
6
|
+
from pydantic.alias_generators import to_camel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ModelBase(BaseModel):
|
|
10
|
+
"""Model Definition"""
|
|
11
|
+
|
|
12
|
+
model_config = ConfigDict(
|
|
13
|
+
alias_generator=to_camel,
|
|
14
|
+
extra='forbid',
|
|
15
|
+
validate_assignment=True,
|
|
16
|
+
validate_by_name=True,
|
|
17
|
+
validate_default=True,
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class TransformErrorCause(ModelBase):
|
|
22
|
+
"""Cause for an error, which should be enough information to locate the issue."""
|
|
23
|
+
|
|
24
|
+
section: Literal[
|
|
25
|
+
'Metadata', 'Associations', 'Attributes', 'File Occurrences', 'Security Labels', 'Tags'
|
|
26
|
+
]
|
|
27
|
+
name: str
|
|
28
|
+
index: int | None = None
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class TransformError(ModelBase):
|
|
32
|
+
"""Structured presentation of a validation error with a transform."""
|
|
33
|
+
|
|
34
|
+
message: str
|
|
35
|
+
cause: TransformErrorCause
|
|
36
|
+
definition: dict
|
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
"""Utility to load transform files."""
|
|
2
|
+
|
|
3
|
+
# ruff: noqa: TRY301
|
|
4
|
+
import json
|
|
5
|
+
import logging
|
|
6
|
+
from inspect import signature
|
|
7
|
+
from typing import Literal
|
|
8
|
+
|
|
9
|
+
from tcex.api.tc.ti_transform.model.transform_model import (
|
|
10
|
+
GroupTransformModel,
|
|
11
|
+
IndicatorTransformModel,
|
|
12
|
+
)
|
|
13
|
+
from tcex.api.tc.ti_transform.ti_predefined_functions import ProcessingFunctions
|
|
14
|
+
from tcex.api.tc.ti_transform.transform_builder.v2.errors import TransformError, TransformErrorCause
|
|
15
|
+
from tcex.logger.trace_logger import TraceLogger
|
|
16
|
+
from tcex.util import Util
|
|
17
|
+
|
|
18
|
+
_logger: TraceLogger = logging.getLogger(__name__.split('.', maxsplit=1)[0]) # type: ignore
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class LoadTransform:
|
|
22
|
+
"""Load and process transform mapping JSON."""
|
|
23
|
+
|
|
24
|
+
def __init__(
|
|
25
|
+
self,
|
|
26
|
+
processing_functions: ProcessingFunctions,
|
|
27
|
+
log: logging.Logger = _logger,
|
|
28
|
+
):
|
|
29
|
+
"""Initialize class properties."""
|
|
30
|
+
self.util = Util()
|
|
31
|
+
self.log = log
|
|
32
|
+
self.fns = processing_functions
|
|
33
|
+
|
|
34
|
+
def load_transform(
|
|
35
|
+
self,
|
|
36
|
+
mapping_json: dict,
|
|
37
|
+
) -> GroupTransformModel | IndicatorTransformModel:
|
|
38
|
+
"""Load and process the transform mapping JSON."""
|
|
39
|
+
metadata = mapping_json.pop('metadata', {})
|
|
40
|
+
ti_type = metadata['threatIntelType']
|
|
41
|
+
# transformSchemaVersion = metadata.get('transformSchemaVersion', '1')
|
|
42
|
+
match ti_type:
|
|
43
|
+
case 'group':
|
|
44
|
+
return GroupTransformModel(**self._transform_data(self._normalize(mapping_json)))
|
|
45
|
+
case 'indicator':
|
|
46
|
+
return IndicatorTransformModel(
|
|
47
|
+
**self._transform_data(self._normalize(mapping_json))
|
|
48
|
+
)
|
|
49
|
+
case _:
|
|
50
|
+
msg = f'Unknown transform type: {ti_type}'
|
|
51
|
+
raise TypeError(msg)
|
|
52
|
+
|
|
53
|
+
def _normalize(self, data: dict) -> dict:
|
|
54
|
+
"""Normalize the transform data."""
|
|
55
|
+
normalized = {}
|
|
56
|
+
for key, value in data.items():
|
|
57
|
+
normalized_key = self.util.camel_to_snake(key)
|
|
58
|
+
if isinstance(value, dict):
|
|
59
|
+
normalized[normalized_key] = self._normalize(value)
|
|
60
|
+
elif isinstance(value, list):
|
|
61
|
+
normalized[normalized_key] = [
|
|
62
|
+
self._normalize(item) if isinstance(item, dict) else item for item in value
|
|
63
|
+
]
|
|
64
|
+
else:
|
|
65
|
+
normalized[normalized_key] = value
|
|
66
|
+
|
|
67
|
+
return normalized
|
|
68
|
+
|
|
69
|
+
def _transform_data(self, body: dict) -> dict:
|
|
70
|
+
"""Transform the data."""
|
|
71
|
+
fields_copy = {**body}
|
|
72
|
+
fields_copy.pop('associated_indicators', None)
|
|
73
|
+
|
|
74
|
+
transform_data = {}
|
|
75
|
+
|
|
76
|
+
for j, (field_key, field_value) in enumerate(fields_copy.items()):
|
|
77
|
+
match field_key:
|
|
78
|
+
case 'associated_groups' | 'security_labels' | 'tags':
|
|
79
|
+
for i, item in enumerate(field_value):
|
|
80
|
+
value = item.get('value', {})
|
|
81
|
+
try:
|
|
82
|
+
metadata = item.pop('metadata', {})
|
|
83
|
+
transform_data.setdefault(field_key, []).append(item)
|
|
84
|
+
|
|
85
|
+
if isinstance(value, dict):
|
|
86
|
+
self._translate_processing_function(value)
|
|
87
|
+
except Exception:
|
|
88
|
+
# best effort to continue processing other items
|
|
89
|
+
self.log.exception(
|
|
90
|
+
TransformError(
|
|
91
|
+
message=f'Error processing {field_key} field',
|
|
92
|
+
cause=TransformErrorCause(
|
|
93
|
+
section=self._field_type_to_error_type(field_key),
|
|
94
|
+
index=i,
|
|
95
|
+
name=self._field_type_to_error_type(field_key),
|
|
96
|
+
),
|
|
97
|
+
definition=value,
|
|
98
|
+
)
|
|
99
|
+
)
|
|
100
|
+
raise
|
|
101
|
+
|
|
102
|
+
case 'associated_indicators' | 'attributes' | 'file_occurrences':
|
|
103
|
+
# Remove metadata from attribute objects
|
|
104
|
+
for i, field in enumerate(field_value):
|
|
105
|
+
try:
|
|
106
|
+
metadata = field.pop('metadata', {})
|
|
107
|
+
if metadata.get('disabled', False):
|
|
108
|
+
continue
|
|
109
|
+
|
|
110
|
+
for af, ad in list(field.items()):
|
|
111
|
+
if isinstance(ad, dict):
|
|
112
|
+
metadata = ad.pop('metadata', {})
|
|
113
|
+
if (
|
|
114
|
+
af
|
|
115
|
+
in (
|
|
116
|
+
'type',
|
|
117
|
+
'value',
|
|
118
|
+
'summary',
|
|
119
|
+
'association_type',
|
|
120
|
+
)
|
|
121
|
+
and not ad.get('path')
|
|
122
|
+
and not ad.get('default')
|
|
123
|
+
):
|
|
124
|
+
field.pop(af, None)
|
|
125
|
+
self.log.error(
|
|
126
|
+
TransformError(
|
|
127
|
+
message='{af} required',
|
|
128
|
+
cause=TransformErrorCause(
|
|
129
|
+
section=self._field_type_to_error_type(
|
|
130
|
+
field_key
|
|
131
|
+
),
|
|
132
|
+
index=i,
|
|
133
|
+
name=self._field_type_to_error_type(field_key),
|
|
134
|
+
),
|
|
135
|
+
definition=field,
|
|
136
|
+
)
|
|
137
|
+
)
|
|
138
|
+
msg = '{af} required'
|
|
139
|
+
raise RuntimeError(msg)
|
|
140
|
+
|
|
141
|
+
self._translate_processing_function(field[af])
|
|
142
|
+
|
|
143
|
+
transform_data.setdefault(field_key, []).append(field)
|
|
144
|
+
except Exception:
|
|
145
|
+
# best effort to continue processing other items
|
|
146
|
+
self.log.exception(
|
|
147
|
+
TransformError(
|
|
148
|
+
message=f'Error processing {field_key} field',
|
|
149
|
+
cause=TransformErrorCause(
|
|
150
|
+
section=self._field_type_to_error_type(field_key),
|
|
151
|
+
index=i,
|
|
152
|
+
name=self._field_type_to_error_type(field_key),
|
|
153
|
+
),
|
|
154
|
+
definition=field,
|
|
155
|
+
)
|
|
156
|
+
)
|
|
157
|
+
raise
|
|
158
|
+
|
|
159
|
+
case _:
|
|
160
|
+
try:
|
|
161
|
+
# skip null configured fields
|
|
162
|
+
if not field_value:
|
|
163
|
+
self.log.error(
|
|
164
|
+
TransformError(
|
|
165
|
+
message='missing value',
|
|
166
|
+
cause=TransformErrorCause(
|
|
167
|
+
section=self._field_type_to_error_type(field_key),
|
|
168
|
+
name=field_key,
|
|
169
|
+
),
|
|
170
|
+
definition=field_value,
|
|
171
|
+
)
|
|
172
|
+
)
|
|
173
|
+
msg = 'missing value'
|
|
174
|
+
raise RuntimeError(msg)
|
|
175
|
+
|
|
176
|
+
# Remove metadata from standard fields
|
|
177
|
+
metadata = field_value.pop('metadata', {})
|
|
178
|
+
|
|
179
|
+
# do not transform disabled fields or fields without path/default
|
|
180
|
+
if metadata.get('disabled', False) or not (
|
|
181
|
+
field_value.get('path') or field_value.get('default')
|
|
182
|
+
):
|
|
183
|
+
self.log.error(
|
|
184
|
+
TransformError(
|
|
185
|
+
message='missing value',
|
|
186
|
+
cause=TransformErrorCause(
|
|
187
|
+
section=self._field_type_to_error_type(field_key),
|
|
188
|
+
index=j,
|
|
189
|
+
name=field_key,
|
|
190
|
+
),
|
|
191
|
+
definition=field_value,
|
|
192
|
+
)
|
|
193
|
+
)
|
|
194
|
+
msg = 'missing value'
|
|
195
|
+
raise RuntimeError(msg)
|
|
196
|
+
transform_data[field_key] = field_value
|
|
197
|
+
|
|
198
|
+
self._translate_processing_function(field_value)
|
|
199
|
+
|
|
200
|
+
except Exception:
|
|
201
|
+
# best effort to continue processing other items
|
|
202
|
+
self.log.exception(
|
|
203
|
+
TransformError(
|
|
204
|
+
message=f'Error processing {field_key} field',
|
|
205
|
+
cause=TransformErrorCause(
|
|
206
|
+
section=self._field_type_to_error_type(field_key),
|
|
207
|
+
index=j,
|
|
208
|
+
name=field_key,
|
|
209
|
+
),
|
|
210
|
+
definition=field_value,
|
|
211
|
+
)
|
|
212
|
+
)
|
|
213
|
+
raise
|
|
214
|
+
|
|
215
|
+
# Clean the transform data by removing empty lists, dicts, and None values
|
|
216
|
+
return self._clean_empty_values(transform_data)
|
|
217
|
+
|
|
218
|
+
def _clean_empty_values(self, data: dict) -> dict:
|
|
219
|
+
"""Remove keys with empty lists, dicts, or None values recursively."""
|
|
220
|
+
clean_data = {}
|
|
221
|
+
for key, value in data.items():
|
|
222
|
+
if value is None:
|
|
223
|
+
continue
|
|
224
|
+
|
|
225
|
+
if isinstance(value, dict):
|
|
226
|
+
# Recursively clean nested dictionaries
|
|
227
|
+
cleaned_dict = self._clean_empty_values(value)
|
|
228
|
+
if cleaned_dict: # Only add if the cleaned dict is not empty
|
|
229
|
+
clean_data[key] = cleaned_dict
|
|
230
|
+
elif isinstance(value, list):
|
|
231
|
+
# Recursively clean items in lists
|
|
232
|
+
cleaned_list = []
|
|
233
|
+
for item in value:
|
|
234
|
+
if isinstance(item, dict):
|
|
235
|
+
cleaned_item = self._clean_empty_values(item)
|
|
236
|
+
if cleaned_item: # Only add if the cleaned dict is not empty
|
|
237
|
+
cleaned_list.append(cleaned_item)
|
|
238
|
+
elif item is not None: # Keep non-None list items
|
|
239
|
+
cleaned_list.append(item)
|
|
240
|
+
if cleaned_list: # Only add if the cleaned list is not empty
|
|
241
|
+
clean_data[key] = cleaned_list
|
|
242
|
+
else:
|
|
243
|
+
# Keep all other non-None values
|
|
244
|
+
clean_data[key] = value
|
|
245
|
+
return clean_data
|
|
246
|
+
|
|
247
|
+
def _translate_processing_function(self, mapping: dict):
|
|
248
|
+
"""Translate a function definition in transform builder/API format to an actual function."""
|
|
249
|
+
# convert transform function names to callables
|
|
250
|
+
transforms_with_callable = []
|
|
251
|
+
for function in mapping.get('transform', []):
|
|
252
|
+
transforms_with_callable.append(self._function_name_to_callable(function))
|
|
253
|
+
if transforms_with_callable:
|
|
254
|
+
mapping['transform'] = transforms_with_callable
|
|
255
|
+
else:
|
|
256
|
+
mapping.pop('transform', None)
|
|
257
|
+
|
|
258
|
+
def _function_name_to_callable(self, function_data: dict):
|
|
259
|
+
"""Translate a function definition in transform builder/API format to an actual function."""
|
|
260
|
+
|
|
261
|
+
try:
|
|
262
|
+
translated = function_data.copy()
|
|
263
|
+
type_ = 'method' if 'method' in function_data else 'for_each'
|
|
264
|
+
|
|
265
|
+
fn_name = function_data[type_]
|
|
266
|
+
|
|
267
|
+
# REMOVE: if name is already a callable, return it
|
|
268
|
+
if callable(fn_name):
|
|
269
|
+
return function_data
|
|
270
|
+
|
|
271
|
+
fn = getattr(self.fns, fn_name)
|
|
272
|
+
|
|
273
|
+
if not fn:
|
|
274
|
+
msg = f'Function {fn_name} not found.'
|
|
275
|
+
raise RuntimeError(msg)
|
|
276
|
+
|
|
277
|
+
translated[type_] = fn
|
|
278
|
+
|
|
279
|
+
if 'kwargs' in function_data:
|
|
280
|
+
sig = signature(fn)
|
|
281
|
+
|
|
282
|
+
for kwarg in function_data['kwargs']:
|
|
283
|
+
if kwarg not in sig.parameters:
|
|
284
|
+
msg = f'Unknown argument ("{kwarg}") for function {fn_name}.'
|
|
285
|
+
raise RuntimeError(msg)
|
|
286
|
+
|
|
287
|
+
annotation = sig.parameters[kwarg].annotation
|
|
288
|
+
match annotation():
|
|
289
|
+
case dict():
|
|
290
|
+
translated['kwargs'][kwarg] = json.loads(function_data['kwargs'][kwarg])
|
|
291
|
+
case _:
|
|
292
|
+
translated['kwargs'][kwarg] = sig.parameters[kwarg].annotation(
|
|
293
|
+
function_data['kwargs'][kwarg]
|
|
294
|
+
)
|
|
295
|
+
except Exception as ex:
|
|
296
|
+
self.log.exception('Error translating function definition')
|
|
297
|
+
msg = 'Error loading function'
|
|
298
|
+
raise RuntimeError(msg) from ex
|
|
299
|
+
return translated
|
|
300
|
+
|
|
301
|
+
def _field_type_to_error_type(
|
|
302
|
+
self,
|
|
303
|
+
field_key: str,
|
|
304
|
+
) -> Literal[
|
|
305
|
+
'Metadata', 'Associations', 'Attributes', 'File Occurrences', 'Security Labels', 'Tags'
|
|
306
|
+
]:
|
|
307
|
+
match field_key:
|
|
308
|
+
case 'associated_groups' | 'associated_indicators':
|
|
309
|
+
return 'Associations'
|
|
310
|
+
case 'security_labels':
|
|
311
|
+
return 'Security Labels'
|
|
312
|
+
case 'tags':
|
|
313
|
+
return 'Tags'
|
|
314
|
+
case 'attributes':
|
|
315
|
+
return 'Attributes'
|
|
316
|
+
case 'file_occurrences':
|
|
317
|
+
return 'File Occurrences'
|
|
318
|
+
case _:
|
|
319
|
+
return 'Metadata'
|
|
@@ -8,10 +8,11 @@
|
|
|
8
8
|
# debugpy.wait_for_client()
|
|
9
9
|
|
|
10
10
|
import os
|
|
11
|
-
from enum import Enum
|
|
11
|
+
from enum import Enum, StrEnum
|
|
12
12
|
from pathlib import Path
|
|
13
13
|
|
|
14
14
|
import typer
|
|
15
|
+
|
|
15
16
|
from tcex.api.tc.v3._gen._gen_args_abc import GenerateArgsABC
|
|
16
17
|
from tcex.api.tc.v3._gen._gen_filter_abc import GenerateFilterABC
|
|
17
18
|
from tcex.api.tc.v3._gen._gen_model_abc import GenerateModelABC
|
|
@@ -200,7 +201,7 @@ def gen_object(type_: SnakeString):
|
|
|
200
201
|
#
|
|
201
202
|
|
|
202
203
|
|
|
203
|
-
class ObjectTypes(
|
|
204
|
+
class ObjectTypes(StrEnum, Enum):
|
|
204
205
|
"""Object Types"""
|
|
205
206
|
|
|
206
207
|
# shared
|
|
@@ -242,7 +243,7 @@ class ObjectTypes(str, Enum):
|
|
|
242
243
|
victim_attributes = 'victim_attributes'
|
|
243
244
|
|
|
244
245
|
|
|
245
|
-
class GenTypes(
|
|
246
|
+
class GenTypes(StrEnum, Enum):
|
|
246
247
|
"""Object Types"""
|
|
247
248
|
|
|
248
249
|
all = 'all'
|
|
@@ -27,7 +27,7 @@ class GenerateArgsABC(GenerateABC, ABC):
|
|
|
27
27
|
prop_type = self._prop_type_map(prop_data.get('type')) # type: ignore
|
|
28
28
|
elif 'allOf' in prop_data and prop_data.get('allOf'):
|
|
29
29
|
ref: str = prop_data.get('allOf')[0].get('$ref') # type: ignore
|
|
30
|
-
prop_type = ref.
|
|
30
|
+
prop_type = ref.rsplit('/', maxsplit=1)[-1].replace('Model', '')
|
|
31
31
|
elif 'items' in prop_data and prop_data.get('items'):
|
|
32
32
|
ref: str = prop_data.get('items', {}).get('$ref') # type: ignore
|
|
33
33
|
prop_type = ref.split('/')[-1].replace('Model', '')
|