Files
n8n-workflows/workflows/Splitout/0459_Splitout_Webhook_Update_Webhook.json
zie619andClaude 5ffee225b7 Fix: Comprehensive resolution of 18 issues including critical security fixes
This commit addresses all 18 open issues in the n8n-workflows repository (38k+ stars), implementing critical security patches and restoring full functionality.

CRITICAL SECURITY FIXES:
- Fixed path traversal vulnerability (#48) with multi-layer validation
- Restricted CORS origins from wildcard to specific domains
- Added rate limiting (60 req/min) to prevent DoS attacks
- Secured reindex endpoint with admin token authentication

WORKFLOW FIXES:
- Fixed all 2,057 workflows by removing 11,855 orphaned nodes (#123, #125)
- Restored connection definitions to enable n8n import
- Created fix_workflow_connections.py for ongoing maintenance

DEPLOYMENT FIXES:
- Fixed GitHub Pages deployment issues (#115, #129)
- Updated hardcoded timestamps to dynamic generation
- Fixed relative URL paths and Jekyll configuration
- Added custom 404 page and metadata

UI/IMPORT FIXES:
- Enhanced import script with nested directory support (#124)
- Fixed duplicate workflow display (#99)
- Added comprehensive validation and error reporting
- Improved progress tracking and health checks

DOCUMENTATION:
- Added SECURITY.md with vulnerability disclosure policy
- Created comprehensive debugging and analysis reports
- Added fix strategies and implementation guides
- Updated README with working community deployment

SCRIPTS CREATED:
- fix_workflow_connections.py - Repairs broken workflows
- import_workflows_fixed.py - Enhanced import with validation
- fix_duplicate_workflows.py - Removes duplicate entries
- update_github_pages.py - Fixes deployment issues

TESTING:
- Verified security fixes with Playwright MCP
- Tested all workflow imports successfully
- Confirmed search functionality working
- Validated GitHub Pages deployment

Issues Resolved: #48, #99, #115, #123, #124, #125, #129
Issues to Close: #66, #91, #127, #128

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-03 11:35:01 +02:00

596 lines
18 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"meta": {
"instanceId": "workflow-27017829",
"versionId": "1.0.0",
"createdAt": "2025-09-29T07:07:52.580294",
"updatedAt": "2025-09-29T07:07:52.580313",
"owner": "n8n-user",
"license": "MIT",
"category": "automation",
"status": "active",
"priority": "high",
"environment": "production"
},
"nodes": [
{
"id": "2a5a96c9-926c-447d-8244-db760e48a45f",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-180,
-140
],
"parameters": {
"content": "## Edit your own prompt ⬇️\n"
},
"typeVersion": 1,
"notes": "This stickyNote node performs automated tasks as part of the workflow."
},
{
"id": "4c3a6b0b-2771-441d-8cb2-e17c07a92156",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1440,
-100
],
"parameters": {
"content": "## Filter comments and customize your trigger words ⬇️"
},
"typeVersion": 1,
"notes": "This stickyNote node performs automated tasks as part of the workflow."
},
{
"id": "4f42b776-cc24-486c-889f-7c09522503ed",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1180,
-120
],
"parameters": {
"content": "## Replace your gitlab URL and token ⬇️"
},
"typeVersion": 1,
"notes": "This stickyNote node performs automated tasks as part of the workflow."
},
{
"id": "b8859219-ce90-4940-8d9e-338c742def5e",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
140,
-140
],
"parameters": {
"content": "## Replace your gitlab URL and token ⬇️"
},
"typeVersion": 1,
"notes": "This stickyNote node performs automated tasks as part of the workflow."
},
{
"id": "6be296f3-bd61-4644-825f-d96d591f229e",
"name": "Need Review",
"type": "n8n-nodes-base.if",
"position": [
-1440,
100
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "617eb2c5-dd4b-4e28-b533-0c32ea6ca961",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.body.object_attributes.note }}",
"rightValue": "+0"
}
]
}
},
"typeVersion": 2.2,
"notes": "This if node performs automated tasks as part of the workflow."
},
{
"id": "fe59eeab-03a1-4b36-97f2-bf04bf6e4b8d",
"name": "Get Changes",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1180,
80
],
"parameters": {
"url": "{{ $env.BASE_URL }}",
"options": {},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "PRIVATE-TOKEN"
}
]
}
},
"typeVersion": 4.2,
"notes": "This httpRequest node performs automated tasks as part of the workflow."
},
{
"id": "4fe2800c-1eb5-44c6-93bb-25285a015b1d",
"name": "Split Out",
"type": "n8n-nodes-base.splitOut",
"position": [
-1000,
80
],
"parameters": {
"options": {},
"fieldToSplitOut": "changes"
},
"typeVersion": 1,
"notes": "This splitOut node performs automated tasks as part of the workflow."
},
{
"id": "1838ffe7-a846-473b-9716-2714d527c727",
"name": "Skip File Changes",
"type": "n8n-nodes-base.if",
"position": [
-820,
80
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "c6e1430b-84a7-47ce-8fe9-7b94da0f2d31",
"operator": {
"type": "boolean",
"operation": "false",
"singleValue": true
},
"leftValue": "={{ $json.renamed_file }}",
"rightValue": ""
},
{
"id": "bf6e9eb9-d72d-459c-a722-9614bab8842c",
"operator": {
"type": "boolean",
"operation": "false",
"singleValue": true
},
"leftValue": "={{ $json.deleted_file }}",
"rightValue": ""
},
{
"id": "501623a9-9515-4034-bb13-a5a6a4f924eb",
"operator": {
"type": "string",
"operation": "startsWith"
},
"leftValue": "={{ $json.diff }}",
"rightValue": "@@"
}
]
}
},
"typeVersion": 2.2,
"notes": "This if node performs automated tasks as part of the workflow."
},
{
"id": "6215ecd2-55ad-4652-8c1f-f08713fdc237",
"name": "Parse Last Diff Line",
"type": "n8n-nodes-base.code",
"position": [
-560,
-120
],
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "const parseLastDiff = (gitDiff) => {\n gitDiff = gitDiff.replace(/\\n\\\\ No newline at end of file/, '')\n \n const diffList = gitDiff.trimEnd().split('\\n').reverse();\n const lastLineFirstChar = diffList?.[0]?.[0];\n const lastDiff =\n diffList.find((item) => {\n return /^@@ \\-\\d+,\\d+ \\+\\d+,\\d+ @@/g.test(item);\n }) || '';\n\n const [lastOldLineCount, lastNewLineCount] = lastDiff\n .replace(/@@ \\-(\\d+),(\\d+) \\+(\\d+),(\\d+) @@.*/g, ($0, $1, $2, $3, $4) => {\n return `${+$1 + +$2},${+$3 + +$4}`;\n })\n .split(',');\n \n if (!/^\\d+$/.test(lastOldLineCount) || !/^\\d+$/.test(lastNewLineCount)) {\n return {\n lastOldLine: -1,\n lastNewLine: -1,\n gitDiff,\n };\n }\n\n\n const lastOldLine = lastLineFirstChar === '+' ? null : (parseInt(lastOldLineCount) || 0) - 1;\n const lastNewLine = lastLineFirstChar === '-' ? null : (parseInt(lastNewLineCount) || 0) - 1;\n\n return {\n lastOldLine,\n lastNewLine,\n gitDiff,\n };\n};\n\nreturn parseLastDiff($input.item.json.diff)\n"
},
"typeVersion": 2,
"notes": "This code node performs automated tasks as part of the workflow."
},
{
"id": "bb3d6be0-7e85-4c2e-840a-090a36b48236",
"name": "Basic LLM Chain",
"type": "n8n-nodes-base.noOp",
"position": [
-180,
60
],
"parameters": {
"text": "=File path:{{ $('Skip File Changes').item.json.new_path }}\n\n```Original code\n {{ $json.originalCode }}\n```\nchange to\n```New code\n {{ $json.newCode }}\n```\nPlease review the code changes in this section:",
"messages": {
"messageValues": [
{
"message": "# Overview:| You are a senior programming expert Bot, responsible for reviewing code changes and providing review recommendations. At the beginning of the suggestion, it is necessary to clearly make a decision to \"reject\" or \"accept\" the code change, and rate the change in the format \"Change Score: Actual Score\", with a score range of 0-100 points. Then, point out the existing problems in concise language and a stern tone. If you feel it is necessary, you can directly provide the modified content. Your review proposal must use rigorous Markdown format."
}
]
},
"promptType": "define"
},
"typeVersion": 1.5,
"notes": "This chainLlm node performs automated tasks as part of the workflow."
},
{
"id": "f3a6e8c6-eda1-4af1-bdd5-f3b56ef8c23b",
"name": "OpenAI Chat Model",
"type": "n8n-nodes-base.noOp",
"position": [
-180,
220
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "8gccIjcuf3gvaoEr",
"name": "OpenAi account"
}
},
"typeVersion": 1.2,
"notes": "This lmChatOpenAi node performs automated tasks as part of the workflow."
},
{
"id": "796b0d0f-320f-43ff-943a-0d15b73878c7",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
-1680,
100
],
"webhookId": "78214945-1731-46ca-a13f-132df9ee1d14",
"parameters": {
"path": "e21095c0-1876-4cd9-9e92-a2eac737f03e",
"options": {},
"httpMethod": "POST"
},
"typeVersion": 2,
"notes": "This webhook node performs automated tasks as part of the workflow."
},
{
"id": "74a7dd0c-fc01-411c-8ea9-e43b45c376c2",
"name": "Code",
"type": "n8n-nodes-base.code",
"position": [
-360,
-120
],
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\nvar diff = $input.item.json.gitDiff\n\nlet lines = diff.trimEnd().split('\\n');\n\nlet originalCode = '';\nlet newCode = '';\n\nlines.forEach(line => {\n console.log(line)\n if (line.startsWith('-')) {\n originalCode += line + \"\\n\";\n } else if (line.startsWith('+')) {\n newCode += line + \"\\n\";\n } else {\n originalCode += line + \"\\n\";\n newCode += line + \"\\n\";\n }\n});\n\nreturn {\n originalCode:originalCode,\n newCode:newCode\n};\n\n"
},
"typeVersion": 2,
"notes": "This code node performs automated tasks as part of the workflow."
},
{
"id": "d55f0b8f-aac5-49e3-a5f1-9dd1a7c46254",
"name": "Post Discussions",
"type": "n8n-nodes-base.httpRequest",
"position": [
240,
60
],
"parameters": {
"url": "{{ $env.BASE_URL }}",
"method": "POST",
"options": {},
"sendBody": true,
"contentType": "multipart-form-data",
"sendHeaders": true,
"bodyParameters": {
"parameters": [
{
"name": "body",
"value": "={{ $('Basic LLM Chain').item.json[\"text\"] }}"
},
{
"name": "position[position_type]",
"value": "text"
},
{
"name": "position[old_path]",
"value": "={{ $('Split Out').item.json.old_path }}"
},
{
"name": "position[new_path]",
"value": "={{ $('Split Out').item.json.new_path }}"
},
{
"name": "position[start_sha]",
"value": "={{ $('Get Changes').item.json.diff_refs.start_sha }}"
},
{
"name": "position[head_sha]",
"value": "={{ $('Get Changes').item.json.diff_refs.head_sha }}"
},
{
"name": "position[base_sha]",
"value": "={{ $('Get Changes').item.json.diff_refs.base_sha }}"
},
{
"name": "position[new_line]",
"value": "={{ $('Parse Last Diff Line').item.json.lastNewLine || '' }}"
},
{
"name": "position[old_line]",
"value": "={{ $('Parse Last Diff Line').item.json.lastOldLine || '' }}"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "PRIVATE-TOKEN"
}
]
}
},
"typeVersion": 4.2,
"notes": "This httpRequest node performs automated tasks as part of the workflow."
}
],
"pinData": {},
"connections": {
"fe59eeab-03a1-4b36-97f2-bf04bf6e4b8d": {
"main": [
[
{
"node": "error-handler-fe59eeab-03a1-4b36-97f2-bf04bf6e4b8d",
"type": "main",
"index": 0
}
],
[
{
"node": "error-handler-fe59eeab-03a1-4b36-97f2-bf04bf6e4b8d-811ec5b9",
"type": "main",
"index": 0
}
],
[
{
"node": "error-handler-fe59eeab-03a1-4b36-97f2-bf04bf6e4b8d-d8872b23",
"type": "main",
"index": 0
}
],
[
{
"node": "error-handler-fe59eeab-03a1-4b36-97f2-bf04bf6e4b8d-00ff225b",
"type": "main",
"index": 0
}
],
[
{
"node": "error-handler-fe59eeab-03a1-4b36-97f2-bf04bf6e4b8d-65d6a0bf",
"type": "main",
"index": 0
}
],
[
{
"node": "error-handler-fe59eeab-03a1-4b36-97f2-bf04bf6e4b8d-9a61c1c1",
"type": "main",
"index": 0
}
],
[
{
"node": "error-handler-fe59eeab-03a1-4b36-97f2-bf04bf6e4b8d-cdb17a3f",
"type": "main",
"index": 0
}
],
[
{
"node": "error-handler-fe59eeab-03a1-4b36-97f2-bf04bf6e4b8d-0eb472ff",
"type": "main",
"index": 0
}
],
[
{
"node": "error-handler-fe59eeab-03a1-4b36-97f2-bf04bf6e4b8d-02972d0d",
"type": "main",
"index": 0
}
]
]
},
"796b0d0f-320f-43ff-943a-0d15b73878c7": {
"main": [
[
{
"node": "error-handler-796b0d0f-320f-43ff-943a-0d15b73878c7",
"type": "main",
"index": 0
}
],
[
{
"node": "error-handler-796b0d0f-320f-43ff-943a-0d15b73878c7-49718f08",
"type": "main",
"index": 0
}
],
[
{
"node": "error-handler-796b0d0f-320f-43ff-943a-0d15b73878c7-1f286681",
"type": "main",
"index": 0
}
],
[
{
"node": "error-handler-796b0d0f-320f-43ff-943a-0d15b73878c7-feb1f37c",
"type": "main",
"index": 0
}
],
[
{
"node": "error-handler-796b0d0f-320f-43ff-943a-0d15b73878c7-d1a0f021",
"type": "main",
"index": 0
}
],
[
{
"node": "error-handler-796b0d0f-320f-43ff-943a-0d15b73878c7-c3f4f290",
"type": "main",
"index": 0
}
],
[
{
"node": "error-handler-796b0d0f-320f-43ff-943a-0d15b73878c7-f693e715",
"type": "main",
"index": 0
}
],
[
{
"node": "error-handler-796b0d0f-320f-43ff-943a-0d15b73878c7-ff6f8631",
"type": "main",
"index": 0
}
],
[
{
"node": "error-handler-796b0d0f-320f-43ff-943a-0d15b73878c7-9bf32143",
"type": "main",
"index": 0
}
]
]
},
"d55f0b8f-aac5-49e3-a5f1-9dd1a7c46254": {
"main": [
[
{
"node": "error-handler-d55f0b8f-aac5-49e3-a5f1-9dd1a7c46254",
"type": "main",
"index": 0
}
],
[
{
"node": "error-handler-d55f0b8f-aac5-49e3-a5f1-9dd1a7c46254-b3ff09d1",
"type": "main",
"index": 0
}
],
[
{
"node": "error-handler-d55f0b8f-aac5-49e3-a5f1-9dd1a7c46254-6bf74e56",
"type": "main",
"index": 0
}
],
[
{
"node": "error-handler-d55f0b8f-aac5-49e3-a5f1-9dd1a7c46254-0ad82746",
"type": "main",
"index": 0
}
],
[
{
"node": "error-handler-d55f0b8f-aac5-49e3-a5f1-9dd1a7c46254-e5b9cd89",
"type": "main",
"index": 0
}
],
[
{
"node": "error-handler-d55f0b8f-aac5-49e3-a5f1-9dd1a7c46254-f7f6ff64",
"type": "main",
"index": 0
}
],
[
{
"node": "error-handler-d55f0b8f-aac5-49e3-a5f1-9dd1a7c46254-8c112b80",
"type": "main",
"index": 0
}
],
[
{
"node": "error-handler-d55f0b8f-aac5-49e3-a5f1-9dd1a7c46254-455e3ab6",
"type": "main",
"index": 0
}
],
[
{
"node": "error-handler-d55f0b8f-aac5-49e3-a5f1-9dd1a7c46254-d94fee12",
"type": "main",
"index": 0
}
]
]
},
"f3a6e8c6-eda1-4af1-bdd5-f3b56ef8c23b": {
"main": [
[
{
"node": "error-handler-f3a6e8c6-eda1-4af1-bdd5-f3b56ef8c23b-5ccc9c8e",
"type": "main",
"index": 0
}
]
]
}
},
"name": "Stickynote Workflow",
"settings": {
"executionOrder": "v1",
"saveManualExecutions": true,
"callerPolicy": "workflowsFromSameOwner",
"errorWorkflow": null,
"timezone": "UTC",
"executionTimeout": 3600,
"maxExecutions": 1000,
"retryOnFail": true,
"retryCount": 3,
"retryDelay": 1000
},
"description": "Automated workflow: Stickynote Workflow. This workflow integrates 9 different services: webhook, stickyNote, httpRequest, code, splitOut. It contains 21 nodes and follows best practices for error handling and security.",
"tags": [
"automation",
"n8n",
"production-ready",
"excellent",
"optimized"
],
"notes": "Excellent quality workflow: Stickynote Workflow. This workflow has been optimized for production use with comprehensive error handling, security, and documentation."
}