id: Launch And Fetch Scan Based Findings Report - Qualys version: -1 name: Launch And Fetch Scan Based Findings Report - Qualys description: Launches a scan based report and fetcesh the report when it's ready. starttaskid: "0" tasks: "0": id: "0" taskid: feaf59d2-f107-4395-862c-895cd5406872 type: start task: id: feaf59d2-f107-4395-862c-895cd5406872 version: -1 name: "" iscommand: false brand: "" description: '' nexttasks: '#none#': - "1" separatecontext: false view: |- { "position": { "x": 265, "y": 50 } } note: false timertriggers: [] ignoreworker: false skipunavailable: false quietmode: 0 "1": id: "1" taskid: db1e0be1-8c7f-4074-8a7c-777ef8a21bf7 type: regular task: id: db1e0be1-8c7f-4074-8a7c-777ef8a21bf7 version: -1 name: qualys-report-launch-scan-based-findings description: Launches a scan report including scan based findings script: QualysV2|||qualys-report-launch-scan-based-findings type: regular iscommand: true brand: QualysV2 nexttasks: '#none#': - "6" scriptarguments: hide_header: simple: ${inputs.hide_header} ip_restriction: simple: ${inputs.ip_restriction} output_format: simple: ${inputs.output_format} pdf_password: simple: ${inputs.pdf_password} recipient_group: simple: ${inputs.recipient_group} recipient_group_id: simple: ${inputs.recipient_group_id} report_refs: simple: ${inputs.report_refs} report_title: simple: ${inputs.report_title} template_id: simple: ${inputs.template_id} separatecontext: false view: |- { "position": { "x": 265, "y": 195 } } note: false timertriggers: [] ignoreworker: false skipunavailable: false quietmode: 0 "3": id: "3" taskid: c66554da-ca95-4394-88cb-21ea8ccdbab8 type: regular task: id: c66554da-ca95-4394-88cb-21ea8ccdbab8 version: -1 name: qualys-report-fetch description: Download report script: QualysV2|||qualys-report-fetch type: regular iscommand: true brand: QualysV2 scriptarguments: execution-timeout: simple: "180" file_format: simple: ${inputs.output_format} id: simple: ${Qualys.Report.ID} separatecontext: false view: |- { "position": { "x": 50, "y": 895 } } note: false timertriggers: [] ignoreworker: false skipunavailable: false quietmode: 0 "5": id: "5" taskid: 41604736-edc1-4f39-81c5-0d7711b91261 type: playbook task: id: 41604736-edc1-4f39-81c5-0d7711b91261 version: -1 name: GenericPolling description: |- Use this playbook as a sub-playbook to block execution of the master playbook until a remote action is complete. This playbook implements polling by continuously running the command in Step \#2 until the operation completes. The remote action should have the following structure: 1. Initiate the operation. 2. Poll to check if the operation completed. 3. (optional) Get the results of the operation. playbookName: GenericPolling type: playbook iscommand: false brand: "" nexttasks: '#none#': - "3" scriptarguments: Ids: simple: ${Qualys.Report.ID} Interval: simple: "1" PollingCommandArgName: simple: id PollingCommandName: simple: qualys-report-list Timeout: simple: "30" dt: simple: Qualys.Report(val.STATUS.STATE != 'Finished').ID. separatecontext: true loop: iscommand: false exitCondition: "" wait: 1 max: 0 view: |- { "position": { "x": 50, "y": 720 } } note: false timertriggers: [] ignoreworker: false skipunavailable: false quietmode: 0 isoversize: false isautoswitchedtoquietmode: false "6": id: "6" taskid: 86f0e348-c8e9-4d57-845b-e77ccabb919d type: regular task: id: 86f0e348-c8e9-4d57-845b-e77ccabb919d version: -1 name: Get the created scan metadata description: Get a list of generated reports in the system script: QualysV2|||qualys-report-list type: regular iscommand: true brand: QualysV2 nexttasks: '#none#': - "7" scriptarguments: id: simple: ${Qualys.Report.ID} retry-count: simple: "3" retry-interval: simple: "5" separatecontext: false continueonerrortype: "" view: |- { "position": { "x": 265, "y": 370 } } note: false timertriggers: [] ignoreworker: false skipunavailable: false quietmode: 0 isoversize: false isautoswitchedtoquietmode: false "7": id: "7" taskid: 4c31fd84-2f09-4efb-845a-b1a74ef33ef5 type: condition task: id: 4c31fd84-2f09-4efb-845a-b1a74ef33ef5 version: -1 name: Check if scan metadata returned description: Check if scan metadata returned type: condition iscommand: false brand: "" nexttasks: '#default#': - "8" "yes": - "5" separatecontext: false conditions: - label: "yes" condition: - - operator: isNotEmpty left: value: simple: Qualys.Report.ID iscontext: true continueonerrortype: "" view: |- { "position": { "x": 265, "y": 545 } } note: false timertriggers: [] ignoreworker: false skipunavailable: false quietmode: 0 isoversize: false isautoswitchedtoquietmode: false "8": id: "8" taskid: 0747c49b-ff29-4367-807f-3323feb3874a type: regular task: id: 0747c49b-ff29-4367-807f-3323feb3874a version: -1 name: Print Error description: Prints an error entry with a given message scriptName: PrintErrorEntry type: regular iscommand: false brand: "" scriptarguments: message: simple: Can't get the scan metadata separatecontext: false continueonerrortype: "" view: |- { "position": { "x": 480, "y": 720 } } note: false timertriggers: [] ignoreworker: false skipunavailable: false quietmode: 0 isoversize: false isautoswitchedtoquietmode: false system: true view: |- { "linkLabelsPosition": {}, "paper": { "dimensions": { "height": 940, "width": 810, "x": 50, "y": 50 } } } inputs: - key: template_id value: {} required: true description: The template ID of the report you want to launch. Can be found by running qualys-report-template-list. playbookInputQuery: null - key: output_format value: {} required: true description: One output format may be specified. When output_format=pdf is specified, the Secure PDF Distribution may be used. playbookInputQuery: null - key: report_refs value: {} required: true description: This parameter specifies the scan references to include. A scan reference starts with the string "scan/" followed by a reference ID number. Multiple scan references are comma separated. Reference can be found by running the command qualys-vm-scan-list. playbookInputQuery: null - key: report_title value: {} required: false description: A user-defined report title. The title may have a maximum of 128 characters. For a PCI compliance report, the report title is provided by Qualys and cannot be changed. playbookInputQuery: null - key: hide_header value: {} required: false description: (Valid for CSV format report only). Specify hide_header=1 to omit the header information from the report. By default this information is included. playbookInputQuery: null - key: recipient_group_id value: {} required: false description: Specify users who will receive the email notification when the report is complete (i.e. supply a distribution group ID). Where do I find this ID? Log in to your Qualys account, go to Users > Distribution Groups and select Info for a group in the list. playbookInputQuery: null - key: pdf_password value: {} required: false description: '''(Optional; Required for secure PDF distribution) The password to be used for encryption. Requirements: - the password must have a minimum of 8 characters (ascii), and a maximum of 32 characters - the password must contain alpha and numeric characters - the password cannot match the password for the user’s Qualys account. - the password must follow the password security guidelines defined for your subscription (log in and go to Subscription Setup—>Security Options).''' playbookInputQuery: null - key: recipient_group value: {} required: false description: Optional; Optional for secure PDF distribution) The report recipients in the form of one or more distribution groups, as defined using the Qualys UI. Multiple distribution groups are comma separated. A maximum of 50 distribution groups may be entered. Chapter 4 — Report API Launch Report recipient_group={value} playbookInputQuery: null - key: ip_restriction value: {} required: false description: For a scan report, the report content will be restricted to the specified IPs/ranges. Multiple IPs and/or ranges are comma separated. playbookInputQuery: null outputs: - contextPath: InfoFile.Name description: The file name. - contextPath: InfoFile.EntryID description: The ID for locating the file in the War Room. - contextPath: InfoFile.Size description: The size of the file (in bytes). - contextPath: InfoFile.Type description: The file type, as determined by libmagic (same as displayed in file entries). - contextPath: InfoFile.Extension description: The file extension. - contextPath: InfoFile.Info description: Basic information about the file. tests: - QualysVulnerabilityManagement-Test fromversion: 5.5.0 supportedModules: - agentix - xsiam