xsoar-cli 2.2.0__tar.gz → 2.4.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.
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/CHANGELOG.md +47 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/CLAUDE.md +6 -4
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/PKG-INFO +1 -1
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/_version.py +2 -2
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/pyproject.toml +4 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/cli.py +40 -3
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/commands/content/README.md +36 -6
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/commands/content/commands.py +75 -16
- xsoar_cli-2.4.0/src/xsoar_cli/commands/execute/README.md +67 -0
- xsoar_cli-2.4.0/src/xsoar_cli/commands/execute/commands.py +337 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/commands/manifest/README.md +4 -1
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/commands/manifest/commands.py +36 -35
- xsoar_cli-2.4.0/src/xsoar_cli/utilities/content.py +303 -0
- xsoar_cli-2.4.0/src/xsoar_cli/utilities/output.py +262 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/xsoar_client/client.py +2 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/xsoar_client/content.py +117 -15
- xsoar_cli-2.4.0/src/xsoar_cli/xsoar_client/execution.py +260 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/cli/conftest.py +100 -3
- xsoar_cli-2.4.0/tests/cli/test_base.py +71 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/cli/test_case.py +0 -2
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/cli/test_content.py +193 -0
- xsoar_cli-2.4.0/tests/cli/test_execute.py +287 -0
- xsoar_cli-2.4.0/tests/cli/test_manifest.py +225 -0
- xsoar_cli-2.4.0/tests/unit/__init__.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/unit/test_config_file.py +1 -3
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/unit/test_content_domain.py +206 -5
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/unit/test_content_filters.py +252 -31
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/unit/test_content_handlers.py +0 -1
- xsoar_cli-2.4.0/tests/unit/test_execution.py +225 -0
- xsoar_cli-2.4.0/tests/unit/test_output.py +130 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/unit/test_validators.py +3 -4
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/unit/test_version_check.py +0 -1
- xsoar_cli-2.2.0/src/xsoar_cli/utilities/content.py +0 -210
- xsoar_cli-2.2.0/tests/cli/test_base.py +0 -17
- xsoar_cli-2.2.0/tests/cli/test_manifest.py +0 -18
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/.github/workflows/main.yml +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/.github/workflows/pull-request-open.yml +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/.github/workflows/release.yml +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/.github/workflows/update-changelog.yml +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/.gitignore +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/CONTRIBUTING.md +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/LICENSE.txt +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/README.md +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/__init__.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/commands/__init__.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/commands/case/README.md +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/commands/case/__init__.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/commands/case/commands.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/commands/completions/README.md +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/commands/completions/__init__.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/commands/completions/commands.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/commands/config/README.md +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/commands/config/__init__.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/commands/config/commands.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/commands/content/__init__.py +0 -0
- {xsoar_cli-2.2.0/src/xsoar_cli/commands/graph → xsoar_cli-2.4.0/src/xsoar_cli/commands/execute}/__init__.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/commands/graph/README.md +0 -0
- {xsoar_cli-2.2.0/src/xsoar_cli/commands/integration → xsoar_cli-2.4.0/src/xsoar_cli/commands/graph}/__init__.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/commands/graph/commands.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/commands/integration/README.md +0 -0
- {xsoar_cli-2.2.0/src/xsoar_cli/commands/manifest → xsoar_cli-2.4.0/src/xsoar_cli/commands/integration}/__init__.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/commands/integration/commands.py +0 -0
- {xsoar_cli-2.2.0/src/xsoar_cli/commands/pack → xsoar_cli-2.4.0/src/xsoar_cli/commands/manifest}/__init__.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/commands/pack/README.md +0 -0
- {xsoar_cli-2.2.0/src/xsoar_cli/commands/plugins → xsoar_cli-2.4.0/src/xsoar_cli/commands/pack}/__init__.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/commands/pack/commands.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/commands/plugins/README.md +0 -0
- {xsoar_cli-2.2.0/src/xsoar_cli/commands/rbac → xsoar_cli-2.4.0/src/xsoar_cli/commands/plugins}/__init__.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/commands/plugins/commands.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/commands/rbac/README.md +0 -0
- {xsoar_cli-2.2.0/src/xsoar_cli/error_handling → xsoar_cli-2.4.0/src/xsoar_cli/commands/rbac}/__init__.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/commands/rbac/commands.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/configuration.py +0 -0
- {xsoar_cli-2.2.0/src/xsoar_cli/utilities → xsoar_cli-2.4.0/src/xsoar_cli/error_handling}/__init__.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/error_handling/connection.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/error_handling/http.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/log.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/plugins/README.md +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/plugins/__init__.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/plugins/manager.py +0 -0
- {xsoar_cli-2.2.0/src/xsoar_cli/xsoar_client → xsoar_cli-2.4.0/src/xsoar_cli/utilities}/__init__.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/utilities/config_file.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/utilities/download_content_handlers.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/utilities/manifest.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/utilities/validators.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/utilities/version_check.py +0 -0
- {xsoar_cli-2.2.0/src/xsoar_cli/xsoar_client/artifact_providers → xsoar_cli-2.4.0/src/xsoar_cli/xsoar_client}/__init__.py +0 -0
- {xsoar_cli-2.2.0/tests/cli → xsoar_cli-2.4.0/src/xsoar_cli/xsoar_client/artifact_providers}/__init__.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/xsoar_client/artifact_providers/azure.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/xsoar_client/artifact_providers/base.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/xsoar_client/artifact_providers/s3.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/xsoar_client/cases.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/xsoar_client/constants.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/xsoar_client/integrations.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/xsoar_client/packs.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/src/xsoar_cli/xsoar_client/rbac.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/__init__.py +0 -0
- {xsoar_cli-2.2.0/tests/unit → xsoar_cli-2.4.0/tests/cli}/__init__.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/cli/test_completions.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/cli/test_config.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/cli/test_graph.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/cli/test_pack.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/cli/test_plugins.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/conftest.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/fixtures/cases/create.json +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/fixtures/cases/get.json +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/fixtures/content/automation_search.json +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/fixtures/content/playbook_search.json +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/fixtures/content/user_commands.json +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/fixtures/integrations/instances.json +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/fixtures/manifest/manifest_base.json +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/fixtures/manifest/manifest_invalid.json +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/fixtures/manifest/manifest_with_pack_not_on_server.json +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/fixtures/manifest/server_base_response.json +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/fixtures/manifest/server_base_response_missing_one_pack.json +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/fixtures/manifest/server_base_response_with_updates.json +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/fixtures/manifest/server_base_response_with_updates_and_one_extra.json +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/fixtures/packs/installed.json +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/fixtures/packs/installed_expired.json +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/fixtures/rbac/roles.json +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/fixtures/rbac/user_groups.json +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/fixtures/rbac/users.json +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Download/playbook-empty.yml +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_CommonPlaybooks/.pack-ignore +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_CommonPlaybooks/.secrets-ignore +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_CommonPlaybooks/Author_image.png +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_CommonPlaybooks/Playbooks/GenericPlaybook.yml +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_CommonPlaybooks/README.md +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_CommonPlaybooks/pack_metadata.json +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_CommonScripts/.pack-ignore +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_CommonScripts/.secrets-ignore +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_CommonScripts/Author_image.png +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_CommonScripts/README.md +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_CommonScripts/Scripts/GenericScript/GenericScript.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_CommonScripts/Scripts/GenericScript/GenericScript.yml +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_CommonScripts/Scripts/GenericScript/README.md +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_CommonScripts/pack_metadata.json +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_EDR/.pack-ignore +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_EDR/.secrets-ignore +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_EDR/Author_image.png +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_EDR/Playbooks/EDR_InitialTriage.yml +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_EDR/README.md +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_EDR/Scripts/EDR_FetchFile/EDR_FetchFile.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_EDR/Scripts/EDR_FetchFile/EDR_FetchFile.yml +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_EDR/Scripts/EDR_FetchFile/README.md +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_EDR/Scripts/EDR_Triage/EDR_Triage.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_EDR/Scripts/EDR_Triage/EDR_Triage.yml +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_EDR/Scripts/EDR_Triage/README.md +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_EDR/Scripts/LegacyItem/LegacyItem.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_EDR/Scripts/LegacyItem/LegacyItem.yml +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_EDR/Scripts/LegacyItem/README.md +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_EDR/Scripts/LegacyItem/test_data/basescript-dummy.json +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_EDR/pack_metadata.json +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_Layouts/.pack-ignore +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_Layouts/.secrets-ignore +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_Layouts/Author_image.png +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_Layouts/Layouts/layoutscontainer-GenericLayout.json +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_Layouts/README.md +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/MyOrg_Layouts/pack_metadata.json +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/mock_content/Packs/Not_applicable/Playbooks/Empty.yml +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/unit/conftest.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/unit/test_artifact_azure.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/unit/test_artifact_base.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/unit/test_artifact_s3.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/unit/test_cases.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/unit/test_client.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/unit/test_error_handling.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/unit/test_integrations.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/unit/test_main.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/unit/test_manifest_utils.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/unit/test_packs.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/unit/test_plugin_manager.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/tests/unit/test_rbac.py +0 -0
- {xsoar_cli-2.2.0 → xsoar_cli-2.4.0}/uv.lock +0 -0
|
@@ -8,6 +8,53 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
8
8
|
|
|
9
9
|
### Added
|
|
10
10
|
|
|
11
|
+
- `content get-detached --type all` queries both scripts and playbooks and displays results for each type.
|
|
12
|
+
- `content list --output-format` option (choices: `table`, `json`, `plain`, default: `table`). `table` is human-readable aligned columns, `json` is machine-readable, and `plain` is tab-separated values suitable for piping to tools like `grep`.
|
|
13
|
+
- `content list --search TERM` option. Filters the listed items with a case-insensitive substring match against each item's id, name, and description. Content types and integration brands with no matching items are omitted, and a `No content matching '<term>' found.` message is shown when nothing matches.
|
|
14
|
+
- `content describe --type [script|playbook|command] NAME` command. Shows a single content item in detail: description, arguments, and inputs/outputs. Commands also show the integration brand and its configured instances (name and state). Supports `--output-format [table|json]` (default: `table`). See the [content README](src/xsoar_cli/commands/content/README.md) for details.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- `content get-detached` now prints a human-readable summary instead of raw JSON. Output is a count followed by one line per item in the form `<name> (ID: <id>)`, or `No detached <type> found` when there are none.
|
|
19
|
+
- **Breaking:** `content list` now defaults to a human-readable table instead of JSON. Use `--output-format json` for machine-readable output.
|
|
20
|
+
- `content list` playbook output now shows the playbook ID and description (read from the `comment` field) instead of the name and ID.
|
|
21
|
+
- `content list` command output now shows the command name and description and no longer includes the integration brand. The summary-level JSON structure for commands is now a list of `{name, description}` objects instead of plain command-name strings.
|
|
22
|
+
|
|
23
|
+
### Removed
|
|
24
|
+
|
|
25
|
+
- **Breaking:** `content list --detail-level` option, along with its `short`, `extended`, and `full` levels. `content list` now always produces a curated summary. Per-item detail (arguments, inputs, outputs) is available through the `content describe` command.
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
- `content get-detached` now returns only the content items that are actually detached. The previous query returned all system items, so the command reported every system script (or playbook) as detached instead of just the detached ones. Results are now filtered on each item's `detached` field.
|
|
30
|
+
|
|
31
|
+
## [2.3.0] - 2026-06-04
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
|
|
35
|
+
- `execute command NAME [ARGS]...` runs an automation script or integration command against XSOAR, in the user's playground by default or a specific case with `--case-id`. See the [execute README](src/xsoar_cli/commands/execute/README.md) for details.
|
|
36
|
+
- `execute playbook NAME` starts a playbook in the user's playground, or a specific case with `--case-id`. See the [execute README](src/xsoar_cli/commands/execute/README.md) for details.
|
|
37
|
+
|
|
38
|
+
### Fixed
|
|
39
|
+
|
|
40
|
+
- `content download` now correctly resolves playbooks whose ID differs from their name when the name contains spaces. Previously, the name search query was not quoted, causing it to return no results. In practice this affected custom playbooks created in the XSOAR UI, which use a UUID as their ID.
|
|
41
|
+
|
|
42
|
+
### Changed
|
|
43
|
+
|
|
44
|
+
- **Breaking:** `manifest validate` now validates all packs by default (previously defaulted to `--mode diff`). Use the new `--only-changed` flag to validate only packs that differ from what is installed on the server.
|
|
45
|
+
- **Breaking:** `content list` now uses a single `--detail-level` option (choices: `short`, `extended`, `full`, default: `short`) instead of the separate `--details` and `--verbose` flags.
|
|
46
|
+
- Plugin commands are now listed under a separate `Plugins:` section in `--help` output instead of being mixed with core commands.
|
|
47
|
+
|
|
48
|
+
### Removed
|
|
49
|
+
|
|
50
|
+
- `manifest validate --mode` option. Use `--only-changed` instead of `--mode diff`. Full validation is now the default.
|
|
51
|
+
- `content list --details` flag. Use `--detail-level extended` instead.
|
|
52
|
+
- `content list --verbose` flag. Use `--detail-level full` instead.
|
|
53
|
+
|
|
54
|
+
## [2.2.0] - 2026-04-10
|
|
55
|
+
|
|
56
|
+
### Added
|
|
57
|
+
|
|
11
58
|
- `config set-version-check` command to enable or disable the version update check on CLI startup. Accepts `--enable` or `--disable`.
|
|
12
59
|
- `plugins init` command to create the plugins directory and generate an example plugin.
|
|
13
60
|
|
|
@@ -28,7 +28,7 @@ for confirmation before executing any terminal commands as they may have consequ
|
|
|
28
28
|
- **Build System**: Hatchling (`pyproject.toml`)
|
|
29
29
|
- **Package Manager**: uv (`uv.lock`)
|
|
30
30
|
- **Linting**: Ruff
|
|
31
|
-
- **Formatting**: Black
|
|
31
|
+
- **Formatting**: Ruff formatter (>99.9% Black-compatible)
|
|
32
32
|
- **Testing**: pytest, pytest-cov
|
|
33
33
|
- **CI**: GitHub Actions (Python 3.10-3.14)
|
|
34
34
|
|
|
@@ -142,10 +142,10 @@ uv run pytest tests/cli/
|
|
|
142
142
|
uv run pytest tests/unit/
|
|
143
143
|
|
|
144
144
|
# Format code
|
|
145
|
-
|
|
145
|
+
uv run ruff format src/ tests/
|
|
146
146
|
|
|
147
147
|
# Lint
|
|
148
|
-
ruff check src/ tests/
|
|
148
|
+
uv run ruff check src/ tests/
|
|
149
149
|
|
|
150
150
|
# Run the CLI
|
|
151
151
|
uv run xsoar-cli --help
|
|
@@ -206,9 +206,11 @@ The user's live configuration at `~/.config/xsoar-cli/config.json` contains API
|
|
|
206
206
|
|
|
207
207
|
## Changelog
|
|
208
208
|
|
|
209
|
+
**Every PR that changes user-facing behavior MUST include a `CHANGELOG.md` update. Do not treat this as optional or as a follow-up step. The changelog entry is part of the implementation, not separate from it.**
|
|
210
|
+
|
|
209
211
|
- The project maintains a `CHANGELOG.md` in the repository root.
|
|
210
212
|
- The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
211
|
-
-
|
|
213
|
+
- Changes that require a changelog entry:
|
|
212
214
|
- Adding, removing, or renaming commands, options, or arguments (`Added` / `Removed`)
|
|
213
215
|
- Changes to default behavior or output format (`Changed`)
|
|
214
216
|
- Bug fixes (`Fixed`)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: xsoar-cli
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.4.0
|
|
4
4
|
Summary: A command-line interface for managing Palo Alto Networks XSOAR (Cortex XSOAR)
|
|
5
5
|
Project-URL: Documentation, https://github.com/tlium/xsoar-cli#readme
|
|
6
6
|
Project-URL: Issues, https://github.com/tlium/xsoar-cli/issues
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '2.
|
|
22
|
-
__version_tuple__ = version_tuple = (2,
|
|
21
|
+
__version__ = version = '2.4.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (2, 4, 0)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -68,6 +68,10 @@ exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"]
|
|
|
68
68
|
[tool.pytest.ini_options]
|
|
69
69
|
testpaths = ["tests"]
|
|
70
70
|
|
|
71
|
+
[tool.ruff]
|
|
72
|
+
line-length = 140
|
|
73
|
+
extend-exclude = ["tests/mock_content"]
|
|
74
|
+
|
|
71
75
|
[dependency-groups]
|
|
72
76
|
dev = [
|
|
73
77
|
"pytest>=9.0.2",
|
|
@@ -17,6 +17,7 @@ from .commands.case import commands as case_commands
|
|
|
17
17
|
from .commands.completions import commands as completions_commands
|
|
18
18
|
from .commands.config import commands as config_commands
|
|
19
19
|
from .commands.content import commands as content_commands
|
|
20
|
+
from .commands.execute import commands as execute_commands
|
|
20
21
|
from .commands.graph import commands as graph_commands
|
|
21
22
|
from .commands.integration import commands as integration_commands
|
|
22
23
|
from .commands.manifest import commands as manifest_commands
|
|
@@ -30,12 +31,46 @@ from .utilities.version_check import check_for_update
|
|
|
30
31
|
|
|
31
32
|
|
|
32
33
|
class XSOARCliGroup(click.Group):
|
|
33
|
-
"""Custom Click group
|
|
34
|
+
"""Custom Click group with separate help sections for core and plugin commands.
|
|
34
35
|
|
|
35
|
-
|
|
36
|
-
"No such command" error with no indication that a
|
|
36
|
+
Also surfaces plugin load failures when a command is not found, so the user
|
|
37
|
+
does not get a generic "No such command" error with no indication that a
|
|
38
|
+
plugin was involved.
|
|
37
39
|
"""
|
|
38
40
|
|
|
41
|
+
def __init__(self, *args, **kwargs):
|
|
42
|
+
super().__init__(*args, **kwargs)
|
|
43
|
+
self.core_commands: set[str] = set()
|
|
44
|
+
|
|
45
|
+
def format_commands(self, ctx: click.Context, formatter: click.HelpFormatter) -> None:
|
|
46
|
+
"""Format help output with core commands and plugin commands in separate sections."""
|
|
47
|
+
core_rows = []
|
|
48
|
+
plugin_rows = []
|
|
49
|
+
|
|
50
|
+
for subcommand in self.list_commands(ctx):
|
|
51
|
+
cmd = self.get_command(ctx, subcommand)
|
|
52
|
+
if cmd is None or cmd.hidden:
|
|
53
|
+
continue
|
|
54
|
+
target = core_rows if subcommand in self.core_commands else plugin_rows
|
|
55
|
+
target.append((subcommand, cmd))
|
|
56
|
+
|
|
57
|
+
if not core_rows and not plugin_rows:
|
|
58
|
+
return
|
|
59
|
+
|
|
60
|
+
all_names = core_rows + plugin_rows
|
|
61
|
+
limit = formatter.width - 6 - max(len(name) for name, _ in all_names)
|
|
62
|
+
|
|
63
|
+
def make_rows(commands):
|
|
64
|
+
return [(name, cmd.get_short_help_str(limit)) for name, cmd in commands]
|
|
65
|
+
|
|
66
|
+
if core_rows:
|
|
67
|
+
with formatter.section("Commands"):
|
|
68
|
+
formatter.write_dl(make_rows(core_rows))
|
|
69
|
+
|
|
70
|
+
if plugin_rows:
|
|
71
|
+
with formatter.section("Plugins"):
|
|
72
|
+
formatter.write_dl(make_rows(plugin_rows))
|
|
73
|
+
|
|
39
74
|
def resolve_command(self, ctx: click.Context, args: list) -> tuple:
|
|
40
75
|
try:
|
|
41
76
|
return super().resolve_command(ctx, args)
|
|
@@ -70,6 +105,7 @@ def _register_commands() -> None:
|
|
|
70
105
|
cli.add_command(config_commands.config)
|
|
71
106
|
cli.add_command(content_commands.content)
|
|
72
107
|
|
|
108
|
+
cli.add_command(execute_commands.execute)
|
|
73
109
|
cli.add_command(graph_commands.graph)
|
|
74
110
|
cli.add_command(integration_commands.integration)
|
|
75
111
|
cli.add_command(manifest_commands.manifest)
|
|
@@ -129,6 +165,7 @@ def _configure_logging(config_data: dict | None) -> LoggingSetup:
|
|
|
129
165
|
# "Exit:" entries for pytest invocations.
|
|
130
166
|
_register_commands()
|
|
131
167
|
CORE_COMMANDS, plugin_manager = _load_plugins()
|
|
168
|
+
cli.core_commands = set(CORE_COMMANDS)
|
|
132
169
|
|
|
133
170
|
# Initialized in main(). None when the module is imported without calling main(),
|
|
134
171
|
# which is the case during test runs.
|
|
@@ -4,40 +4,70 @@ Inspect and manage content items on your XSOAR server.
|
|
|
4
4
|
|
|
5
5
|
## Get Detached
|
|
6
6
|
|
|
7
|
-
List detached content items. Detached items are content items that
|
|
7
|
+
List detached content items. Detached items are content items that have been modified on the server and are no longer in sync with the installed content pack.
|
|
8
|
+
|
|
9
|
+
The output is a human-readable summary: a count followed by one line per item in the form `<name> (ID: <id>)`. When no detached items are found, the output is `No detached <type> found` (for example `No detached scripts found`). This applies to both `--type scripts` and `--type playbooks`.
|
|
8
10
|
|
|
9
11
|
**Syntax:** `xsoar-cli content get-detached [OPTIONS]`
|
|
10
12
|
|
|
11
13
|
**Options:**
|
|
12
14
|
- `--environment TEXT` - Target environment (default: uses default environment from config)
|
|
13
|
-
- `--type [scripts|playbooks|all]` - Type of content items to retrieve (
|
|
15
|
+
- `--type [scripts|playbooks|all]` - Type of content items to retrieve (required)
|
|
14
16
|
|
|
15
17
|
**Examples:**
|
|
16
18
|
```
|
|
17
|
-
xsoar-cli content get-detached
|
|
18
|
-
xsoar-cli content get-detached --environment prod
|
|
19
19
|
xsoar-cli content get-detached --type scripts
|
|
20
|
-
xsoar-cli content get-detached --type playbooks
|
|
20
|
+
xsoar-cli content get-detached --type playbooks
|
|
21
|
+
xsoar-cli content get-detached --type all
|
|
22
|
+
xsoar-cli content get-detached --type scripts --environment prod
|
|
21
23
|
```
|
|
22
24
|
|
|
23
25
|
## List
|
|
24
26
|
|
|
25
|
-
List available content items. Enumerates commands, playbooks and scripts available on the server.
|
|
27
|
+
List available content items. Enumerates commands, playbooks and scripts available on the server. Designed for discovery: a quick, scannable overview of what content exists, primarily to help humans and AI agents identify relevant items before working with them.
|
|
28
|
+
|
|
29
|
+
By default the output is a human-readable table. Use `--output-format json` for machine-readable output, or `--output-format plain` for tab-separated values that are easy to pipe to tools like `grep`.
|
|
26
30
|
|
|
27
31
|
**Syntax:** `xsoar-cli content list [OPTIONS]`
|
|
28
32
|
|
|
29
33
|
**Options:**
|
|
30
34
|
- `--environment TEXT` - Target environment (default: uses default environment from config)
|
|
31
35
|
- `--type [scripts|playbooks|commands|all]` - Type of content items to list (default: all)
|
|
36
|
+
- `--search TEXT` - Case-insensitive substring filter on item id, name, and description
|
|
37
|
+
- `--output-format [table|json|plain]` - Output format (default: table)
|
|
32
38
|
|
|
33
39
|
**Examples:**
|
|
34
40
|
```
|
|
35
41
|
xsoar-cli content list
|
|
36
42
|
xsoar-cli content list --environment prod
|
|
37
43
|
xsoar-cli content list --type commands
|
|
44
|
+
xsoar-cli content list --type commands --search slack
|
|
45
|
+
xsoar-cli content list --type commands --output-format json
|
|
46
|
+
xsoar-cli content list --type scripts --output-format plain
|
|
38
47
|
xsoar-cli content list --type playbooks --environment dev
|
|
39
48
|
```
|
|
40
49
|
|
|
50
|
+
## Describe
|
|
51
|
+
|
|
52
|
+
Describe a single content item in detail. Looks up one script, playbook, or command by name and shows its description, arguments, and inputs/outputs. Commands also show the integration brand and its configured instances (name and state). Use this after `content list` to get the detail needed to actually use an item.
|
|
53
|
+
|
|
54
|
+
The lookup is case-insensitive. Scripts match on id, playbooks match on id or name (so a custom playbook with a UUID id resolves by its human-readable name), and commands match on the command name.
|
|
55
|
+
|
|
56
|
+
**Syntax:** `xsoar-cli content describe --type TYPE NAME`
|
|
57
|
+
|
|
58
|
+
**Options:**
|
|
59
|
+
- `--environment TEXT` - Target environment (default: uses default environment from config)
|
|
60
|
+
- `--type [script|playbook|command]` - Type of content item to describe (required)
|
|
61
|
+
- `--output-format [table|json]` - Output format (default: table)
|
|
62
|
+
|
|
63
|
+
**Examples:**
|
|
64
|
+
```
|
|
65
|
+
xsoar-cli content describe --type command servicenow-get-record
|
|
66
|
+
xsoar-cli content describe --type script AddDNBHostIndicatorToCase
|
|
67
|
+
xsoar-cli content describe --type playbook "Phishing Investigation - Generic v2"
|
|
68
|
+
xsoar-cli content describe --type command servicenow-get-record --output-format json
|
|
69
|
+
```
|
|
70
|
+
|
|
41
71
|
## Download
|
|
42
72
|
|
|
43
73
|
Download a content item by name from the XSOAR server.
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import json
|
|
2
1
|
import logging
|
|
3
2
|
import pathlib
|
|
4
3
|
import subprocess
|
|
@@ -7,8 +6,9 @@ from typing import TYPE_CHECKING
|
|
|
7
6
|
import click
|
|
8
7
|
|
|
9
8
|
from xsoar_cli.utilities.config_file import get_xsoar_config, load_config
|
|
10
|
-
from xsoar_cli.utilities.content import filter_content
|
|
9
|
+
from xsoar_cli.utilities.content import describe_item, filter_content, format_detached_summary, search_content
|
|
11
10
|
from xsoar_cli.utilities.download_content_handlers import HANDLERS, resolve_output_path
|
|
11
|
+
from xsoar_cli.utilities.output import DESCRIBE_OUTPUT_FORMATS, OUTPUT_FORMATS, format_content_output, format_describe
|
|
12
12
|
from xsoar_cli.utilities.validators import validate_xsoar_connectivity
|
|
13
13
|
|
|
14
14
|
if TYPE_CHECKING:
|
|
@@ -28,7 +28,7 @@ def content() -> None:
|
|
|
28
28
|
@click.option(
|
|
29
29
|
"--type",
|
|
30
30
|
"content_type",
|
|
31
|
-
type=click.Choice(["scripts", "playbooks"], case_sensitive=False),
|
|
31
|
+
type=click.Choice(["scripts", "playbooks", "all"], case_sensitive=False),
|
|
32
32
|
required=True,
|
|
33
33
|
help="Type of content items to retrieve.",
|
|
34
34
|
)
|
|
@@ -39,9 +39,13 @@ def get_detached(ctx: click.Context, environment: str | None, content_type: str)
|
|
|
39
39
|
"""List detached content items."""
|
|
40
40
|
config = get_xsoar_config(ctx)
|
|
41
41
|
xsoar_client: Client = config.get_client(environment)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
|
|
43
|
+
types = ["scripts", "playbooks"] if content_type == "all" else [content_type]
|
|
44
|
+
sections = []
|
|
45
|
+
for t in types:
|
|
46
|
+
items = xsoar_client.content.get_detached(t)
|
|
47
|
+
sections.append(format_detached_summary(items, t))
|
|
48
|
+
click.echo("\n\n".join(sections))
|
|
45
49
|
|
|
46
50
|
|
|
47
51
|
# We name the command in the decorator here to avoid shadowing the builtin list.
|
|
@@ -55,28 +59,82 @@ def get_detached(ctx: click.Context, environment: str | None, content_type: str)
|
|
|
55
59
|
show_default=True,
|
|
56
60
|
help="Type of content items to list.",
|
|
57
61
|
)
|
|
58
|
-
@click.option(
|
|
59
|
-
|
|
62
|
+
@click.option(
|
|
63
|
+
"--search",
|
|
64
|
+
default=None,
|
|
65
|
+
help="Case-insensitive substring filter on item id, name, and description.",
|
|
66
|
+
)
|
|
67
|
+
@click.option(
|
|
68
|
+
"--output-format",
|
|
69
|
+
type=click.Choice(OUTPUT_FORMATS, case_sensitive=False),
|
|
70
|
+
default="table",
|
|
71
|
+
show_default=True,
|
|
72
|
+
help="Output format. Use 'json' for machine-readable output.",
|
|
73
|
+
)
|
|
60
74
|
@click.pass_context
|
|
61
75
|
@load_config
|
|
62
76
|
@validate_xsoar_connectivity
|
|
63
|
-
def list_content(ctx: click.Context, environment: str | None, content_type: str,
|
|
77
|
+
def list_content(ctx: click.Context, environment: str | None, content_type: str, search: str | None, output_format: str) -> None:
|
|
64
78
|
"""
|
|
65
|
-
List
|
|
66
|
-
|
|
79
|
+
List available content items. Enumerates commands, playbooks and scripts
|
|
80
|
+
available on the server, primarily to facilitate better AI generated
|
|
81
|
+
playbooks."""
|
|
67
82
|
config = get_xsoar_config(ctx)
|
|
68
83
|
xsoar_client: Client = config.get_client(environment)
|
|
69
84
|
json_blob = xsoar_client.content.list(content_type)
|
|
70
|
-
if verbose:
|
|
71
|
-
click.echo(json.dumps(json_blob, indent=4))
|
|
72
|
-
ctx.exit(0)
|
|
73
85
|
|
|
74
86
|
# Individual type calls return a bare list, normalize to dict for filter_content.
|
|
75
87
|
if isinstance(json_blob, list):
|
|
76
88
|
json_blob = {content_type: json_blob}
|
|
77
89
|
|
|
78
|
-
filtered = filter_content(json_blob
|
|
79
|
-
|
|
90
|
+
filtered = filter_content(json_blob)
|
|
91
|
+
if search:
|
|
92
|
+
filtered = search_content(filtered, search)
|
|
93
|
+
if not filtered:
|
|
94
|
+
click.echo(f"No content matching '{search}' found.")
|
|
95
|
+
return
|
|
96
|
+
|
|
97
|
+
click.echo(format_content_output(filtered, output_format=output_format))
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
@click.command()
|
|
101
|
+
@click.option("--environment", default=None, help="Default environment set in config file.")
|
|
102
|
+
@click.option(
|
|
103
|
+
"--type",
|
|
104
|
+
"content_type",
|
|
105
|
+
type=click.Choice(["script", "playbook", "command"], case_sensitive=False),
|
|
106
|
+
required=True,
|
|
107
|
+
help="Type of content item to describe.",
|
|
108
|
+
)
|
|
109
|
+
@click.option(
|
|
110
|
+
"--output-format",
|
|
111
|
+
type=click.Choice(DESCRIBE_OUTPUT_FORMATS, case_sensitive=False),
|
|
112
|
+
default="table",
|
|
113
|
+
show_default=True,
|
|
114
|
+
help="Output format. Use 'json' for machine-readable output.",
|
|
115
|
+
)
|
|
116
|
+
@click.argument("name", type=str)
|
|
117
|
+
@click.pass_context
|
|
118
|
+
@load_config
|
|
119
|
+
@validate_xsoar_connectivity
|
|
120
|
+
def describe(ctx: click.Context, environment: str | None, content_type: str, output_format: str, name: str) -> None:
|
|
121
|
+
"""Describe a single content item in detail.
|
|
122
|
+
|
|
123
|
+
Looks up one script, playbook, or command by name and shows its
|
|
124
|
+
description, arguments, and inputs/outputs. Commands also show the
|
|
125
|
+
integration brand and its configured instances. Use this after
|
|
126
|
+
'content list' to get the detail needed to actually use an item.
|
|
127
|
+
"""
|
|
128
|
+
config = get_xsoar_config(ctx)
|
|
129
|
+
xsoar_client: Client = config.get_client(environment)
|
|
130
|
+
raw = xsoar_client.content.describe(content_type, name)
|
|
131
|
+
if raw is None:
|
|
132
|
+
click.echo(f"Error: {content_type} '{name}' not found")
|
|
133
|
+
ctx.exit(1)
|
|
134
|
+
return
|
|
135
|
+
|
|
136
|
+
item = describe_item(content_type, raw)
|
|
137
|
+
click.echo(format_describe(content_type, item, output_format=output_format))
|
|
80
138
|
|
|
81
139
|
|
|
82
140
|
@click.command()
|
|
@@ -169,4 +227,5 @@ def download(ctx: click.Context, environment: str | None, content_type: str, out
|
|
|
169
227
|
|
|
170
228
|
content.add_command(get_detached)
|
|
171
229
|
content.add_command(list_content)
|
|
230
|
+
content.add_command(describe)
|
|
172
231
|
content.add_command(download)
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Execute
|
|
2
|
+
|
|
3
|
+
Execute scripts, integration commands, and playbooks against an XSOAR investigation.
|
|
4
|
+
|
|
5
|
+
By default, execution happens in the user's playground. Pass `--case-id` to run against a specific case instead.
|
|
6
|
+
|
|
7
|
+
## Command
|
|
8
|
+
|
|
9
|
+
Execute an automation script or integration command. There is no difference in how scripts and integration commands are invoked.
|
|
10
|
+
|
|
11
|
+
Use the bare command or script name, the same way you would reference it in a playbook. A leading `!` is accepted but optional.
|
|
12
|
+
|
|
13
|
+
Arguments are supplied as space-separated `key=value` pairs. Values containing whitespace are quoted automatically. A malformed argument (one without a `=`) causes the command to exit with an error.
|
|
14
|
+
|
|
15
|
+
**Shell note:** interactive shells (zsh, bash) treat characters like `!` and `|` specially. Prefer omitting the `!`, and wrap argument values in single quotes when they contain shell metacharacters, for example `query='index=zscaler | head 1'`.
|
|
16
|
+
|
|
17
|
+
**Syntax:** `xsoar-cli execute command [OPTIONS] NAME [ARGS]...`
|
|
18
|
+
|
|
19
|
+
**Options:**
|
|
20
|
+
- `--environment TEXT` - Target environment (default: uses default environment from config)
|
|
21
|
+
- `--case-id INTEGER` - Case ID to execute against (default: the user's playground)
|
|
22
|
+
- `--mode [sync|async]` - Wait for results (`sync`) or submit and return the created entry (`async`) (default: "sync")
|
|
23
|
+
- `--timeout INTEGER` - Seconds to wait for results in sync mode before reporting the command is still running (default: 30)
|
|
24
|
+
|
|
25
|
+
**Arguments:**
|
|
26
|
+
- `NAME` - The script or integration command to run
|
|
27
|
+
- `ARGS` - Zero or more `key=value` argument pairs
|
|
28
|
+
|
|
29
|
+
**Output:**
|
|
30
|
+
|
|
31
|
+
On success, prints a completion line with the entry count, then for each resulting entry a short `Entry <id>:` header followed by two links: a War Room link (to view the entry in context) and an artifact viewer link (which offers a direct download of the entry content in XSOAR). The entry contents are not printed. If a command produces an error entry, the error contents are printed alongside its links and the command exits non-zero.
|
|
32
|
+
|
|
33
|
+
In sync mode, the command submits the request and then polls for the resulting War Room entries. If no results appear within `--timeout` seconds, the command is reported as still running with a War Room link to the submitted entry, and the exit code stays zero. A failed submission surfaces immediately as an error with a non-zero exit code.
|
|
34
|
+
|
|
35
|
+
**Examples:**
|
|
36
|
+
```
|
|
37
|
+
xsoar-cli execute command MyScript arg1=val1 arg2=val2
|
|
38
|
+
xsoar-cli execute command whois query=example.com --case-id 12345
|
|
39
|
+
xsoar-cli execute command splunk-search query='index=zscaler | head 1'
|
|
40
|
+
xsoar-cli execute command MyScript arg1=val1 --mode async
|
|
41
|
+
xsoar-cli execute command LongRunningScript --timeout 60
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Playbook
|
|
45
|
+
|
|
46
|
+
Start a playbook in the playground or a specific case. The playbook name is resolved to its ID before starting, so the display name works even for custom playbooks whose ID is a UUID.
|
|
47
|
+
|
|
48
|
+
This is fire-and-forget: the playbook is started via the `setPlaybook` command and the CLI returns without waiting for the playbook to finish. Follow up in the XSOAR War Room to see its progress.
|
|
49
|
+
|
|
50
|
+
**Syntax:** `xsoar-cli execute playbook [OPTIONS] NAME`
|
|
51
|
+
|
|
52
|
+
**Options:**
|
|
53
|
+
- `--environment TEXT` - Target environment (default: uses default environment from config)
|
|
54
|
+
- `--case-id INTEGER` - Case ID to start the playbook in (default: the user's playground)
|
|
55
|
+
|
|
56
|
+
**Arguments:**
|
|
57
|
+
- `NAME` - The playbook to start
|
|
58
|
+
|
|
59
|
+
**Output:**
|
|
60
|
+
|
|
61
|
+
Prints `Started playbook <name> in playground` or `Started playbook <name> in case <id>`. If the playbook name cannot be found, the command exits non-zero with an error.
|
|
62
|
+
|
|
63
|
+
**Examples:**
|
|
64
|
+
```
|
|
65
|
+
xsoar-cli execute playbook "My Playbook"
|
|
66
|
+
xsoar-cli execute playbook "My Playbook" --case-id 12345
|
|
67
|
+
```
|