# Detect and remediate leaked secret on repo with GitHub and AWS: n8n workflow

> Started by an event in a connected app, and works across Jira, Slack and n8n data table. It hands the judgement calls to OpenRouter.

Source: https://millionrounds.com/workflow/detect-and-remediate-leaked-secret-on-repo-with-github-and-a (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Chat assistants](https://millionrounds.com/workflows?category=Chat+assistants#library)

# Detect and remediate leaked secret on repo with GitHub and AWS

Started by an event in a connected app, and works across Jira, Slack and n8n data table. It hands the judgement calls to OpenRouter. 22 steps, 1 branch: large, and worth reading before you trust it with anything live.

Large Calls a model: OpenRouter

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fdetect-and-remediate-leaked-secret-on-repo-with-github-and-a)

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

**1** Branch: places the flow splits

**0** Loops or waits

**3** Services it connects to

## The flow

Starts it 1 Model 2 Logic 7 Service 12

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

- 1 **OpenRouter Chat Model** Lm Chat Open Router *Model*
- 2 **Github Trigger On Push** Github trigger *Starts it*
- 3 **AI - Classifier** Agent *Model*
- 4 **Code - Extract Useful Field-1** Code *Logic*
- 5 **Code - Formatter** Code *Logic*
- 6 **Fetch - Commit Changes From Github** Http Request *Service*
- 7 **Switch** Switch *Logic*
- 8 **Code - RegEx Scanner** Code *Logic*
- 9 **Get - UserName From AWS** Http Request *Service*
- 10 **Create an issue for leaked key** Jira *Service*
- 11 **Create an issue for exposed database url** Jira *Service*
- 12 **Code - Hash Leaked Value** Code *Logic*
- 13 **Rename** Set *Logic*
- 14 **Send a message notification-2** Slack *Service*
- 15 **Send a message notification-3** Slack *Service*
- 16 **If row does not exist** Data Table *Service*
- 17 **Revoke AccessKey On AWS** Http Request *Service*
- 18 **Save To DataTable-2** Data Table *Service*
- 19 **Save To DataTable-3** Data Table *Service*
- 20 **Aggregate** Aggregate *Logic*
- 21 **Send a message notification-1** Slack *Service*
- 22 **Save To DataTable-1** Data Table *Service*

## How it's built

- **Starts on:** An event in a connected app
- **Steps:** 22, with 1 branch
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Jira, Slack, n8n data table
- **Model:** OpenRouter

## Questions

What does it need to run?

An n8n account, plus your own Jira and Slack accounts, and a key for OpenRouter. 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 OpenRouter. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 22 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 22 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%2Fdetect-and-remediate-leaked-secret-on-repo-with-github-and-a)
- **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.

## Connects to

Each opens the other workflows that use it.

[Jira](https://millionrounds.com/workflows?service=Jira#library)[Slack](https://millionrounds.com/workflows?service=Slack#library)[n8n data table](https://millionrounds.com/workflows?service=n8n+data+table#library)

## Workflows like it

Also chat assistants, with the same services where possible, closest in size first.

- [**Audit browser and proxy fingerprint/IP integrity with OpenAI** 22 steps · calls a model · Google Sheets, Slack](https://millionrounds.com/workflow/audit-browser-and-proxy-fingerprint-ip-integrity-with-openai)
- [**Detect multi-source transaction fraud and reconcile finances** 22 steps · calls a model · Gmail, Postgres](https://millionrounds.com/workflow/detect-multi-source-transaction-fraud-and-reconcile-finances)
- [**Find reply-worthy Hacker News and Stack Overflow threads** 22 steps · calls a model · Discord, n8n data table](https://millionrounds.com/workflow/find-reply-worthy-hacker-news-and-stack-overflow-threads)
- [**Generate AI camera moves with Seedance** 22 steps · calls a model · ClickUp, Google Drive](https://millionrounds.com/workflow/generate-ai-camera-moves-with-seedance)
- [**Generate contextual recommendations from Slack with Pinecone** 22 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/generate-contextual-recommendations-from-slack-with-pinecone)
- [**Get a daily cybersecurity news digest on Telegram and Slack** 22 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/get-a-daily-cybersecurity-news-digest-on-telegram-and-slack)
