{
  "type": "workflow_collections",
  "macros": [],
  "exported_tags": [],
  "data": [
    {
      "@type": "WorkflowCollection",
      "name": "IP Reputation Enrichment with AbuseIPDB",
      "description": "Check an alert's source IP on AbuseIPDB and raise its severity when the IP is reported for abuse.",
      "visible": true,
      "image": null,
      "uuid": "b097187a-8524-5ff9-a176-76dc41bf3808",
      "recordTags": [],
      "workflows": [
        {
          "@type": "Workflow",
          "name": "IP Reputation Check with AbuseIPDB",
          "aliasName": null,
          "tag": "",
          "recordTags": [],
          "description": "Run it on an alert. Looks up the alert's source IP on AbuseIPDB and sets severity to Critical when the abuse confidence score is at or above the threshold (50, set in the first step). Below the threshold the alert is left as it is. Private and invalid addresses are skipped.",
          "isActive": false,
          "debug": false,
          "singleRecordExecution": false,
          "remoteExecutableFlag": 0,
          "parameters": [],
          "synchronous": false,
          "triggerStep": "/api/3/workflow_steps/b7d50a26-7aff-572a-b195-478dacd5d376",
          "steps": [
            {
              "@type": "WorkflowStep",
              "name": "Start",
              "description": null,
              "arguments": {
                "title": "Check source IP on AbuseIPDB",
                "resources": [
                  "alerts"
                ],
                "route": "13b645d5-8209-5543-85d6-57b6a068b7e8",
                "inputVariables": [],
                "step_variables": {
                  "input": {
                    "params": [],
                    "records": "{{vars.input.records}}"
                  }
                },
                "triggerOnSource": true,
                "triggerOnReplicate": false,
                "noRecordExecution": false,
                "singleRecordExecution": true,
                "__triggerLimit": true,
                "executeButtonText": "Execute",
                "showToasterMessage": {
                  "visible": false,
                  "messageVisible": true
                },
                "displayConditions": {
                  "alerts": {
                    "sort": [],
                    "limit": 30,
                    "logic": "AND",
                    "filters": []
                  }
                }
              },
              "status": null,
              "top": "120",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/f414d039-bb0d-4e59-9c39-a8f1e880b18a",
              "group": null,
              "uuid": "b7d50a26-7aff-572a-b195-478dacd5d376"
            },
            {
              "@type": "WorkflowStep",
              "name": "Settings",
              "description": null,
              "arguments": {
                "threshold": 50,
                "source_ip": "{{ vars.input.records[0].sourceIp | default('', true) | string | trim }}"
              },
              "status": null,
              "top": "250",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/04d0cf46-b6a8-42c4-8683-60a7eaa69e8f",
              "group": null,
              "uuid": "b4753c92-8513-5569-822a-95b2b94e2911"
            },
            {
              "@type": "WorkflowStep",
              "name": "Is it a public IP",
              "description": null,
              "arguments": {
                "conditions": [
                  {
                    "option": "Public IP",
                    "condition": "{{ (vars.source_ip | ipaddr('public')) is string and '/' not in vars.source_ip }}",
                    "step_iri": "/api/3/workflow_steps/a4a6a72d-d218-5014-ad3c-a5f619edc9da",
                    "step_name": "Check IP on AbuseIPDB"
                  },
                  {
                    "option": "Else",
                    "default": true,
                    "step_iri": "/api/3/workflow_steps/32bb9399-fe11-55e0-8780-e12f764feda0",
                    "step_name": "Not a public IP"
                  }
                ]
              },
              "status": null,
              "top": "380",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/12254cf5-5db7-4b1a-8cb1-3af081924b28",
              "group": null,
              "uuid": "ee27d865-becc-5cc8-90d1-61c41e9676e1"
            },
            {
              "@type": "WorkflowStep",
              "name": "Not a public IP",
              "description": null,
              "arguments": {
                "changed": false,
                "reason": "source IP '{{ vars.source_ip }}' is empty, private or not an IP address"
              },
              "status": null,
              "top": "510",
              "left": "540",
              "stepType": "/api/3/workflow_step_types/04d0cf46-b6a8-42c4-8683-60a7eaa69e8f",
              "group": null,
              "uuid": "32bb9399-fe11-55e0-8780-e12f764feda0"
            },
            {
              "@type": "WorkflowStep",
              "name": "Check IP on AbuseIPDB",
              "description": null,
              "arguments": {
                "connector": "abuseipdb",
                "operation": "ip_lookup",
                "config": "",
                "params": {
                  "ip": "{{ vars.source_ip }}",
                  "days": 90
                },
                "version": "2.0.0",
                "name": "AbuseIPDB",
                "operationTitle": "IP Lookup",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "510",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "a4a6a72d-d218-5014-ad3c-a5f619edc9da"
            },
            {
              "@type": "WorkflowStep",
              "name": "Read the score",
              "description": null,
              "arguments": {
                "score": "{{ ((vars.steps.Check_IP_on_AbuseIPDB.data | default(vars.steps.Check_IP_on_AbuseIPDB, true))\n    .abuseConfidenceScore) | default(0, true) | int }}"
              },
              "status": null,
              "top": "640",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/04d0cf46-b6a8-42c4-8683-60a7eaa69e8f",
              "group": null,
              "uuid": "ae8df417-9f46-5c96-a55e-4c28b39e7cfc"
            },
            {
              "@type": "WorkflowStep",
              "name": "Over the threshold",
              "description": null,
              "arguments": {
                "conditions": [
                  {
                    "option": "Abusive",
                    "condition": "{{ vars.score | int >= vars.threshold | int }}",
                    "step_iri": "/api/3/workflow_steps/86e0d1c3-4aa3-55d7-945e-865f10cbfb86",
                    "step_name": "Set severity to Critical"
                  },
                  {
                    "option": "Else",
                    "default": true,
                    "step_iri": "/api/3/workflow_steps/6f176260-d2d4-5bd1-b429-64a46a1fe7a8",
                    "step_name": "Below the threshold"
                  }
                ]
              },
              "status": null,
              "top": "770",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/12254cf5-5db7-4b1a-8cb1-3af081924b28",
              "group": null,
              "uuid": "1e6aa481-78e8-588b-9f69-7a32091c13d2"
            },
            {
              "@type": "WorkflowStep",
              "name": "Below the threshold",
              "description": null,
              "arguments": {
                "changed": false,
                "score": "{{ vars.score }}",
                "reason": "abuse confidence {{ vars.score }} is below {{ vars.threshold }}"
              },
              "status": null,
              "top": "900",
              "left": "540",
              "stepType": "/api/3/workflow_step_types/04d0cf46-b6a8-42c4-8683-60a7eaa69e8f",
              "group": null,
              "uuid": "6f176260-d2d4-5bd1-b429-64a46a1fe7a8"
            },
            {
              "@type": "WorkflowStep",
              "name": "Set severity to Critical",
              "description": null,
              "arguments": {
                "resource": {
                  "severity": "/api/3/picklists/7efa2220-39bb-44e4-961f-ac368776e3b0"
                },
                "collectionType": "/api/3/alerts",
                "collection": "{{ vars.input.records[0]['@id'] }}"
              },
              "status": null,
              "top": "900",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/b593663d-7d13-40ce-a3a3-96dece928722",
              "group": null,
              "uuid": "86e0d1c3-4aa3-55d7-945e-865f10cbfb86"
            },
            {
              "@type": "WorkflowStep",
              "name": "Raised",
              "description": null,
              "arguments": {
                "changed": true,
                "score": "{{ vars.score }}",
                "reason": "abuse confidence {{ vars.score }} is at or above {{ vars.threshold }}"
              },
              "status": null,
              "top": "1030",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/04d0cf46-b6a8-42c4-8683-60a7eaa69e8f",
              "group": null,
              "uuid": "6caabd68-78c4-5caf-b9dc-3fcdef92780d"
            }
          ],
          "routes": [
            {
              "@type": "WorkflowRoute",
              "name": "Start -> Settings",
              "targetStep": "/api/3/workflow_steps/b4753c92-8513-5569-822a-95b2b94e2911",
              "sourceStep": "/api/3/workflow_steps/b7d50a26-7aff-572a-b195-478dacd5d376",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "2b765ff2-21b2-5dfe-88be-3f3be723bd47"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Settings -> Is it a public IP",
              "targetStep": "/api/3/workflow_steps/ee27d865-becc-5cc8-90d1-61c41e9676e1",
              "sourceStep": "/api/3/workflow_steps/b4753c92-8513-5569-822a-95b2b94e2911",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "d653f427-7938-53b2-a16c-2ec5d24f354a"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Is it a public IP -> Check IP on AbuseIPDB",
              "targetStep": "/api/3/workflow_steps/a4a6a72d-d218-5014-ad3c-a5f619edc9da",
              "sourceStep": "/api/3/workflow_steps/ee27d865-becc-5cc8-90d1-61c41e9676e1",
              "label": "Public IP",
              "isExecuted": false,
              "group": null,
              "uuid": "45f1b258-2635-560d-81a0-cbea25726720"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Is it a public IP -> Not a public IP",
              "targetStep": "/api/3/workflow_steps/32bb9399-fe11-55e0-8780-e12f764feda0",
              "sourceStep": "/api/3/workflow_steps/ee27d865-becc-5cc8-90d1-61c41e9676e1",
              "label": "Else",
              "isExecuted": false,
              "group": null,
              "uuid": "99043769-ba2c-5587-b8a9-d2b6432e73d8"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Check IP on AbuseIPDB -> Read the score",
              "targetStep": "/api/3/workflow_steps/ae8df417-9f46-5c96-a55e-4c28b39e7cfc",
              "sourceStep": "/api/3/workflow_steps/a4a6a72d-d218-5014-ad3c-a5f619edc9da",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "90e5ace2-5e90-5cef-9cb2-eed462a001b1"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Read the score -> Over the threshold",
              "targetStep": "/api/3/workflow_steps/1e6aa481-78e8-588b-9f69-7a32091c13d2",
              "sourceStep": "/api/3/workflow_steps/ae8df417-9f46-5c96-a55e-4c28b39e7cfc",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "fc3259f1-a2b1-501d-b804-b49cfe2b8b76"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Over the threshold -> Set severity to Critical",
              "targetStep": "/api/3/workflow_steps/86e0d1c3-4aa3-55d7-945e-865f10cbfb86",
              "sourceStep": "/api/3/workflow_steps/1e6aa481-78e8-588b-9f69-7a32091c13d2",
              "label": "Abusive",
              "isExecuted": false,
              "group": null,
              "uuid": "12237e6a-32c9-5363-ab1b-759a62c31ba0"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Over the threshold -> Below the threshold",
              "targetStep": "/api/3/workflow_steps/6f176260-d2d4-5bd1-b429-64a46a1fe7a8",
              "sourceStep": "/api/3/workflow_steps/1e6aa481-78e8-588b-9f69-7a32091c13d2",
              "label": "Else",
              "isExecuted": false,
              "group": null,
              "uuid": "d9d74938-d9fc-518b-ab97-375902dd2675"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Set severity to Critical -> Raised",
              "targetStep": "/api/3/workflow_steps/6caabd68-78c4-5caf-b9dc-3fcdef92780d",
              "sourceStep": "/api/3/workflow_steps/86e0d1c3-4aa3-55d7-945e-865f10cbfb86",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "e146a396-751a-5541-ab0b-baf4eda68c44"
            }
          ],
          "groups": [],
          "priority": "/api/3/picklists/9e8d41e4-8ada-4a2c-bd02-07f62c6d0a00",
          "isEditable": true,
          "uuid": "1c146eb0-4468-5d35-99c9-323f554f1179",
          "isPrivate": false
        }
      ]
    }
  ]
}
