{
  "name": "Gate deployments on WAF scan results with WAFtester",
  "nodes": [
    {
      "id": "793762f9-088e-4c68-b43e-9828be0fc25c",
      "name": "Deploy Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        672,
        32
      ]
    },
    {
      "id": "123e328c-f1f2-4816-a1e8-cc87719f71ae",
      "name": "Detect WAF",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        864,
        32
      ]
    },
    {
      "id": "a1348c2f-b92c-4344-ad49-ed4841760fc8",
      "name": "Start Scan",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1072,
        32
      ]
    },
    {
      "id": "a45cc213-a308-436f-b5a2-9592021f6c16",
      "name": "Wait for Scan",
      "type": "n8n-nodes-base.wait",
      "position": [
        1264,
        32
      ]
    },
    {
      "id": "d595a7db-5a95-4cef-a502-0ba35bbdf01f",
      "name": "Poll Task Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1472,
        32
      ]
    },
    {
      "id": "78af2954-d79f-43cc-b17e-9b67375fc3c7",
      "name": "Parse Results",
      "type": "n8n-nodes-base.code",
      "position": [
        1664,
        32
      ]
    },
    {
      "id": "7b655595-dc14-4e30-b5f1-13c1b314e6ab",
      "name": "Pass or Fail?",
      "type": "n8n-nodes-base.if",
      "position": [
        1872,
        32
      ]
    },
    {
      "id": "6dce4ceb-108e-47a5-b87c-c5bf9d140835",
      "name": "Respond Pass",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        2064,
        -64
      ]
    },
    {
      "id": "55ffe1fa-8a43-4aed-9f99-676333e1778c",
      "name": "Respond Fail",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        2064,
        128
      ]
    },
    {
      "id": "d7f85de9-f0b3-4b38-8eab-ee80d5ad1181",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -96,
        -240
      ],
      "parameters": {
        "width": 700,
        "height": 440,
        "content": "### How it works\n\n1. CI/CD pipeline POSTs target URL and categories to the webhook\n2. Detects WAF vendor, then runs security scan\n3. Polls for results and evaluates detection rate vs threshold\n4. Retu"
      }
    },
    {
      "id": "3323c452-47a0-4e78-837a-07a6c84912e1",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        640,
        -240
      ],
      "parameters": {
        "width": 980,
        "height": 144,
        "content": "## WAF Detection & Scan\n\nDetects WAF vendor and runs async security scan with 30s polling delay."
      }
    },
    {
      "id": "7e1c0ca5-48d1-4882-b8f1-811c849f0b60",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1648,
        -240
      ],
      "parameters": {
        "width": 600,
        "height": 144,
        "content": "## Gate Decision\n\nThe Code node calculates detection rate. If it meets the threshold, the pipeline proceeds. Otherwise, deployment is blocked with bypass details in the response body."
      }
    }
  ],
  "connections": {
    "Detect WAF": {
      "main": [
        [
          {
            "node": "Start Scan",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start Scan": {
      "main": [
        [
          {
            "node": "Wait for Scan",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Results": {
      "main": [
        [
          {
            "node": "Pass or Fail?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pass or Fail?": {
      "main": [
        [
          {
            "node": "Respond Pass",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Respond Fail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Scan": {
      "main": [
        [
          {
            "node": "Poll Task Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Deploy Webhook": {
      "main": [
        [
          {
            "node": "Detect WAF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Poll Task Status": {
      "main": [
        [
          {
            "node": "Parse Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}