# Scan code repositories for governance issues with OpenAI: n8n workflow

> Started by an event in a connected app. It calls services over plain HTTP rather than through connectors. It hands the judgement calls to OpenAI.

Source: https://millionrounds.com/workflow/scan-code-repositories-for-governance-issues-with-openai (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Research and reporting](https://millionrounds.com/workflows?category=Research+and+reporting#library)

# Scan code repositories for governance issues with OpenAI

Started by an event in a connected app. It calls services over plain HTTP rather than through connectors. It hands the judgement calls to OpenAI. 23 steps, 2 branches: large, and worth reading before you trust it with anything live.

Large Calls a model: OpenAI

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fscan-code-repositories-for-governance-issues-with-openai)

**23 steps** Large: read it before trusting it with anything live

**2** Branches: places the flow splits

**0** Loops or waits

**0** Services by connector: it calls them over plain HTTP

## The flow

Starts it 1 Model 11 Logic 10 Service 1

The steps in the order they run, from what starts it.

- 1 **Start Governance Scan** Manual trigger *Starts it*
- 2 **Orchestrator Model** Lm Chat Open Ai *Model*
- 3 **Static Analysis Model** Lm Chat Open Ai *Model*
- 4 **Architectural Analysis Model** Lm Chat Open Ai *Model*
- 5 **Report Generation Model** Lm Chat Open Ai *Model*
- 6 **Structured Governance Output** Output Parser Structured *Model*
- 7 **Security Analysis Model** Lm Chat Open Ai *Model*
- 8 **Extract Repository Metadata** Ssh *Service*
- 9 **Governance Orchestrator Agent** Agent *Model*
- 10 **Static Code Analysis Agent** Agent Tool *Model*
- 11 **Architectural Compliance Agent** Agent Tool *Model*
- 12 **CTO Report Generation Agent** Agent Tool *Model*
- 13 **Security Vulnerability Scanner Agent** Agent Tool *Model*
- 14 **Format Final Report** Set *Logic*
- 15 **Check Critical Issues Threshold** If *Logic*
- 16 **Prepare Escalation Alert** Set *Logic*
- 17 **Log Standard Report** Set *Logic*
- 18 **Route by Severity Level** Switch *Logic*
- 19 **Merge Analysis Paths** Merge *Logic*
- 20 **Critical Severity Handler** Set *Logic*
- 21 **Medium Severity Handler** Set *Logic*
- 22 **Enrich Final Output** Set *Logic*
- 23 **Aggregate Critical Findings** Aggregate *Logic*

## How it's built

- **Starts on:** An event in a connected app
- **Steps:** 23, with 2 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Nothing by connector; it calls services over plain HTTP
- **Model:** OpenAI

## Questions

What does it need to run?

An n8n account, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an event in a connected app.

Does it use AI?

Yes. It calls OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 23 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 23 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fscan-code-repositories-for-governance-issues-with-openai)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Workflows like it

Also research and reporting, with the same services where possible, closest in size first.

- [**AI research agents to automate PDF analysis with Mistral** 23 steps · calls a model · Gmail](https://millionrounds.com/workflow/ai-research-agents-to-automate-pdf-analysis-with-mistral)
- [**AI-powered email automation for business: Summarize & respond** 23 steps · calls a model · Email, Google Drive](https://millionrounds.com/workflow/ai-powered-email-automation-for-business-summarize-and-respo)
- [**Automate LinkedIn engagement with OpenRouter and Google Sheets** 23 steps · calls a model · Google Sheets, Telegram](https://millionrounds.com/workflow/automate-linkedin-engagement-with-openrouter-and-google-shee)
- [**Automate privacy risk detection, approvals, and audit reports** 23 steps · calls a model · Gmail, Slack](https://millionrounds.com/workflow/automate-privacy-risk-detection-approvals-and-audit-reports)
- [**Automated multi-agent trading analysis with OpenAI** 23 steps · calls a model · Notion, Telegram](https://millionrounds.com/workflow/automated-multi-agent-trading-analysis-with-openai)
- [**Community insights with Qdrant and Python** 23 steps · calls a model · Google Sheets, Qdrant](https://millionrounds.com/workflow/community-insights-with-qdrant-and-python)
