Communityn8ngithub.com

n8n-webhook-security

Secure n8n Webhook, Form Trigger and Chat Trigger endpoints - pick the right authentication (Header Auth, Basic, JWT, IP allowlist), verify provider HMAC signatures (GitHub, Stripe, Shopify, Slack, generic) in a Code node over the raw body with timingSafeEqual and replay windows, respond safely, and rate-limit /webhook/ at the reverse proxy. Includes an audit script for exported workflows (unauthenticated webhooks, signature checks without Raw Body, non-constant-time compares, secrets typed into nodes, public chat bots) and a signer to send correctly signed test requests. Use when the user exposes an n8n webhook to the internet, integrates Stripe/GitHub/Shopify/Slack webhooks, asks how to protect or authenticate a webhook, sees fake or replayed requests, or publishes a chat/form trigger.

n8n-webhook-security 是什么?

n8n-webhook-security is a Claude Code agent skill that secure n8n Webhook, Form Trigger and Chat Trigger endpoints - pick the right authentication (Header Auth, Basic, JWT, IP allowlist), verify provider HMAC signatures (GitHub, Stripe, Shopify, Slack, generic) in a Code node over the raw body with timingSafeEqual and replay windows, respond safely, and rate-limit /webhook/ at the reverse proxy. Includes an audit script for exported workflows (unauthenticated webhooks, signature checks without Raw Body, non-constant-time compares, secrets typed into nodes, public chat bots) and a signer to send correctly signed test requests. Use when the user exposes an n8n webhook to the internet, integrates Stripe/GitHub/Shopify/Slack webhooks, asks how to protect or authenticate a webhook, sees fake or replayed requests, or publishes a chat/form trigger.

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/saizul/n8n-automation-skills/tree/HEAD/skills/n8n-webhook-security

Installed? Explore more n8n skills: n8n-self-hosting, n8n-ai-agent-workflows, audit-securite-app-ia · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

n8n webhook security

A production webhook URL is public. Treat every request as hostile until the workflow has proved who sent it. Never put the secret in the workflow JSON or the chat.

Paths below are relative to this skill's folder (in Claude Code: ${CLAUDE_SKILL_DIR}).

When to use

  • A workflow starts with a Webhook, Form Trigger or Chat Trigger that is reachable from the internet
  • Receiving Stripe, GitHub, Shopify, Slack, Twilio, Calendly... webhooks
  • "How do I secure my n8n webhook?", "someone is calling my webhook", "signature does not match"
  • Before publishing a chat bot or form

When not to use

  • n8n editor login, SSO, 2FA, TLS certificates: n8n-self-hosting (and your proxy docs)
  • General workflow review: n8n-workflow-lint
  • Calling other APIs securely from n8n: use credentials (lint flags hard-coded tokens)

Workflow

  1. Inventory the endpoints (read-only):

    python3 scripts/webhook_audit.py workflows/
    python3 scripts/webhook_audit.py wf.json --json --fail-on high
    

    It lists every Webhook/Form/Chat trigger with method, path and auth, then findings.

  2. Choose the protection per caller:

    CallerUse
    Provider that signs requests (Stripe, GitHub, Shopify, Slack)Authentication None + Raw Body on + HMAC check in a Code node right after the webhook
    Your own app / script / another n8nHeader Auth credential (e.g. X-Api-Key, 32+ random bytes) or JWT Auth
    Provider that can only do Basic auth or a static headerBasic Auth / Header Auth + IP(s) Allowlist with the provider's published ranges
    Browser formsForm Trigger; bot protection and rate limits; no secrets in the page
    Chat botsChat Trigger with authentication, or embed behind your own logged-in app

    The webhook path is not a secret (it appears in logs, browser history, provider dashboards). A random path helps only against scanners.

  3. Implement signature verification with the snippet for the provider from references/hmac-verification.md:

    • Webhook node > Options > Raw Body on (signatures are over the exact bytes; JSON.stringify($json.body) is not the same bytes).
    • Code node directly after the webhook: compute HMAC over the raw body, compare with crypto.timingSafeEqual, check the timestamp window (5 minutes), throw on failure.
    • The Code node needs NODE_FUNCTION_ALLOW_BUILTIN=crypto on the instance (on the task runner when runners are external). Ask the user to set it; do not change server env yourself.
    • Load the signing secret from a credential-backed source (for example a sub-workflow or a config table), not a literal in the code.
  4. Respond safely. Use "Respond: Using 'Respond to Webhook' node" or "Immediately"; return 202 with no internal data. On a failed check, the thrown error makes n8n answer 500; if the provider retries on 5xx, prefer an IF + Respond to Webhook 401.

  5. Rate-limit at the proxy. n8n has no per-IP rate limit for webhooks. Add the nginx or Caddy rules from references/rate-limiting.md, and keep the editor (/, /rest/) behind VPN/SSO/IP allowlist if possible while /webhook/ stays public.

  6. Test with signed requests (the user supplies the secret through an env var; it is never printed):

    export WEBHOOK_SECRET='...'     # the user types this, not the agent
    python3 scripts/sign_webhook.py --scheme stripe --body payload.json \
        --curl https://n8n.example.com/webhook-test/stripe
    python3 scripts/sign_webhook.py --scheme github --body payload.json --verify 'sha256=...'
    

    Test a valid request, a tampered body (must fail), and an old timestamp (must fail). Use the /webhook-test/ URL while the workflow is open in the editor, /webhook/ once published.

  7. Re-run the audit and confirm no high/medium findings remain.

Output

Endpoints (3)
  POST /webhook/stripe   auth=none  -> HMAC check present, Raw Body OFF   (MEDIUM)
  POST /webhook/orders   auth=none  -> no verification                    (HIGH)
  chat  public           auth=none  -> anyone can run the agent           (MEDIUM)

Fixes
1. orders: add Header Auth credential "ERP webhook key"; ERP sends X-Api-Key
2. stripe: Raw Body on; replace Check signature with the Stripe snippet (timingSafeEqual,
   5 min tolerance); move the whsec_ secret out of the code and rotate it in Stripe
3. chat: enable Basic Auth or embed in the logged-in portal; nginx limit_req 10r/m per IP
Tests: valid signature 200, tampered body 401, replayed (10 min old) 401

Individual skills in this repo

This repo contains 2 individual skills — each has its own dedicated page.

n8n-ai-agent-workflows

Build and review n8n AI Agent workflows - when to use an agent vs a Basic LLM Chain or plain nodes, system prompts, tool design (Call n8n Workflow Tool, HTTP Request Tool, app tools) with clear names, descriptions and input schemas, memory (Simple/Window, Postgres, Redis) and per-user session keys, structured output parsers, human approval for tools with side effects, guardrails, and cost control (model choice, max tokens, maxIterations, memory window, public chat limits). Includes an audit script that maps each agent's model, memory and tools in an exported workflow and flags missing system messages, runaway iteration limits, tools without descriptions, shared memory sessions, missing output parsers, destructive tools and unbounded token use. Use when the user builds a chatbot, AI agent, RAG or LLM automation in n8n, asks why the agent picks the wrong tool, loops, forgets context, mixes up users, or costs too much.

n8n-self-hosting

Run self-hosted n8n in production with Docker Compose - PostgreSQL, Redis and queue mode (main + workers, optional webhook processors), reverse proxy and WEBHOOK_URL, encryption key handling, execution pruning, task runners, backups (pg_dump, workflow/credential export, the key) with a restore drill, and safe version upgrades including the n8n 2.0 breaking changes. Ships a ready docker-compose.yml and .env.example, plus a checker for .env / `docker compose config` output that flags missing or mismatched N8N_ENCRYPTION_KEY, SQLite or removed MySQL, queue mode without Redis or workers, unpinned images, missing data volume, public ports, removed variables and risky Code-node settings without printing any values. Use when installing, moving, scaling, backing up, upgrading or debugging a self-hosted n8n (Docker, VPS, queue mode, workers).

相关技能

n8n-self-hosting

Run self-hosted n8n in production with Docker Compose - PostgreSQL, Redis and queue mode (main + workers, optional webhook processors), reverse proxy and WEBHOOK_URL, encryption key handling, execution pruning, task runners, backups (pg_dump, workflow/credential export, the key) with a restore drill, and safe version upgrades including the n8n 2.0 breaking changes. Ships a ready docker-compose.yml and .env.example, plus a checker for .env / `docker compose config` output that flags missing or mismatched N8N_ENCRYPTION_KEY, SQLite or removed MySQL, queue mode without Redis or workers, unpinned images, missing data volume, public ports, removed variables and risky Code-node settings without printing any values. Use when installing, moving, scaling, backing up, upgrading or debugging a self-hosted n8n (Docker, VPS, queue mode, workers).

community

n8n-ai-agent-workflows

Build and review n8n AI Agent workflows - when to use an agent vs a Basic LLM Chain or plain nodes, system prompts, tool design (Call n8n Workflow Tool, HTTP Request Tool, app tools) with clear names, descriptions and input schemas, memory (Simple/Window, Postgres, Redis) and per-user session keys, structured output parsers, human approval for tools with side effects, guardrails, and cost control (model choice, max tokens, maxIterations, memory window, public chat limits). Includes an audit script that maps each agent's model, memory and tools in an exported workflow and flags missing system messages, runaway iteration limits, tools without descriptions, shared memory sessions, missing output parsers, destructive tools and unbounded token use. Use when the user builds a chatbot, AI agent, RAG or LLM automation in n8n, asks why the agent picks the wrong tool, loops, forgets context, mixes up users, or costs too much.

community

audit-securite-app-ia

Read-only security audit for AI-generated apps (Next.js/React on Vercel, Supabase, React Native/Expo, n8n workflows, LLM calls). Finds exposed secrets (NEXT_PUBLIC_/EXPO_PUBLIC_ keys, Supabase service_role, committed env files), weak Supabase RLS and public storage buckets (checked live via the Supabase MCP or supabase/psql CLI when available), prompt injection into LLM instructions, and 14 server-trusts-client attacks (XSS, IDOR, price tampering, fake payments, race conditions, mass assignment, SQL injection, unsafe uploads). Every finding gives file:line, a concrete exploit and a one-commit fix; secrets are never printed. Works in Claude Code, Codex and OpenCode. Use for 'audit my app', 'is my app secure', 'audite mon app', 'est-ce que mon app est sécure'.

community

tool-finder

이미 만들어진 AI 도구를 찾을 때 쓰는 통합 검색. "MCP 찾아줘", "에이전트 찾아줘", "플러그인 찾아줘", "skill 있어?", "n8n 템플릿 찾아줘", "OO 하는 거 누가 만들어 둔 거 없나", "OO 자동화할 도구 있어?"처럼 MCP 서버, Claude skill, Claude Code 플러그인, n8n 워크플로, GitHub 봇·에이전트, 완성형 AI 앱을 찾거나 비교하려 하면 반드시 사용한다. 요구를 기능 단위로 쪼개 여러 디렉터리를 한 번에 검색하고, 실제로 있고 지금 쓸 만한지 확인한 뒤, 유형을 넘나들어 기능을 모두 덮는 조합과 근거를 보여준다. 직접 만들기 전에 기존 것이 있는지 확인할 때도 쓴다. 이미 고른 도구의 설치·디버깅, 일반 웹 정보 검색에는 쓰지 않는다.

community

maintain-n8n-workflows

Maintain portable, sanitized, version-compatible n8n workflow templates and their Bootstrap/Maintenance lifecycle. Use when editing or reviewing n8n workflow JSON, moving workflows between instances or n8n versions, grouping agents and subworkflows as one documented project, or preventing scheduled updates from overwriting human documentation.

community

n8n-workflows

Find, adapt, and assemble n8n automation workflows from a local library of 2,061 real workflow templates covering 365+ integrations. Use when the user wants to automate something with n8n, asks for an n8n workflow, template, or example, mentions connecting two services with n8n, wants to see how an n8n node is wired up, or needs a starting point for an automation involving webhooks, schedules, or app triggers. Also use when the user asks what n8n can integrate with. Do NOT use for non-n8n automation (Zapier, Make, Airflow) unless the user wants an n8n equivalent.

community