# This n8n workflow automates website security audits. It combines direct website scanning, threat intelligence from AlienVault OX, and advanced analysis from an OpenAI large language model (LLM) to generate and email a comprehensive security report.
## How it Works (Workflow Flow):
Input: A user provides a website URL via a simple web form.
**Data Collection:**
- An HTTP Request node visits the provided URL to gather initial data (status code, headers).
- An AlienVault HTTP Request node queries AlienVault OX for known threats associated with the website's hostname.
**Data Preparation (Prepare Data for AI):**
- A custom code node consolidates the collected website data and AlienVault intelligence, performing initial checks for common issues (e.g., error codes, missing security headers, AlienVault warnings).
**AI Analysis (Security Configuration Audit):**
- The prepared data is sent to an OpenAI Chat Model, which acts as a cybersecurity expert. The AI analyzes the data to identify vulnerabilities, explain their impact, suggest exploitation methods, and outline mitigation steps.
**Report Formatting (Format Report for Email):**
- Another custom code node takes the AI's plain-text report and converts it into a structured HTML format suitable for email.
**Delivery (Send Security Report):**
- The final HTML report is sent via Gmail to a specified email address.
### **Setup Steps:**
To use this workflow, you'll need an n8n instance and the following credentials:
- **n8n Instance:** Ensure your n8n environment is running.
- **OpenAI API Key:**
- Generate a key from OpenAI.
- Add an OpenAI API credential in n8n (e.g., OpenAI account).
- **AlienVault OX API Key:**
- Obtain a key from your AlienVault OX profile.
- Add an AlienVault OX API credential in n8n (e.g., AlienVault account).
- **Gmail Account:**
- Set up a Gmail OAuth2 credential in n8n for sending emails (recommended for security; involves Google Cloud setup).
- **Import Workflow:**
- Copy the workflow's JSON code.
- In n8n, import the workflow via Workflows > New > Import from JSON.
- **Configure Recipient:**
- In the Send Security Report node, specify the email address where reports should be sent.
- **Activate:** Enable the workflow to start processing submissions.
Once activated, access the "On form submission" webhook URL to input a URL and trigger an audit.
Platform
n8n
Category
IT & Development
Price
Free
Creator
The O Suite
code
gmail
formTrigger
httpRequest
agent
lmChatOpenAi
How to import this workflow into n8n
1Purchase or download the workflow to get the n8n workflow JSON file.
2In your n8n instance, open Workflows and choose "Import from File" (or paste the JSON with Ctrl+V on the canvas).
3Open each node marked with a credential warning and connect your own accounts and API keys.
4Run the workflow once manually to verify the data flow, then toggle it to Active.