JOB - XSOAR - Simple Dev to Prod
This playbook is intended to be run as an adhoc job to quickly create a custom content bundle with only selected items from the servers custom content. You can import this new zip on the other XSOAR server, or push it to production using the Core REST API integration. Please ensure to read the setup instructions for this pack carefully. Create a Job with the Type “XSOAR Dev to Prod”, and select this playbook to get started. For more information on Jobs: https://xsoar.pan.dev/docs/incidents/incident-jobs
XSOAR - Simple Dev to Prod · 26 tasks · 1 input · 0 outputs
Details
| ID | JOB - XSOAR - Simple Dev to Prod |
|---|---|
| From Version | 6.0.0 |
| Tasks | 26 |
README
This playbook is intended to be run as an adhoc job to quickly create a custom content bundle with only selected items from the servers custom content. You can import this new zip on the other XSOAR server, or push it to production using the Core REST API integration.
Please ensure to read the setup instructions for this pack carefully.
Create a Job with the Type “XSOAR Dev to Prod”, and select this playbook to get started. For more information on Jobs: https://xsoar.pan.dev/docs/incidents/incident-jobs
Dependencies
This playbook uses the following sub-playbooks, integrations, and scripts.
Sub-playbooks
This playbook does not use any sub-playbooks.
Integrations
- Core REST API
Scripts
- CustomContentBundleWizardry
- IsDemistoRestAPIInstanceAvailable
Commands
- core-api-download
- closeInvestigation
- core-api-multipart
- setIncident
Playbook Inputs
| Name | Description | Default Value | Required |
|---|---|---|---|
| dev_2_prod | Set this to True to enable pushing the selected content to the Production XSOAR server. | True | Optional |
Playbook Outputs
There are no outputs for this playbook.
Inputs
dev_2_prod— Set this to True to enable pushing the selected content to the Production XSOAR server.
Commands used
closeInvestigation
core-api-download
core-api-multipart
setIncident
Flowchart
description: |- This playbook is intended to be run as an adhoc job to quickly create a custom content bundle with only selected items from the servers custom content. You can import this new zip on the other XSOAR server, or push it to production using the Core REST API integration. Please ensure to read the setup instructions for this pack carefully. Create a Job with the Type “XSOAR Dev to Prod”, and select this playbook to get started. For more information on Jobs: https://xsoar.pan.dev/docs/incidents/incident-jobs id: JOB - XSOAR - Simple Dev to Prod inputs: - description: 'Set this to True to enable pushing the selected content to the Production XSOAR server. ' key: dev_2_prod playbookInputQuery: required: false value: simple: "True" name: JOB - XSOAR - Simple Dev to Prod outputs: [] starttaskid: "0" tasks: "0": id: "0" ignoreworker: false nexttasks: '#none#': - "24" note: false quietmode: 0 separatecontext: false skipunavailable: false task: brand: "" id: 50c72773-5130-4311-8553-161d4eb463b4 iscommand: false name: "" version: -1 description: '' taskid: 50c72773-5130-4311-8553-161d4eb463b4 timertriggers: [] type: start view: |- { "position": { "x": 950, "y": -450 } } "1": id: "1" ignoreworker: false nexttasks: '#none#': - "11" note: false quietmode: 0 reputationcalc: 1 scriptarguments: description: simple: custom content bundle from Dev filename: {} uri: simple: /content/bundle using: simple: Demisto Dev separatecontext: false skipunavailable: false task: brand: '' description: Download files from XSOAR server id: 45d6032a-9bfe-4db1-8b27-1e600f74a706 iscommand: true name: Download Custom Content Bundle from Dev script: '|||core-api-download' tags: - devcontent type: regular version: -1 taskid: 45d6032a-9bfe-4db1-8b27-1e600f74a706 timertriggers: [] type: regular view: |- { "position": { "x": 950, "y": 1880 } } "8": id: "8" ignoreworker: false nexttasks: '#none#': - "26" note: false quietmode: 0 separatecontext: false skipunavailable: false task: brand: "" id: 08427856-0c08-474e-8e6e-81b1b6fc5a12 iscommand: false name: Done type: title version: -1 description: '' taskid: 08427856-0c08-474e-8e6e-81b1b6fc5a12 timertriggers: [] type: title view: |- { "position": { "x": 1927.5, "y": 4375 } } "9": id: "9" ignoreworker: false nexttasks: "no": - "10" "yes": - "19" note: false quietmode: 0 scriptarguments: instanceName: simple: Demisto Dev separatecontext: false skipunavailable: false task: brand: "" description: Checks if the provided Core REST API instance is available for the XSOAR Simple Dev to Prod workflow. id: 4dde15ac-db8b-41e3-8680-4e7927257751 iscommand: false name: Is the Demisto Dev - Core REST API integration instance enabled? script: IsDemistoRestAPIInstanceAvailable type: condition version: -1 taskid: 4dde15ac-db8b-41e3-8680-4e7927257751 timertriggers: [] type: condition view: |- { "position": { "x": 950, "y": 195 } } "10": id: "10" ignoreworker: false nexttasks: '#none#': - "31" note: false quietmode: 0 separatecontext: false skipunavailable: false task: brand: "" description: "# Setup Demisto Dev\n\nPlease setup a single instance of the Core REST API Integration for your Development server to continue using this playbook. \n\nThis instance must be named **Demisto Dev**.\n\nRerun this playbook once completed. \n\n" id: 6b342869-d7bb-4c5a-80f9-f929a0836f69 iscommand: false name: Enable Demisto Dev - Core REST API integration instance to continue type: regular version: -1 taskid: 6b342869-d7bb-4c5a-80f9-f929a0836f69 timertriggers: [] type: regular view: |- { "position": { "x": 1927.5, "y": 440 } } "11": id: "11" ignoreworker: false nexttasks: '#none#': - "13" note: false quietmode: 0 reputationcalc: 1 scriptarguments: action: {} entry_id: complex: accessor: EntryID filters: - - left: iscontext: true value: simple: File.Extension operator: isEqualString right: value: simple: gz root: File file_names: {} separatecontext: false skipunavailable: false task: brand: "" description: Parse the content bundle from dev id: 0f903fda-facd-435d-8432-f1650e362bec iscommand: false name: Parse Dev Content Bundle script: CustomContentBundleWizardry type: regular version: -1 taskid: 0f903fda-facd-435d-8432-f1650e362bec timertriggers: [] type: regular view: |- { "position": { "x": 950, "y": 2110 } } "13": form: description: Select the custom content items you want to migrate expired: false questions: - defaultrows: [] fieldassociated: "" gridcolumns: [] id: "0" label: "" labelarg: simple: Custom Content options: [] optionsarg: - simple: ${CustomContent} placeholder: "" readonly: false required: true tooltip: Select one or more custom content items to bundle type: multiSelect sender: "" title: Select Custom Content totalanswers: 0 id: "13" ignoreworker: false message: bcc: body: simple: Select the custom content items you want to migrate cc: format: "" methods: [] subject: timings: completeafterreplies: 1 retriescount: 2 retriesinterval: 360 to: nexttasks: '#none#': - "17" note: false quietmode: 0 reputationcalc: 1 separatecontext: false skipunavailable: false task: brand: "" description: Select the custom content items you want to migrate id: ee5c0f0c-15a0-43e9-891a-65ce7619e3c6 iscommand: false name: Select Content to Migrate type: collection version: -1 taskid: ee5c0f0c-15a0-43e9-891a-65ce7619e3c6 timertriggers: [] type: collection view: |- { "position": { "x": 950, "y": 2320 } } "14": id: "14" ignoreworker: false nexttasks: '#none#': - "15" note: false quietmode: 0 reputationcalc: 1 scriptarguments: action: simple: exportfiles entry_id: complex: accessor: EntryID filters: - - left: iscontext: true value: simple: File.Extension operator: isEqualString right: value: simple: gz root: File file_names: complex: accessor: "0" root: Select Custom Content.Answers separatecontext: false skipunavailable: false task: brand: "" description: Export the selected content items from the dev content bundle id: 817c68c2-97e8-4aa9-8e19-9a4d064b9835 iscommand: false name: Export Selected Files from Dev Content Bundle script: CustomContentBundleWizardry type: regular version: -1 taskid: 817c68c2-97e8-4aa9-8e19-9a4d064b9835 timertriggers: [] type: regular view: |- { "position": { "x": 950, "y": 2765 } } "15": id: "15" ignoreworker: false nexttasks: '#none#': - "33" note: false quietmode: 0 reputationcalc: 1 scriptarguments: entryID: complex: accessor: EntryID filters: - - left: iscontext: true value: simple: File.Name operator: inList right: iscontext: true value: simple: Select Custom Content.Answers.0 root: File password: {} zipName: simple: xsoar-custom-content separatecontext: false skipunavailable: false task: brand: "" description: Zip a file and upload to war room id: f173bd0b-f6fe-4e42-85ca-fba213ba7d5c iscommand: false name: Create Selected Content Bundle script: ZipFile tags: - selectedcontent type: regular version: -1 taskid: f173bd0b-f6fe-4e42-85ca-fba213ba7d5c timertriggers: [] type: regular view: |- { "position": { "x": 950, "y": 2990 } } "17": conditions: - condition: - - left: iscontext: true value: simple: Select Custom Content.Answers.0 operator: isNotEmpty label: "yes" id: "17" ignoreworker: false nexttasks: '#default#': - "8" "yes": - "14" note: false quietmode: 0 separatecontext: false skipunavailable: false task: brand: "" description: Check to ensure the user selected content items to export id: d2b23151-667e-4422-8325-6b7d90dd6eae iscommand: false name: Are there selected content items to export? type: condition version: -1 taskid: d2b23151-667e-4422-8325-6b7d90dd6eae timertriggers: [] type: condition view: |- { "position": { "x": 950, "y": 2520 } } "19": conditions: - condition: - - left: iscontext: true value: simple: inputs.dev_2_prod operator: isNotEqualString right: value: simple: "False" label: "yes" id: "19" ignoreworker: false nexttasks: '#default#': - "35" "yes": - "27" note: false quietmode: 0 separatecontext: false skipunavailable: false task: brand: "" description: Is the Dev to Prod input set to True id: 73c3d408-b5ca-470b-8555-e8a6488fafdc iscommand: false name: Are we trying Dev to Prod? type: condition version: -1 taskid: 73c3d408-b5ca-470b-8555-e8a6488fafdc timertriggers: [] type: condition view: |- { "position": { "x": 950, "y": 440 } } "21": id: "21" ignoreworker: false nexttasks: '#none#': - "8" note: false quietmode: 0 reputationcalc: 1 scriptarguments: body: {} entryID: complex: accessor: EntryID filters: - - left: iscontext: true value: simple: File.Name operator: isEqualString right: value: simple: xsoar-custom-content.zip root: File uri: simple: /content/bundle using: simple: Demisto Prod separatecontext: false skipunavailable: false task: brand: '' description: Send HTTP Multipart request to upload files to Demisto server id: 1957024c-a9ab-4aa9-8fde-54d059eb654e iscommand: true name: Push Selected Content to Prod script: '|||core-api-multipart' type: regular version: -1 taskid: 1957024c-a9ab-4aa9-8fde-54d059eb654e timertriggers: [] type: regular view: |- { "position": { "x": 950, "y": 3910 } } "23": id: "23" ignoreworker: false nexttasks: "No": - "8" "Yes": - "25" note: false quietmode: 0 separatecontext: false skipunavailable: false task: brand: "" description: |- File Name: ${ZipFile.ZippedFile} File Contents: ${Select Custom Content.Answers.0} id: 677a9f78-d090-46c3-81d6-11dd0fc57618 iscommand: false name: Push Content to Prod? type: condition version: -1 taskid: 677a9f78-d090-46c3-81d6-11dd0fc57618 timertriggers: [] type: condition view: |- { "position": { "x": 950, "y": 3440 } } "24": id: "24" ignoreworker: false nexttasks: '#none#': - "30" note: false quietmode: 0 scriptarguments: severity: simple: "0.5" xsoardevinstancename: simple: Demisto Dev xsoardevtoprodmethod: complex: root: inputs.dev_2_prod transformers: - args: else: value: simple: Manual equals: value: simple: "True" then: value: simple: Automated operator: If-Then-Else xsoarprodinstancename: simple: Demisto Prod separatecontext: false skipunavailable: false task: brand: Builtin description: commands.local.cmd.set.incident id: fe845f55-a5af-40de-8aba-fb94e5c03cac iscommand: true name: Set fields for XSOAR Dev to Prod Layout script: Builtin|||setIncident type: regular version: -1 taskid: fe845f55-a5af-40de-8aba-fb94e5c03cac timertriggers: [] type: regular view: |- { "position": { "x": 950, "y": -260 } } "25": id: "25" ignoreworker: false nexttasks: '#none#': - "21" note: false quietmode: 0 reputationcalc: 1 scriptarguments: description: simple: custom content backup from production filename: {} uri: simple: /content/bundle using: simple: Demisto Prod separatecontext: false skipunavailable: false task: brand: '' description: Download files from Demisto server id: 9538b972-1086-4717-89ee-0b8e5e96446e iscommand: true name: 'Backup Custom Content Bundle from Prod ' script: '|||core-api-download' tags: - prodbackup type: regular version: -1 taskid: 9538b972-1086-4717-89ee-0b8e5e96446e timertriggers: [] type: regular view: |- { "position": { "x": 950, "y": 3685 } } "26": id: "26" ignoreworker: false note: false quietmode: 0 scriptarguments: assetid: {} closeNotes: simple: Completed closeReason: simple: Other democlosefield: {} emailclassification: {} id: {} incomingmirrorerror: {} outgoingmirrorerror: {} phishingsubtype: {} xsoartrainingpackuseful: {} separatecontext: false skipunavailable: false task: brand: Builtin description: commands.local.cmd.close.inv id: 04e6f21a-97c6-4b4f-8008-59a496607fc5 iscommand: true name: Close Job script: Builtin|||closeInvestigation type: regular version: -1 taskid: 04e6f21a-97c6-4b4f-8008-59a496607fc5 timertriggers: [] type: regular view: |- { "position": { "x": 1917.5, "y": 4570 } } "27": id: "27" ignoreworker: false nexttasks: "no": - "36" "yes": - "28" note: false quietmode: 0 scriptarguments: instanceName: simple: Demisto Prod separatecontext: false skipunavailable: false task: brand: "" description: Checks if the provided Core REST API instance is available for the XSOAR Simple Dev to Prod workflow. id: 2f1df859-7924-4ccd-856c-1f17300cfb5b iscommand: false name: Is the Demisto Prod - Core REST API integration instance enabled? script: IsDemistoRestAPIInstanceAvailable type: condition version: -1 taskid: 2f1df859-7924-4ccd-856c-1f17300cfb5b timertriggers: [] type: condition view: |- { "position": { "x": 950, "y": 685 } } "28": conditions: - condition: - - left: iscontext: true value: complex: accessor: defaultIgnored root: DemsistoAPIInstances operator: isEqualString right: value: simple: "true" label: "yes" id: "28" ignoreworker: false nexttasks: '#default#': - "29" "yes": - "32" note: false quietmode: 0 separatecontext: false skipunavailable: false task: brand: "" description: Checks the configuration on the Core REST API Prod instance to see if it's correct id: 511c189a-5f93-4289-8e1f-8404ed0f9a25 iscommand: false name: Is the Production Core REST API setup properly? type: condition version: -1 taskid: 511c189a-5f93-4289-8e1f-8404ed0f9a25 timertriggers: [] type: condition view: |- { "position": { "x": 950, "y": 985 } } "29": id: "29" ignoreworker: false nexttasks: '#none#': - "31" note: false quietmode: 0 separatecontext: false skipunavailable: false task: brand: "" description: "# Setup Instructions for Demisto Prod\n\nThe Demisto Prod - Core REST API instance must be set to \"Do not use by default\" on the instance configuration. \n\nThe check in this playbook indicates this is not set properly, please ensure to read the setup instructions for this Pack. \n\nPlease set the **Demisto Prod** instance properly, and re-run this playbook. " id: 40db8672-b761-46e9-8fa9-2b87fb9fc443 iscommand: false name: Demisto Prod Instance not setup properly, provide instructions type: regular version: -1 taskid: 40db8672-b761-46e9-8fa9-2b87fb9fc443 timertriggers: [] type: regular view: |- { "position": { "x": 1527.5, "y": 1315 } } "30": id: "30" ignoreworker: false nexttasks: '#none#': - "9" note: false quietmode: 0 separatecontext: false skipunavailable: false task: brand: "" id: 98f23446-f793-4179-856e-3d84dae45cf9 iscommand: false name: Check Simple Dev to Prod Setup type: title version: -1 description: '' taskid: 98f23446-f793-4179-856e-3d84dae45cf9 timertriggers: [] type: title view: |- { "position": { "x": 950, "y": -25 } } "31": id: "31" ignoreworker: false nexttasks: '#none#': - "8" note: false quietmode: 0 separatecontext: false skipunavailable: false task: brand: "" id: a02857b5-53d3-4ed0-8f36-8d66b4304b89 iscommand: false name: Setup Incomplete - Unable to Continue type: title version: -1 description: '' taskid: a02857b5-53d3-4ed0-8f36-8d66b4304b89 timertriggers: [] type: title view: |- { "position": { "x": 1927.5, "y": 1625 } } "32": id: "32" ignoreworker: false nexttasks: '#none#': - "1" note: false quietmode: 0 separatecontext: false skipunavailable: false task: brand: "" id: 1158ae2a-04c5-4c78-802b-9ef608462c66 iscommand: false name: Start XSOAR Simple Dev to Prod type: title version: -1 description: '' taskid: 1158ae2a-04c5-4c78-802b-9ef608462c66 timertriggers: [] type: title view: |- { "position": { "x": 950, "y": 1625 } } "33": conditions: - condition: - - left: iscontext: true value: simple: inputs.dev_2_prod operator: isNotEqualString right: value: simple: "False" label: "yes" id: "33" ignoreworker: false nexttasks: '#default#': - "34" "yes": - "23" note: false quietmode: 0 separatecontext: false skipunavailable: false task: brand: "" description: Is the Dev to Prod input set to True id: 9ab11766-4682-41eb-8be1-0147fdbc6da2 iscommand: false name: Are we trying Dev to Prod? type: condition version: -1 taskid: 9ab11766-4682-41eb-8be1-0147fdbc6da2 timertriggers: [] type: condition view: |- { "position": { "x": 950, "y": 3210 } } "34": id: "34" ignoreworker: false nexttasks: '#none#': - "8" note: false quietmode: 0 separatecontext: false skipunavailable: false task: brand: "" description: "The custom content bundle is created, and can be downloaded from the Dev to Prod tab. \n\nThis can be uploaded to the production server from Settings -> Advanced -> Troubleshooting -> Import Custom Content.\n\nComplete this task to close the job." id: 3616c9a8-6c88-46c8-8174-eb51e5fd77fd iscommand: false name: Download Custom Content Bundle type: regular version: -1 taskid: 3616c9a8-6c88-46c8-8174-eb51e5fd77fd timertriggers: [] type: regular view: |- { "position": { "x": 390, "y": 3910 } } "35": id: "35" ignoreworker: false nexttasks: '#none#': - "32" note: false quietmode: 0 separatecontext: false skipunavailable: false task: brand: "" id: 36942d7b-3d4c-4678-80e5-495be637dc54 iscommand: false name: Bypass Production Checks type: title version: -1 description: '' taskid: 36942d7b-3d4c-4678-80e5-495be637dc54 timertriggers: [] type: title view: |- { "position": { "x": 410, "y": 985 } } "36": id: "36" ignoreworker: false nexttasks: '#none#': - "31" note: false quietmode: 0 separatecontext: false skipunavailable: false task: brand: "" description: "# Setup Demisto Prod\n\nPlease setup a single instance of the Core REST API Integration for your Production server to continue using this playbook. \n\nThis instance must be named **Demisto Prod**, and the instance must be marked as **Do not use by default**\n\nRerun this playbook once completed. \n\n" id: 8c9702f6-e0a1-4888-8db8-5c5e5459b798 iscommand: false name: Enable Demisto Prod - Core REST API integration instance to continue type: regular version: -1 taskid: 8c9702f6-e0a1-4888-8db8-5c5e5459b798 timertriggers: [] type: regular view: |- { "position": { "x": 1527.5, "y": 985 } } version: -1 view: |- { "linkLabelsPosition": {}, "paper": { "dimensions": { "height": 5115, "width": 1917.5, "x": 390, "y": -450 } } } tests: - No tests (auto formatted) fromversion: 6.0.0 marketplaces: - xsoar