xsoar-cli 1.0.0__tar.gz → 1.0.1__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.

Potentially problematic release.


This version of xsoar-cli might be problematic. Click here for more details.

Files changed (91) hide show
  1. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/PKG-INFO +1 -1
  2. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/src/xsoar_cli/__about__.py +1 -1
  3. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/src/xsoar_cli/case/commands.py +6 -3
  4. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/src/xsoar_cli/utilities.py +1 -0
  5. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/.github/workflows/release.yml +0 -0
  6. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/.gitignore +0 -0
  7. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/LICENSE.txt +0 -0
  8. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/README.md +0 -0
  9. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/examples/README.md +0 -0
  10. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/examples/advanced_plugin.py +0 -0
  11. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/pyproject.toml +0 -0
  12. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/requirements.txt +0 -0
  13. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/requirements_dev.txt +0 -0
  14. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/src/xsoar_cli/__init__.py +0 -0
  15. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/src/xsoar_cli/case/README.md +0 -0
  16. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/src/xsoar_cli/case/__init__.py +0 -0
  17. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/src/xsoar_cli/cli.py +0 -0
  18. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/src/xsoar_cli/config/README.md +0 -0
  19. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/src/xsoar_cli/config/__init__.py +0 -0
  20. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/src/xsoar_cli/config/commands.py +0 -0
  21. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/src/xsoar_cli/graph/README.md +0 -0
  22. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/src/xsoar_cli/graph/__init__.py +0 -0
  23. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/src/xsoar_cli/graph/commands.py +0 -0
  24. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/src/xsoar_cli/manifest/README.md +0 -0
  25. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/src/xsoar_cli/manifest/__init__.py +0 -0
  26. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/src/xsoar_cli/manifest/commands.py +0 -0
  27. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/src/xsoar_cli/pack/README.md +0 -0
  28. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/src/xsoar_cli/pack/__init__.py +0 -0
  29. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/src/xsoar_cli/pack/commands.py +0 -0
  30. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/src/xsoar_cli/playbook/README.md +0 -0
  31. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/src/xsoar_cli/playbook/__init__.py +0 -0
  32. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/src/xsoar_cli/playbook/commands.py +0 -0
  33. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/src/xsoar_cli/plugins/README.md +0 -0
  34. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/src/xsoar_cli/plugins/__init__.py +0 -0
  35. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/src/xsoar_cli/plugins/commands.py +0 -0
  36. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/src/xsoar_cli/plugins/manager.py +0 -0
  37. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/__init__.py +0 -0
  38. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/conftest.py +0 -0
  39. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_base.py +0 -0
  40. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_case.py +0 -0
  41. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_config.py +0 -0
  42. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Download/playbook-empty.yml +0 -0
  43. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_CommonPlaybooks/.pack-ignore +0 -0
  44. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_CommonPlaybooks/.secrets-ignore +0 -0
  45. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_CommonPlaybooks/Author_image.png +0 -0
  46. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_CommonPlaybooks/Playbooks/GenericPlaybook.yml +0 -0
  47. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_CommonPlaybooks/README.md +0 -0
  48. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_CommonPlaybooks/pack_metadata.json +0 -0
  49. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_CommonScripts/.pack-ignore +0 -0
  50. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_CommonScripts/.secrets-ignore +0 -0
  51. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_CommonScripts/Author_image.png +0 -0
  52. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_CommonScripts/README.md +0 -0
  53. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_CommonScripts/Scripts/GenericScript/GenericScript.py +0 -0
  54. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_CommonScripts/Scripts/GenericScript/GenericScript.yml +0 -0
  55. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_CommonScripts/Scripts/GenericScript/README.md +0 -0
  56. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_CommonScripts/pack_metadata.json +0 -0
  57. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_EDR/.pack-ignore +0 -0
  58. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_EDR/.secrets-ignore +0 -0
  59. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_EDR/Author_image.png +0 -0
  60. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_EDR/Playbooks/EDR_InitialTriage.yml +0 -0
  61. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_EDR/README.md +0 -0
  62. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_EDR/Scripts/EDR_FetchFile/EDR_FetchFile.py +0 -0
  63. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_EDR/Scripts/EDR_FetchFile/EDR_FetchFile.yml +0 -0
  64. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_EDR/Scripts/EDR_FetchFile/README.md +0 -0
  65. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_EDR/Scripts/EDR_Triage/EDR_Triage.py +0 -0
  66. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_EDR/Scripts/EDR_Triage/EDR_Triage.yml +0 -0
  67. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_EDR/Scripts/EDR_Triage/README.md +0 -0
  68. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_EDR/Scripts/LegacyItem/LegacyItem.py +0 -0
  69. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_EDR/Scripts/LegacyItem/LegacyItem.yml +0 -0
  70. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_EDR/Scripts/LegacyItem/README.md +0 -0
  71. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_EDR/Scripts/LegacyItem/test_data/basescript-dummy.json +0 -0
  72. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_EDR/pack_metadata.json +0 -0
  73. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_Layouts/.pack-ignore +0 -0
  74. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_Layouts/.secrets-ignore +0 -0
  75. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_Layouts/Author_image.png +0 -0
  76. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_Layouts/Layouts/layoutscontainer-GenericLayout.json +0 -0
  77. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_Layouts/README.md +0 -0
  78. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/MyOrg_Layouts/pack_metadata.json +0 -0
  79. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/Packs/Not_applicable/Playbooks/Empty.yml +0 -0
  80. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/manifest_base.json +0 -0
  81. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/manifest_invalid.json +0 -0
  82. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/manifest_with_pack_not_on_server.json +0 -0
  83. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/server_base_response.json +0 -0
  84. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/server_base_response_missing_one_pack.json +0 -0
  85. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/server_base_response_with_updates.json +0 -0
  86. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_data/server_base_response_with_updates_and_one_extra.json +0 -0
  87. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_graph.py +0 -0
  88. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_manifest.py +0 -0
  89. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_pack.py +0 -0
  90. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_playbook.py +0 -0
  91. {xsoar_cli-1.0.0 → xsoar_cli-1.0.1}/tests/test_plugins.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xsoar-cli
3
- Version: 1.0.0
3
+ Version: 1.0.1
4
4
  Project-URL: Documentation, https://github.com/tlium/xsoar-cli#readme
5
5
  Project-URL: Issues, https://github.com/tliumb/xsoar-cli/issues
6
6
  Project-URL: Source, https://github.com/tlium/xsoar-cli
@@ -1,4 +1,4 @@
1
1
  # SPDX-FileCopyrightText: 2025-present Torbjørn Lium <torben@lium.org>
2
2
  #
3
3
  # SPDX-License-Identifier: MIT
4
- __version__ = "1.0.0"
4
+ __version__ = "1.0.1"
@@ -63,17 +63,20 @@ def clone(ctx: click.Context, casenumber: int, source: str, dest: str) -> None:
63
63
 
64
64
 
65
65
  @click.option("--environment", default="dev", show_default=True, help="Environment as defined in config file")
66
+ @click.option("--casetype", default="", show_default=True, help="Create case of specified type. Default type set in config file.")
66
67
  @click.argument("details", type=str, default="Placeholder case details")
67
68
  @click.argument("name", type=str, default="Test case created from xsoar-cli")
68
- @click.command(help="Creates a single new case in XSOAR")
69
69
  @click.pass_context
70
70
  @load_config
71
- def create(ctx: click.Context, environment: str, name: str, details: str) -> None:
71
+ def create(ctx: click.Context, environment: str, casetype: str, name: str, details: str) -> None:
72
+ """Creates a new case in XSOAR. If invalid case type is specified as a command option, XSOAR will default to using Unclassified."""
72
73
  xsoar_client: Client = ctx.obj["server_envs"][environment]
74
+ if not casetype:
75
+ casetype = ctx.obj["default_new_case_type"]
73
76
  data = {
74
77
  "createInvestigation": True,
75
78
  "name": name,
76
- "type": "MyCaseType", # grab this from config maybe?
79
+ "type": casetype,
77
80
  "details": details,
78
81
  }
79
82
  case_data = xsoar_client.create_case(data=data)
@@ -80,6 +80,7 @@ def parse_config(config: dict, ctx: click.Context) -> None:
80
80
  ctx.obj = {}
81
81
  ctx.obj["default_environment"] = config["default_environment"]
82
82
  ctx.obj["custom_pack_authors"] = config["custom_pack_authors"]
83
+ ctx.obj["default_new_case_type"] = config["default_new_case_type"]
83
84
  ctx.obj["server_envs"] = {}
84
85
  for key in config["server_config"]:
85
86
  ctx.obj["server_envs"][key] = Client(
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes