{
  "name": "Network vulnerability scanner with NMAP and automated CVE reporting",
  "nodes": [
    {
      "id": "130cf806-eb72-40f6-9bcb-48cbb27ce486",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -640,
        -336
      ]
    },
    {
      "id": "6586f22d-fce5-49e4-ac61-c1da19c62938",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -976,
        240
      ]
    },
    {
      "id": "5cd295a5-26b1-471b-bdac-0cae05a4ea86",
      "name": "1. Set Parameters",
      "type": "n8n-nodes-base.set",
      "position": [
        -336,
        -48
      ]
    },
    {
      "id": "2b694d9e-943d-446b-a03b-fbc42b7f8fc4",
      "name": "2. Execute Nmap Scan",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        352,
        -48
      ]
    },
    {
      "id": "13896a62-80d9-4228-857a-6f81f782157d",
      "name": "4. Save Scan Data to File",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        912,
        -48
      ]
    },
    {
      "id": "419ce6bb-f96a-4081-b4a8-0f4337650131",
      "name": "5. CVE Enrichment Loop",
      "type": "n8n-nodes-base.code",
      "position": [
        1216,
        -48
      ]
    },
    {
      "id": "ba2b5863-0124-41bf-a7ba-ddad989c1991",
      "name": "6. Save Enriched Data",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        1520,
        -48
      ]
    },
    {
      "id": "f1536f6c-e932-442d-81af-1a53a18ee3fc",
      "name": "7. Aggregate All Data",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1824,
        -48
      ]
    },
    {
      "id": "40b24046-c02f-4088-a1e3-83c2bac88f3f",
      "name": "8. Prepare Report Structure",
      "type": "n8n-nodes-base.code",
      "position": [
        2112,
        -48
      ]
    },
    {
      "id": "2b475881-2fb9-4a29-aa57-1de5ef91a194",
      "name": "9. Generate HTML Report",
      "type": "n8n-nodes-base.code",
      "position": [
        2416,
        -48
      ]
    },
    {
      "id": "bc0271d6-751b-4ce0-984c-0d38a13802ae",
      "name": "10. Save Report to File",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        2720,
        -48
      ]
    },
    {
      "id": "1eee0642-57ec-4846-8354-fc37f5b8a988",
      "name": "11. Read Report for Output",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        3024,
        -48
      ]
    },
    {
      "id": "f447bad9-718e-4ad4-bd43-1cca0a5fad57",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1168,
        -224
      ],
      "parameters": {
        "width": 816,
        "height": 128,
        "content": "## Get CVE datas\n**CPE Search** : https://nvd.nist.gov/products/cpe/search\n**CVE Search** : https://services.nvd.nist.gov/rest/json/cves/2.0?cpeName={CPE Tag}&resultsPerPage=10&isVulnerable"
      }
    },
    {
      "id": "552fec50-fb88-4214-9536-97d5b6b95212",
      "name": "12. Convert the Report to PDF from HTML",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        3280,
        -48
      ]
    },
    {
      "id": "3adf22b0-cb68-4065-8ef4-482491881275",
      "name": "13. Read Report PDF for Output",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        3504,
        -48
      ]
    },
    {
      "id": "23c3aee7-d384-4a95-9369-3649a3c7b49d",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -640,
        240
      ]
    },
    {
      "id": "9a2a64ea-a996-4ead-b5cf-5de8218bd40f",
      "name": "Add NMAP-HELPER",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        -112,
        -48
      ]
    },
    {
      "id": "2c0b7dcc-176a-4c72-a228-496078fb4a07",
      "name": "Pre-Set-Target",
      "type": "n8n-nodes-base.set",
      "position": [
        -640,
        -48
      ]
    },
    {
      "id": "fc2c83f8-f167-47be-9700-9cc018d70cb3",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -976,
        -336
      ]
    },
    {
      "id": "08f20486-655b-4cf0-a287-e643df9ec96d",
      "name": "3. Parse NMAP JSON to Services",
      "type": "n8n-nodes-base.code",
      "position": [
        624,
        -48
      ]
    },
    {
      "id": "ca7d013a-e407-46bf-8bd1-c5b0256a477a",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3264,
        -192
      ],
      "parameters": {
        "width": 352,
        "height": 96,
        "content": "## HTML to PDF\nhttps://www.princexml.com/doc/intro-userguide/"
      }
    },
    {
      "id": "1564f1df-b1d4-4683-aad1-4bb2a77f16c1",
      "name": "14/a. Send Report in Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        3856,
        -336
      ]
    },
    {
      "id": "2dca7335-376a-4f2d-ab0f-4566366904a7",
      "name": "14/b. Send Report in Email with SMTP (example POSTFIX)",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        3856,
        256
      ]
    },
    {
      "id": "813b1c02-20d6-455e-abbc-863f60d8acb2",
      "name": "Optional Params Setter",
      "type": "n8n-nodes-base.set",
      "position": [
        112,
        -48
      ]
    },
    {
      "id": "218eb838-e1db-4014-a99e-9ebdf415788b",
      "name": "Sticky Note - Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1792,
        -288
      ],
      "parameters": {
        "width": 480,
        "height": 568,
        "content": "## How it works\n\nThis workflow scans network targets using Nmap, enriches findings with CVE data from the NVD API, and generates password-protected PDF reports. It detects services, matches them to CP"
      }
    },
    {
      "id": "50ec880a-44ee-489e-a390-6fdf224fa619",
      "name": "Sticky Note - Triggers",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1200,
        -80
      ],
      "parameters": {
        "width": 400,
        "height": 144,
        "content": "## Triggers\n\nFour ways to start scans: webhook API for automation, web form for users, manual button for testing, or scheduled cron for routine scans."
      }
    },
    {
      "id": "4dfbda37-2e01-4b63-9914-e5f3c22057cb",
      "name": "Sticky Note - Dependency",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -144,
        -320
      ],
      "parameters": {
        "width": 392,
        "height": 220,
        "content": "## Dependency Check\n\nVerifies nmap-helper installation (converts Nmap XML to JSON). First run installs from GitHub; subsequent runs skip this step.\n\nhttps://github.com/net-shaper/nmap-helper\n\nhttps://"
      }
    },
    {
      "id": "8afde198-d3c2-46b2-bc67-df6745e23a52",
      "name": "Sticky Note - Scanning",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        160
      ],
      "parameters": {
        "width": 360,
        "height": 136,
        "content": "## Nmap Scanning\n\nExecutes full port scan with service/version detection. Configure timing and parallelism in 'Optional Params Setter' node."
      }
    },
    {
      "id": "2b0abc7e-ae05-4ff4-b9e6-09ce4ca8df22",
      "name": "Sticky Note - CVE",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1200,
        160
      ],
      "parameters": {
        "width": 420,
        "height": 144,
        "content": "## CVE Enrichment\n\nQueries NVD API for each detected service using CPE identifiers. Returns CVE IDs, CVSS scores, severity levels, and references. Rate-limited to 1 req/sec."
      }
    },
    {
      "id": "22463e33-b06b-4ac4-8db9-c4f5c71a90b5",
      "name": "Sticky Note - Report Gen",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2432,
        160
      ],
      "parameters": {
        "width": 360,
        "height": 140,
        "content": "## Report Generation\n\nGroups findings by host, calculates statistics, and generates HTML report with severity breakdown and detailed vulnerability info."
      }
    },
    {
      "id": "ff4d8b95-d992-4b1c-97ca-598f329febcf",
      "name": "Sticky Note - PDF",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3280,
        160
      ],
      "parameters": {
        "width": 320,
        "height": 136,
        "content": "## PDF Conversion\n\nUses PrinceXML to convert HTML report to password-protected PDF. Password set in '1. Set Parameters' node."
      }
    },
    {
      "id": "eff61d08-4360-446d-b57b-71634c8d09d0",
      "name": "Sticky Note - Distribution",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3840,
        -48
      ],
      "parameters": {
        "width": 320,
        "height": 136,
        "content": "## Distribution\n\nSends PDF reports via Telegram and email. Update credentials and recipients in these nodes before first use."
      }
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "1. Set Parameters",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Pre-Set-Target",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pre-Set-Target": {
      "main": [
        [
          {
            "node": "1. Set Parameters",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add NMAP-HELPER": {
      "main": [
        [
          {
            "node": "Optional Params Setter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Pre-Set-Target",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1. Set Parameters": {
      "main": [
        [
          {
            "node": "Add NMAP-HELPER",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "1. Set Parameters",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2. Execute Nmap Scan": {
      "main": [
        [
          {
            "node": "3. Parse NMAP JSON to Services",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "6. Save Enriched Data": {
      "main": [
        [
          {
            "node": "7. Aggregate All Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7. Aggregate All Data": {
      "main": [
        [
          {
            "node": "8. Prepare Report Structure",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5. CVE Enrichment Loop": {
      "main": [
        [
          {
            "node": "6. Save Enriched Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Optional Params Setter": {
      "main": [
        [
          {
            "node": "2. Execute Nmap Scan",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "10. Save Report to File": {
      "main": [
        [
          {
            "node": "11. Read Report for Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "9. Generate HTML Report": {
      "main": [
        [
          {
            "node": "10. Save Report to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4. Save Scan Data to File": {
      "main": [
        [
          {
            "node": "5. CVE Enrichment Loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "11. Read Report for Output": {
      "main": [
        [
          {
            "node": "12. Convert the Report to PDF from HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8. Prepare Report Structure": {
      "main": [
        [
          {
            "node": "9. Generate HTML Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "13. Read Report PDF for Output": {
      "main": [
        [
          {
            "node": "14/a. Send Report in Telegram",
            "type": "main",
            "index": 0
          },
          {
            "node": "14/b. Send Report in Email with SMTP (example POSTFIX)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3. Parse NMAP JSON to Services": {
      "main": [
        [
          {
            "node": "4. Save Scan Data to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "12. Convert the Report to PDF from HTML": {
      "main": [
        [
          {
            "node": "13. Read Report PDF for Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}