splunk-soar-sdk 2.3.7__tar.gz → 3.1.0__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.
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/.github/workflows/code_quality.yml +2 -2
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/.pre-commit-config.yaml +1 -1
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/PKG-INFO +5 -6
- splunk_soar_sdk-3.1.0/commitlint.config.js +1 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/pyproject.toml +12 -12
- splunk_soar_sdk-3.1.0/release_notes.txt +21 -0
- splunk_soar_sdk-3.1.0/release_version.txt +1 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/abstract.py +38 -41
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/action_results.py +41 -18
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/actions_manager.py +5 -7
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/apis/utils.py +3 -3
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/apis/vault.py +10 -10
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/app.py +58 -51
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/app_cli_runner.py +8 -8
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/app_client.py +10 -10
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/asset.py +45 -33
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/async_utils.py +2 -2
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/cli/init/cli.py +7 -9
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/cli/manifests/deserializers.py +15 -15
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/cli/manifests/processors.py +4 -10
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/cli/manifests/serializers.py +16 -8
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/cli/package/cli.py +6 -6
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/cli/package/utils.py +1 -1
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/code_renderers/action_renderer.py +35 -18
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/code_renderers/app_renderer.py +1 -2
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/code_renderers/asset_renderer.py +4 -5
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/code_renderers/renderer.py +2 -2
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/code_renderers/templates/pyproject.toml.jinja +1 -1
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/compat.py +6 -6
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/decorators/action.py +14 -15
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/decorators/make_request.py +4 -3
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/decorators/on_poll.py +5 -4
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/decorators/test_connectivity.py +2 -2
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/decorators/view_handler.py +11 -17
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/decorators/webhook.py +1 -2
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/exceptions.py +1 -4
- splunk_soar_sdk-3.1.0/src/soar_sdk/field_utils.py +8 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/input_spec.py +13 -17
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/logging.py +3 -3
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/meta/actions.py +6 -22
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/meta/app.py +10 -7
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/meta/dependencies.py +48 -42
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/meta/webhooks.py +12 -12
- splunk_soar_sdk-3.1.0/src/soar_sdk/models/artifact.py +33 -0
- splunk_soar_sdk-3.1.0/src/soar_sdk/models/container.py +44 -0
- splunk_soar_sdk-3.1.0/src/soar_sdk/models/finding.py +54 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/models/vault_attachment.py +6 -6
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/models/view.py +10 -13
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/params.py +57 -39
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/shims/phantom/action_result.py +4 -4
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/shims/phantom/base_connector.py +5 -5
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/shims/phantom/ph_ipc.py +3 -3
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/shims/phantom/vault.py +35 -34
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/types.py +3 -2
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/views/template_filters.py +4 -4
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/views/template_renderer.py +2 -2
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/views/view_parser.py +3 -4
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/webhooks/models.py +7 -6
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/webhooks/routing.py +4 -3
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/cli/test_convert_cli.py +8 -8
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/cli/test_deserializers.py +15 -14
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/cli/test_serializers.py +13 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/code_renderers/test_action_renderer.py +75 -0
- splunk_soar_sdk-3.1.0/tests/example_app/app.json +1250 -0
- {splunk_soar_sdk-2.3.7/tests/example_app_with_webhook → splunk_soar_sdk-3.1.0/tests/example_app}/pyproject.toml +6 -7
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/example_app/src/app.py +3 -4
- splunk_soar_sdk-3.1.0/tests/example_app/uv.lock +1123 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/example_app_with_webhook/app.json +71 -82
- {splunk_soar_sdk-2.3.7/tests/example_app → splunk_soar_sdk-3.1.0/tests/example_app_with_webhook}/pyproject.toml +6 -6
- splunk_soar_sdk-3.1.0/tests/example_app_with_webhook/uv.lock +956 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/meta/test_actions.py +4 -4
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/meta/test_dependencies.py +31 -14
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/test_action_results.py +29 -8
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/test_actions_manager.py +7 -7
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/test_app.py +21 -4
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/test_app_action.py +7 -4
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/test_app_runner.py +43 -47
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/test_asset.py +18 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/test_compat.py +5 -5
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/test_custom_views.py +16 -12
- splunk_soar_sdk-3.1.0/tests/test_field_utils.py +19 -0
- splunk_soar_sdk-3.1.0/tests/test_finding.py +126 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/test_on_poll.py +5 -5
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/test_params.py +30 -3
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/test_template_filters.py +3 -3
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/test_test_connectivity.py +1 -1
- splunk_soar_sdk-3.1.0/uv.lock +1557 -0
- splunk_soar_sdk-2.3.7/commitlint.config.js +0 -1
- splunk_soar_sdk-2.3.7/release_notes.txt +0 -21
- splunk_soar_sdk-2.3.7/release_version.txt +0 -1
- splunk_soar_sdk-2.3.7/src/soar_sdk/models/artifact.py +0 -36
- splunk_soar_sdk-2.3.7/src/soar_sdk/models/container.py +0 -47
- splunk_soar_sdk-2.3.7/tests/example_app/app.json +0 -1291
- splunk_soar_sdk-2.3.7/tests/example_app/uv.lock +0 -1358
- splunk_soar_sdk-2.3.7/tests/example_app_with_webhook/uv.lock +0 -1301
- splunk_soar_sdk-2.3.7/uv.lock +0 -1825
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/.github/ISSUE_TEMPLATE/bug.md +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/.github/pull_request_template.md +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/.github/utils/github.js +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/.github/utils/update_version.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/.github/workflows/commit_hygiene.yml +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/.github/workflows/generate_docs.yml +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/.github/workflows/semantic_release.yml +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/.gitignore +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/.releaserc +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/LICENSE +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/README.md +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/docs/api_reference.rst +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/docs/app_structure/index.rst +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/docs/app_structure/pre-commit-config.yaml.rst +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/docs/app_structure/pyproject.toml.rst +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/docs/app_structure/src_app.rst +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/docs/changelog.rst +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/docs/cli_reference.rst +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/docs/conf.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/docs/custom_views/index.rst +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/docs/custom_views/reusable_components.md +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/docs/custom_views/templates.md +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/docs/custom_views/view_handlers.md +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/docs/getting_started/defining_asset.rst +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/docs/getting_started/first_action.rst +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/docs/getting_started/index.rst +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/docs/getting_started/init_app.rst +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/docs/getting_started/installation.rst +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/docs/getting_started/testing_and_building.rst +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/docs/index.rst +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/__init__.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/apis/__init__.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/apis/artifact.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/apis/container.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/app_templates/basic_app/.gitignore +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/app_templates/basic_app/.pre-commit-config.yaml +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/app_templates/basic_app/logo.svg +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/app_templates/basic_app/logo_dark.svg +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/app_templates/basic_app/src/__init__.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/app_templates/basic_app/uv.lock +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/cli/__init__.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/cli/cli.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/cli/init/__init__.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/cli/manifests/__init__.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/cli/manifests/cli.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/cli/path_utils.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/cli/utils.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/code_renderers/__init__.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/code_renderers/toml_renderer.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/colors.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/crypto.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/decorators/__init__.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/meta/__init__.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/meta/adapters.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/meta/datatypes.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/models/__init__.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/paths.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/py.typed +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/shims/phantom/app.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/shims/phantom/connector_result.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/shims/phantom/consts.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/shims/phantom/encryption_helper.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/shims/phantom/install_info.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/shims/phantom/json_keys.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/shims/phantom_common/app_interface/app_interface.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/shims/phantom_common/encryption/encryption_manager_factory.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/templates/base/base_template.html +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/templates/base/error.html +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/templates/base/header.html +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/templates/base/logo_header.html +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/templates/components/pie_chart.html +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/templates/widgets/widget_resize_snippet.html +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/templates/widgets/widget_template.html +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/views/__init__.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/views/component_registry.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/views/components/__init__.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/views/components/pie_chart.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/src/soar_sdk/webhooks/__init__.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/test.png +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/test.txt +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/__init__.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/cli/__init__.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/cli/datapath_parse.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/cli/manifests/__init__.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/cli/manifests/test_processors.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/cli/test_assets/converted_app/actions.py.txt +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/cli/test_cli.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/cli/test_init_cli.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/cli/test_manifests_cli.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/cli/test_package_cli.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/cli/test_utils.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/conftest.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/example_app/example_asset.json +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/example_app/logo.svg +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/example_app/logo_dark.svg +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/example_app/release_notes/v1.md +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/example_app/src/__init__.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/example_app/src/actions/__init__.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/example_app/src/actions/async_action.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/example_app/src/actions/generate_category.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/example_app/src/actions/reverse_string.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/example_app/src/ignoreme.txt +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/example_app/templates/reverse_string.html +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/example_app_with_webhook/logo.svg +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/example_app_with_webhook/logo_dark.svg +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/example_app_with_webhook/src/__init__.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/example_app_with_webhook/src/app.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/interfaces/__init__.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/interfaces/test_artifact_interface.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/interfaces/test_container_interface.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/interfaces/test_vault_interface.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/meta/__init__.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/meta/test_adapters.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/meta/test_datatypes.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/meta/test_webhooks.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/mocks/__init__.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/mocks/dynamic_mocks.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/mocks/importable_action.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/stubs.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/test_app_action_params.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/test_app_action_results.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/test_app_client.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/test_assets/splunk-sdk-2.1.0.tar.gz +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/test_async_integration.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/test_async_utils.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/test_code_renderers.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/test_container.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/test_encryption.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/test_input_spec.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/test_logging.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/test_make_request_action.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/test_template_renderer.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/test_view_parser.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/webhooks/test_models.py +0 -0
- {splunk_soar_sdk-2.3.7 → splunk_soar_sdk-3.1.0}/tests/webhooks/test_routing.py +0 -0
|
@@ -30,7 +30,7 @@ jobs:
|
|
|
30
30
|
runs-on: ubuntu-latest
|
|
31
31
|
strategy:
|
|
32
32
|
matrix:
|
|
33
|
-
python-version: [3.
|
|
33
|
+
python-version: [3.13, 3.14]
|
|
34
34
|
steps:
|
|
35
35
|
- name: Checkout code
|
|
36
36
|
uses: actions/checkout@v4
|
|
@@ -46,7 +46,7 @@ jobs:
|
|
|
46
46
|
runs-on: ubuntu-latest
|
|
47
47
|
strategy:
|
|
48
48
|
matrix:
|
|
49
|
-
python-version: [3.
|
|
49
|
+
python-version: [3.13, 3.14]
|
|
50
50
|
steps:
|
|
51
51
|
- name: Checkout code
|
|
52
52
|
uses: actions/checkout@v4
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: splunk-soar-sdk
|
|
3
|
-
Version:
|
|
3
|
+
Version: 3.1.0
|
|
4
4
|
Summary: The official framework for developing and testing Splunk SOAR Apps
|
|
5
5
|
Project-URL: Homepage, https://github.com/phantomcyber/splunk-soar-sdk
|
|
6
6
|
Project-URL: Documentation, https://github.com/phantomcyber/splunk-soar-sdk
|
|
@@ -16,19 +16,18 @@ Classifier: Natural Language :: English
|
|
|
16
16
|
Classifier: Programming Language :: Python :: 3
|
|
17
17
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
18
18
|
Classifier: Typing :: Typed
|
|
19
|
-
Requires-Python:
|
|
20
|
-
Requires-Dist: beautifulsoup4
|
|
19
|
+
Requires-Python: <=3.14,>=3.13
|
|
20
|
+
Requires-Dist: beautifulsoup4>=4.10.0
|
|
21
21
|
Requires-Dist: bleach>=6.2.0
|
|
22
22
|
Requires-Dist: build>=1.3.0
|
|
23
23
|
Requires-Dist: click<8.2.0,>=8.0.0
|
|
24
|
-
Requires-Dist: distro
|
|
24
|
+
Requires-Dist: distro>=1.8.0
|
|
25
25
|
Requires-Dist: httpx>=0.28.1
|
|
26
26
|
Requires-Dist: humanize>=4.12.2
|
|
27
27
|
Requires-Dist: jinja2>=3.1.0
|
|
28
28
|
Requires-Dist: packaging>=25.0
|
|
29
|
-
Requires-Dist: pydantic<2
|
|
29
|
+
Requires-Dist: pydantic<3,>=2
|
|
30
30
|
Requires-Dist: requests<3
|
|
31
|
-
Requires-Dist: responses==0.22.0
|
|
32
31
|
Requires-Dist: setuptools>=80.9.0
|
|
33
32
|
Requires-Dist: toml<1,>=0.10.2
|
|
34
33
|
Requires-Dist: tqdm>=4.67.1
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = { extends: ['@commitlint/config-conventional'] };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "splunk-soar-sdk"
|
|
3
|
-
version = "
|
|
3
|
+
version = "3.1.0"
|
|
4
4
|
description = "The official framework for developing and testing Splunk SOAR Apps"
|
|
5
5
|
readme = "README.md"
|
|
6
|
-
requires-python = ">=3.
|
|
6
|
+
requires-python = ">=3.13, <=3.14"
|
|
7
7
|
license = "Apache-2.0"
|
|
8
8
|
license-files = ["LICENSE"]
|
|
9
9
|
keywords = ["cisco", "splunk", "soar", "phantom", "app", "connector", "sdk"]
|
|
@@ -31,11 +31,10 @@ dependencies = [
|
|
|
31
31
|
"typer>=0.12.5, <1",
|
|
32
32
|
"click>=8.0.0, <8.2.0",
|
|
33
33
|
# SOAR phantom lib dependencies
|
|
34
|
-
"beautifulsoup4
|
|
35
|
-
"distro
|
|
36
|
-
"pydantic
|
|
34
|
+
"beautifulsoup4>=4.10.0",
|
|
35
|
+
"distro>=1.8.0",
|
|
36
|
+
"pydantic>=2,<3",
|
|
37
37
|
"requests<3",
|
|
38
|
-
"responses==0.22.0",
|
|
39
38
|
"httpx>=0.28.1",
|
|
40
39
|
"tqdm>=4.67.1",
|
|
41
40
|
"humanize>=4.12.2",
|
|
@@ -81,6 +80,7 @@ dev = [
|
|
|
81
80
|
"tomlkit>=0.13.2",
|
|
82
81
|
"types-beautifulsoup4>=4.12.0.5,<5",
|
|
83
82
|
"types-requests>=2.31.0.1,<3",
|
|
83
|
+
"types-toml>=0.10.8,<1",
|
|
84
84
|
"types-tqdm>=4.67.0.20250417",
|
|
85
85
|
"types-urllib3>=1.26.25.13,<2",
|
|
86
86
|
]
|
|
@@ -103,18 +103,18 @@ url = "https://pypi.python.org/simple"
|
|
|
103
103
|
|
|
104
104
|
[tool.uv]
|
|
105
105
|
environments = [
|
|
106
|
-
"sys_platform == 'linux' and platform_machine == 'x86_64' and python_version == '3.9'",
|
|
107
106
|
"sys_platform == 'linux' and platform_machine == 'x86_64' and python_version == '3.13'",
|
|
108
|
-
"sys_platform == 'linux' and platform_machine == '
|
|
107
|
+
"sys_platform == 'linux' and platform_machine == 'x86_64' and python_version == '3.14'",
|
|
109
108
|
"sys_platform == 'linux' and platform_machine == 'aarch64' and python_version == '3.13'",
|
|
110
|
-
"sys_platform == '
|
|
109
|
+
"sys_platform == 'linux' and platform_machine == 'aarch64' and python_version == '3.14'",
|
|
111
110
|
"sys_platform == 'darwin' and platform_machine == 'x86_64' and python_version == '3.13'",
|
|
112
|
-
"sys_platform == 'darwin' and platform_machine == '
|
|
111
|
+
"sys_platform == 'darwin' and platform_machine == 'x86_64' and python_version == '3.14'",
|
|
113
112
|
"sys_platform == 'darwin' and platform_machine == 'arm64' and python_version == '3.13'",
|
|
113
|
+
"sys_platform == 'darwin' and platform_machine == 'arm64' and python_version == '3.14'",
|
|
114
114
|
]
|
|
115
115
|
required-environments = [
|
|
116
|
-
"sys_platform == 'linux' and platform_machine == 'x86_64' and python_version == '3.9'",
|
|
117
116
|
"sys_platform == 'linux' and platform_machine == 'x86_64' and python_version == '3.13'",
|
|
117
|
+
"sys_platform == 'linux' and platform_machine == 'x86_64' and python_version == '3.14'",
|
|
118
118
|
]
|
|
119
119
|
|
|
120
120
|
[tool.pytest.ini_options]
|
|
@@ -144,7 +144,7 @@ exclude_lines = [
|
|
|
144
144
|
[tool.ruff]
|
|
145
145
|
output-format = "full" # <full|concise>
|
|
146
146
|
fix = true
|
|
147
|
-
target-version = "
|
|
147
|
+
target-version = "py313"
|
|
148
148
|
|
|
149
149
|
[tool.ruff.lint]
|
|
150
150
|
select = [
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# [3.1.0](https://github.com/phantomcyber/splunk-soar-sdk/compare/3.0.0...3.1.0) (2025-10-27)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add es finding model into sdk for platform and sdk use ([199cfdf](https://github.com/phantomcyber/splunk-soar-sdk/commit/199cfdf6dc53a8914cd63a7514479694ed950862))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
# [3.1.0](https://github.com/phantomcyber/splunk-soar-sdk/compare/3.0.0...3.1.0) (2025-10-27)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* add es finding model into sdk for platform and sdk use ([199cfdf](https://github.com/phantomcyber/splunk-soar-sdk/commit/199cfdf6dc53a8914cd63a7514479694ed950862))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.1.0
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from abc import abstractmethod
|
|
2
|
-
from typing import Any,
|
|
2
|
+
from typing import Any, Generic, TypeVar
|
|
3
3
|
from collections.abc import Mapping, Iterable, AsyncIterable
|
|
4
4
|
|
|
5
5
|
from soar_sdk.apis.vault import Vault
|
|
@@ -8,9 +8,9 @@ from soar_sdk.apis.container import Container
|
|
|
8
8
|
from soar_sdk.action_results import ActionOutput
|
|
9
9
|
import httpx
|
|
10
10
|
from pydantic.dataclasses import dataclass
|
|
11
|
-
from pydantic import
|
|
11
|
+
from pydantic import field_validator
|
|
12
12
|
|
|
13
|
-
JSONType =
|
|
13
|
+
JSONType = dict[str, Any] | list[Any] | str | int | float | bool | None
|
|
14
14
|
SummaryType = TypeVar("SummaryType", bound=ActionOutput)
|
|
15
15
|
|
|
16
16
|
|
|
@@ -23,7 +23,8 @@ class SOARClientAuth:
|
|
|
23
23
|
password: str = ""
|
|
24
24
|
user_session_token: str = ""
|
|
25
25
|
|
|
26
|
-
@
|
|
26
|
+
@field_validator("base_url")
|
|
27
|
+
@classmethod
|
|
27
28
|
def validate_phantom_url(cls, value: str) -> str:
|
|
28
29
|
"""Validate and format the base URL for the SOAR API."""
|
|
29
30
|
return (
|
|
@@ -74,13 +75,13 @@ class SOARClient(Generic[SummaryType]):
|
|
|
74
75
|
self,
|
|
75
76
|
endpoint: str,
|
|
76
77
|
*,
|
|
77
|
-
params:
|
|
78
|
-
headers:
|
|
79
|
-
cookies:
|
|
80
|
-
timeout:
|
|
81
|
-
auth:
|
|
78
|
+
params: dict[str, Any] | httpx.QueryParams | None = None,
|
|
79
|
+
headers: dict[str, str] | None = None,
|
|
80
|
+
cookies: dict[str, str] | None = None,
|
|
81
|
+
timeout: httpx.Timeout | None = None,
|
|
82
|
+
auth: httpx.Auth | tuple[str, str] | None = None,
|
|
82
83
|
follow_redirects: bool = False,
|
|
83
|
-
extensions:
|
|
84
|
+
extensions: Mapping[str, Any] | None = None,
|
|
84
85
|
) -> httpx.Response:
|
|
85
86
|
"""Perform a GET request to the specific endpoint using the SOAR client."""
|
|
86
87
|
response = self.client.get(
|
|
@@ -100,19 +101,17 @@ class SOARClient(Generic[SummaryType]):
|
|
|
100
101
|
self,
|
|
101
102
|
endpoint: str,
|
|
102
103
|
*,
|
|
103
|
-
content:
|
|
104
|
-
|
|
105
|
-
] = None,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
auth: Optional[Union[httpx.Auth, tuple[str, str]]] = None,
|
|
113
|
-
timeout: Optional[Union[float, httpx.Timeout]] = None,
|
|
104
|
+
content: str | bytes | Iterable[bytes] | AsyncIterable[bytes] | None = None,
|
|
105
|
+
data: Mapping[str, Any] | None = None,
|
|
106
|
+
files: dict[str, Any] | None = None,
|
|
107
|
+
json: JSONType | None = None,
|
|
108
|
+
params: dict[str, Any] | None = None,
|
|
109
|
+
headers: dict[str, str] | None = None,
|
|
110
|
+
cookies: dict[str, str] | None = None,
|
|
111
|
+
auth: httpx.Auth | tuple[str, str] | None = None,
|
|
112
|
+
timeout: float | httpx.Timeout | None = None,
|
|
114
113
|
follow_redirects: bool = True,
|
|
115
|
-
extensions:
|
|
114
|
+
extensions: Mapping[str, Any] | None = None,
|
|
116
115
|
) -> httpx.Response:
|
|
117
116
|
"""Perform a POST request to the specific endpoint using the SOAR client."""
|
|
118
117
|
headers = headers or {}
|
|
@@ -138,19 +137,17 @@ class SOARClient(Generic[SummaryType]):
|
|
|
138
137
|
self,
|
|
139
138
|
endpoint: str,
|
|
140
139
|
*,
|
|
141
|
-
content:
|
|
142
|
-
|
|
143
|
-
] = None,
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
auth: Optional[Union[httpx.Auth, tuple[str, str]]] = None,
|
|
151
|
-
timeout: Optional[Union[float, httpx.Timeout]] = None,
|
|
140
|
+
content: str | bytes | Iterable[bytes] | AsyncIterable[bytes] | None = None,
|
|
141
|
+
data: Mapping[str, Any] | None = None,
|
|
142
|
+
files: dict[str, Any] | None = None,
|
|
143
|
+
json: JSONType | None = None,
|
|
144
|
+
params: dict[str, Any] | None = None,
|
|
145
|
+
headers: dict[str, str] | None = None,
|
|
146
|
+
cookies: dict[str, str] | None = None,
|
|
147
|
+
auth: httpx.Auth | tuple[str, str] | None = None,
|
|
148
|
+
timeout: float | httpx.Timeout | None = None,
|
|
152
149
|
follow_redirects: bool = True,
|
|
153
|
-
extensions:
|
|
150
|
+
extensions: Mapping[str, Any] | None = None,
|
|
154
151
|
) -> httpx.Response:
|
|
155
152
|
"""Perform a PUT request to the specific endpoint using the SOAR client."""
|
|
156
153
|
headers = headers or {}
|
|
@@ -176,13 +173,13 @@ class SOARClient(Generic[SummaryType]):
|
|
|
176
173
|
self,
|
|
177
174
|
endpoint: str,
|
|
178
175
|
*,
|
|
179
|
-
params:
|
|
180
|
-
headers:
|
|
181
|
-
cookies:
|
|
182
|
-
auth:
|
|
183
|
-
timeout:
|
|
176
|
+
params: dict[str, Any] | httpx.QueryParams | None = None,
|
|
177
|
+
headers: dict[str, str] | None = None,
|
|
178
|
+
cookies: dict[str, str] | None = None,
|
|
179
|
+
auth: httpx.Auth | tuple[str, str] | None = None,
|
|
180
|
+
timeout: httpx.Timeout | None = None,
|
|
184
181
|
follow_redirects: bool = False,
|
|
185
|
-
extensions:
|
|
182
|
+
extensions: Mapping[str, Any] | None = None,
|
|
186
183
|
) -> httpx.Response:
|
|
187
184
|
"""Perform a DELETE request to the specific endpoint using the SOAR client."""
|
|
188
185
|
headers = headers or {}
|
|
@@ -229,7 +226,7 @@ class SOARClient(Generic[SummaryType]):
|
|
|
229
226
|
pass
|
|
230
227
|
|
|
231
228
|
@abstractmethod
|
|
232
|
-
def get_summary(self) ->
|
|
229
|
+
def get_summary(self) -> SummaryType | None:
|
|
233
230
|
"""Get the summary for the action run."""
|
|
234
231
|
pass
|
|
235
232
|
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
from typing import
|
|
1
|
+
from typing import Union, get_origin, get_args, Any
|
|
2
2
|
from collections.abc import Iterator
|
|
3
|
-
from typing_extensions import
|
|
4
|
-
from
|
|
3
|
+
from typing_extensions import TypedDict
|
|
4
|
+
from typing import NotRequired
|
|
5
|
+
from pydantic import BaseModel, Field, ConfigDict
|
|
5
6
|
import itertools
|
|
7
|
+
import types
|
|
6
8
|
|
|
7
9
|
from soar_sdk.compat import remove_when_soar_newer_than
|
|
8
10
|
from soar_sdk.shims.phantom.action_result import ActionResult as PhantomActionResult
|
|
9
11
|
from soar_sdk.meta.datatypes import as_datatype
|
|
12
|
+
from soar_sdk.field_utils import parse_json_schema_extra
|
|
10
13
|
|
|
11
14
|
remove_when_soar_newer_than(
|
|
12
15
|
"7.0.0", "NotRequired from typing_extensions is in typing in Python 3.11+"
|
|
@@ -40,7 +43,7 @@ class ActionResult(PhantomActionResult):
|
|
|
40
43
|
self,
|
|
41
44
|
status: bool,
|
|
42
45
|
message: str,
|
|
43
|
-
param:
|
|
46
|
+
param: dict | None = None,
|
|
44
47
|
) -> None:
|
|
45
48
|
"""Initialize an ActionResult with status, message, and optional parameters.
|
|
46
49
|
|
|
@@ -82,16 +85,16 @@ class OutputFieldSpecification(TypedDict):
|
|
|
82
85
|
data_path: str
|
|
83
86
|
data_type: str
|
|
84
87
|
contains: NotRequired[list[str]]
|
|
85
|
-
example_values: NotRequired[list[
|
|
88
|
+
example_values: NotRequired[list[str | float | bool]]
|
|
86
89
|
column_name: NotRequired[str]
|
|
87
90
|
column_order: NotRequired[int]
|
|
88
91
|
|
|
89
92
|
|
|
90
93
|
def OutputField(
|
|
91
|
-
cef_types:
|
|
92
|
-
example_values:
|
|
93
|
-
alias:
|
|
94
|
-
column_name:
|
|
94
|
+
cef_types: list[str] | None = None,
|
|
95
|
+
example_values: list[str | float | bool] | None = None,
|
|
96
|
+
alias: str | None = None,
|
|
97
|
+
column_name: str | None = None,
|
|
95
98
|
) -> Any: # noqa: ANN401
|
|
96
99
|
"""Define metadata for an action output field.
|
|
97
100
|
|
|
@@ -121,11 +124,18 @@ def OutputField(
|
|
|
121
124
|
... )
|
|
122
125
|
... count: int = OutputField(example_values=[1, 5, 10])
|
|
123
126
|
"""
|
|
127
|
+
json_schema_extra: dict[str, Any] = {}
|
|
128
|
+
if cef_types is not None:
|
|
129
|
+
json_schema_extra["cef_types"] = cef_types
|
|
130
|
+
if example_values is not None:
|
|
131
|
+
json_schema_extra["examples"] = example_values
|
|
132
|
+
if column_name is not None:
|
|
133
|
+
json_schema_extra["column_name"] = column_name
|
|
134
|
+
|
|
124
135
|
return Field(
|
|
125
|
-
|
|
136
|
+
default=...,
|
|
126
137
|
alias=alias,
|
|
127
|
-
|
|
128
|
-
column_name=column_name,
|
|
138
|
+
json_schema_extra=json_schema_extra if json_schema_extra else None,
|
|
129
139
|
)
|
|
130
140
|
|
|
131
141
|
|
|
@@ -158,11 +168,14 @@ class ActionOutput(BaseModel):
|
|
|
158
168
|
Nested ActionOutput classes are supported for complex data structures.
|
|
159
169
|
"""
|
|
160
170
|
|
|
171
|
+
# Allow instantiation with both field names and aliases for backward compatibility
|
|
172
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
173
|
+
|
|
161
174
|
@classmethod
|
|
162
175
|
def _to_json_schema(
|
|
163
176
|
cls,
|
|
164
177
|
parent_datapath: str = "action_result.data.*",
|
|
165
|
-
column_order_counter:
|
|
178
|
+
column_order_counter: itertools.count | None = None,
|
|
166
179
|
) -> Iterator[OutputFieldSpecification]:
|
|
167
180
|
"""Convert the ActionOutput class to SOAR-compatible JSON schema.
|
|
168
181
|
|
|
@@ -191,15 +204,18 @@ class ActionOutput(BaseModel):
|
|
|
191
204
|
if column_order_counter is None:
|
|
192
205
|
column_order_counter = itertools.count()
|
|
193
206
|
|
|
194
|
-
for _field_name, field in cls.
|
|
207
|
+
for _field_name, field in cls.model_fields.items():
|
|
195
208
|
field_name = alias if (alias := field.alias) else _field_name
|
|
196
209
|
|
|
197
210
|
field_type = field.annotation
|
|
211
|
+
if field_type is None:
|
|
212
|
+
continue
|
|
213
|
+
|
|
198
214
|
datapath = parent_datapath + f".{field_name}"
|
|
199
215
|
|
|
200
216
|
# Handle lists and optional types, even nested ones
|
|
201
217
|
origin = get_origin(field_type)
|
|
202
|
-
while origin in [list, Union,
|
|
218
|
+
while origin in [list, Union, types.UnionType]:
|
|
203
219
|
type_args = [
|
|
204
220
|
arg
|
|
205
221
|
for arg in get_args(field_type)
|
|
@@ -221,6 +237,11 @@ class ActionOutput(BaseModel):
|
|
|
221
237
|
field_type = type_args[0]
|
|
222
238
|
origin = get_origin(field_type)
|
|
223
239
|
|
|
240
|
+
if not isinstance(field_type, type):
|
|
241
|
+
raise TypeError(
|
|
242
|
+
f"Output field {field_name} has invalid type annotation: {field_type}"
|
|
243
|
+
)
|
|
244
|
+
|
|
224
245
|
if issubclass(field_type, ActionOutput):
|
|
225
246
|
# If the field is another ActionOutput, recursively call _to_json_schema
|
|
226
247
|
yield from field_type._to_json_schema(datapath, column_order_counter)
|
|
@@ -237,15 +258,17 @@ class ActionOutput(BaseModel):
|
|
|
237
258
|
data_path=datapath, data_type=type_name
|
|
238
259
|
)
|
|
239
260
|
|
|
240
|
-
|
|
261
|
+
json_schema_extra = parse_json_schema_extra(field.json_schema_extra)
|
|
262
|
+
|
|
263
|
+
if cef_types := json_schema_extra.get("cef_types"):
|
|
241
264
|
schema_field["contains"] = cef_types
|
|
242
|
-
if examples :=
|
|
265
|
+
if examples := json_schema_extra.get("examples"):
|
|
243
266
|
schema_field["example_values"] = examples
|
|
244
267
|
|
|
245
268
|
if field_type is bool:
|
|
246
269
|
schema_field["example_values"] = [True, False]
|
|
247
270
|
|
|
248
|
-
column_name =
|
|
271
|
+
column_name = json_schema_extra.get("column_name")
|
|
249
272
|
|
|
250
273
|
if column_name is not None:
|
|
251
274
|
schema_field["column_name"] = column_name
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import
|
|
1
|
+
from typing import Any
|
|
2
2
|
import os
|
|
3
3
|
|
|
4
4
|
from soar_sdk.compat import remove_when_soar_newer_than
|
|
@@ -31,7 +31,7 @@ class ActionsManager(BaseConnector):
|
|
|
31
31
|
self.auth_state: dict = {}
|
|
32
32
|
self.asset_cache: dict = {}
|
|
33
33
|
|
|
34
|
-
def get_action(self, identifier: str) ->
|
|
34
|
+
def get_action(self, identifier: str) -> Action | None:
|
|
35
35
|
"""Convenience method for getting an Action callable from its identifier.
|
|
36
36
|
|
|
37
37
|
Returns None if there are no actions managed by this object matching the given
|
|
@@ -60,14 +60,12 @@ class ActionsManager(BaseConnector):
|
|
|
60
60
|
"""
|
|
61
61
|
self._actions[action_identifier] = wrapped_function
|
|
62
62
|
|
|
63
|
-
def handle(
|
|
64
|
-
self, input_data: InputSpecification, handle: Optional[int] = None
|
|
65
|
-
) -> str:
|
|
63
|
+
def handle(self, input_data: InputSpecification, handle: int | None = None) -> str:
|
|
66
64
|
"""Runs handling of the input data on connector."""
|
|
67
65
|
action_id = input_data.identifier
|
|
68
66
|
if self.get_action(action_id):
|
|
69
67
|
self.print_progress_message = True
|
|
70
|
-
return self._handle_action(input_data.
|
|
68
|
+
return self._handle_action(input_data.model_dump_json(), handle or 0)
|
|
71
69
|
else:
|
|
72
70
|
raise RuntimeError(
|
|
73
71
|
f"Action {action_id} not recognized"
|
|
@@ -86,7 +84,7 @@ class ActionsManager(BaseConnector):
|
|
|
86
84
|
|
|
87
85
|
if handler := self.get_action(action_id):
|
|
88
86
|
try:
|
|
89
|
-
params = handler.meta.parameters.
|
|
87
|
+
params = handler.meta.parameters.model_validate(param)
|
|
90
88
|
except (ValueError, ValidationError) as e:
|
|
91
89
|
self.save_progress(
|
|
92
90
|
f"Validation Error - the params data for action could not be parsed: {e!s}"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import httpx
|
|
2
|
-
from typing import
|
|
2
|
+
from typing import Any
|
|
3
3
|
from collections.abc import Generator
|
|
4
4
|
|
|
5
5
|
|
|
@@ -11,9 +11,9 @@ def is_client_authenticated(client: httpx.Client) -> bool:
|
|
|
11
11
|
def get_request_iter_pages(
|
|
12
12
|
client: httpx.Client,
|
|
13
13
|
endpoint: str,
|
|
14
|
-
params:
|
|
14
|
+
params: dict | None = None,
|
|
15
15
|
page_size: int = 50,
|
|
16
|
-
) -> Generator[Any
|
|
16
|
+
) -> Generator[Any]:
|
|
17
17
|
"""Iterate through REST JSON results using the provided paging."""
|
|
18
18
|
params = params or {}
|
|
19
19
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import TYPE_CHECKING
|
|
1
|
+
from typing import TYPE_CHECKING
|
|
2
2
|
from soar_sdk.models.vault_attachment import VaultAttachment
|
|
3
3
|
from soar_sdk.shims.phantom.vault import PhantomVault, VaultBase
|
|
4
4
|
|
|
@@ -47,9 +47,9 @@ class Vault:
|
|
|
47
47
|
def create_attachment(
|
|
48
48
|
self,
|
|
49
49
|
container_id: int,
|
|
50
|
-
file_content:
|
|
50
|
+
file_content: str | bytes,
|
|
51
51
|
file_name: str,
|
|
52
|
-
metadata:
|
|
52
|
+
metadata: dict[str, str] | None = None,
|
|
53
53
|
) -> str:
|
|
54
54
|
"""Create a vault attachment from file content.
|
|
55
55
|
|
|
@@ -87,7 +87,7 @@ class Vault:
|
|
|
87
87
|
container_id: int,
|
|
88
88
|
file_location: str,
|
|
89
89
|
file_name: str,
|
|
90
|
-
metadata:
|
|
90
|
+
metadata: dict[str, str] | None = None,
|
|
91
91
|
) -> str:
|
|
92
92
|
"""Add an existing file to the vault as an attachment.
|
|
93
93
|
|
|
@@ -121,9 +121,9 @@ class Vault:
|
|
|
121
121
|
|
|
122
122
|
def get_attachment(
|
|
123
123
|
self,
|
|
124
|
-
vault_id:
|
|
125
|
-
file_name:
|
|
126
|
-
container_id:
|
|
124
|
+
vault_id: str | None = None,
|
|
125
|
+
file_name: str | None = None,
|
|
126
|
+
container_id: int | None = None,
|
|
127
127
|
) -> list[VaultAttachment]:
|
|
128
128
|
"""Retrieve attachment(s) from the vault.
|
|
129
129
|
|
|
@@ -161,9 +161,9 @@ class Vault:
|
|
|
161
161
|
|
|
162
162
|
def delete_attachment(
|
|
163
163
|
self,
|
|
164
|
-
vault_id:
|
|
165
|
-
file_name:
|
|
166
|
-
container_id:
|
|
164
|
+
vault_id: str | None = None,
|
|
165
|
+
file_name: str | None = None,
|
|
166
|
+
container_id: int | None = None,
|
|
167
167
|
remove_all: bool = False,
|
|
168
168
|
) -> list[str]:
|
|
169
169
|
"""Delete attachment(s) from the vault.
|