π Remediate critical attack paths with Neo4j, OpenAI, GitHub and Jira
β‘ 15 views Β· π SecOps & Security Automation
π‘ Pro Tip β If you need GitHub data beyond what the REST API gives you, ScraperNode has a repository scraper that extracts metadata at scale without token rate limits.
Description
Quick overview
This workflow scans a Neo4j-compatible security graph on a schedule or manually, automatically identifies and remediates the riskiest attack paths between internet-facing assets and crown-jewel resources using OpenAI, and orchestrates resolution by opening Jira tickets and GitHub pull requests with linked fixes.
How it works
- Runs on a daily schedule or manual trigger.
- Queries the Neo4j-compatible security graph to find shortest paths from internet-facing to critical assets.
- Parses and structures candidate attack paths and scores them for risk using set criteria.
- Selects the highest-risk path over the threshold and fetches the related Infrastructure-as-Code file from GitHub.
- Uses OpenAI to generate a detailed remediation summary, steps, a corrected file, and ticket/PR metadata.
- Creates a Jira issue describing the finding and its proposed fix.
- Opens a new GitHub branch, commits the fixed IaC file, and opens a pull request referencing the Jira ticket.
- Posts the pull request link back to the Jira issue to close the feedback loop.
Setup
- Add your Neo4j HTTP Basic Auth credentials to the security graph query node.
- Add a GitHub API credential with repo scope to all GitHub request nodes.
- Add a Jira Software Cloud credential (email + API token) to both Jira request nodes.
- Add your OpenAI API key credential to the OpenAI Chat Model node.
- Update configuration values in the βSet - Configβ node: Neo4j URL, risk score threshold, Jira project info, GitHub repo and branch, and default IaC file path.
- Ensure your security graph schema includes required Asset properties as described.
π Nodes Used
HTTP Request, Schedule Trigger, AI Agent, OpenAI Chat Model
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File