Token导航 LogoToken导航TokenDH.com
效率敏感数据clawhub未标认证来源可访问clear审计通过

n8n-automation-securen8n 自动化安全

Agent Skill

n8n-automation-secure 用于辅助安全审计、权限检查和凭据风险排查,适合在 OpenClaw 中需要复核安全边界、认证流程或敏感配置时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

4,680

周安装

195

GitHub Stars

公开资料未说明

下载量

1,560
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:n8n-automation-secure(n8n 自动化安全)
来源仓库:https://github.com/nelmaz/n8n-automation-secure
安装命令:
openclaw skills install n8n-automation-secure
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install n8n-automation-secure

简介

用于编码任务的安全 n8n 工作流程自动化集成。该技能通过凭证隔离、输入验证、审计来实现企业级安全性。

SKILL.md

name
n8n-automation-secure
description
Secure n8n workflow automation integration for coding tasks. This skill implements enterprise-grade security with credential isolation, input validation, audit logging, rate limiting, and granular permissions. Use when building automated workflows, integrating n8n into development pipelines, executing existing workflows, modifying workflow configurations, or creating new automation solutions. Triggers on phrases like "create n8n workflow", "run n8n workflow", "integrate n8n", "automate with n8n", "modify n8n workflow", "execute workflow".
version
1.0.0
metadata
author
nelson-mazonzika
homepage
https://clawhub.ai/nelson-mazonzika/n8n-automation-secure
license
MIT
openclaw
emoji
🔒
requires
bins
[]
env
security
level
enterprise
features

N8N Automation Secure

🔒 Security First

This skill implements enterprise-grade security protections:

  • Credential Isolation - API keys never stored in config files
  • Input Validation - All endpoints and data sanitized
  • Audit Logging - Complete action trail with timestamps
  • Rate Limiting - Prevents abuse and DoS
  • Granular Permissions - Read-only mode by default
  • Sandbox Support - Isolated execution environment
  • HTTPS Only - Enforces encrypted connections
  • Confirmation Required - Dangerous operations need explicit approval

⚠️ Before Using

CRITICAL SECURITY REQUIREMENTS:

  1. Environment Variables MUST be Set:
# NEVER store these in openclaw.json or any config file
export N8N_URL="https://your-n8n-instance.com"
export N8N_API_KEY="your-api-key"
  1. First-Time Setup Required:
cd skills/n8n-automation-secure
./scripts/validate-setup.sh
  1. HTTPS Only:
  • Only HTTPS URLs are accepted
  • Self-signed certificates will be rejected
  • URL validation is enforced on every request

Quick Start

1. Configure Environment Variables

# Add to ~/.bashrc or /etc/environment
export N8N_URL=""
export N8N_API_KEY=""

# Reload shell
source ~/.bashrc

2. Validate Setup

cd /data/.openclaw/workspace/skills/n8n-automation-secure
./scripts/validate-setup.sh

This will:

  • Verify environment variables are set
  • Validate N8N_URL format and HTTPS
  • Test API connectivity
  • Create audit log directory
  • Report any security issues

3. List Workflows (Read-Only)

curl -X GET "$N8N_URL/api/v1/workflows" \
  -H "X-N8N-API-KEY: $N8N_API_KEY" \
  -H "Content-Type: application/json"

Security Architecture

Credential Management

❌ NEVER do this:

{
  "env": {
    "N8N_URL": "https://n8n.example.com",  // ❌ INSECURE
    "N8N_API_KEY": "secret-key-here"         // ❌ CRITICAL SECURITY ISSUE
  }
}

✅ CORRECT approach:

# Set at system level, never in files
export N8N_URL="https://your-n8n.com"
export N8N_API_KEY="your-key"

Permissions System

The skill operates in three permission modes:

ModeReadExecuteCreateUpdateDeleteRisk Level
readonly🟢 LOW
restricted✅*✅*🟡 MEDIUM
full✅*🔴 HIGH
  • Requires explicit confirmation for each operation

Default mode: readonly

To change mode:

export N8N_PERMISSION_MODE="full"  # DANGEROUS - only for trusted environments

Audit Logging

All actions are logged to:

/data/.openclaw/logs/n8n-audit.log

Log format:

{
  "timestamp": "2024-01-15T10:30:45.123Z",
  "user": "nelson",
  "action": "WORKFLOW_EXECUTE",
  "workflowId": "abc123",
  "workflowName": "CI Build",
  "status": "success",
  "ip": "127.0.0.1",
  "userAgent": "curl/7.68.0",
  "durationMs": 234
}

Review audit logs:

tail -f /data/.openclaw/logs/n8n-audit.log

Rate Limiting

Default limits (configurable):

OperationLimitWindow
API requests10per minute
Workflow executions5per minute
Bulk operations1per 5 minutes

Customize limits:

export N8N_RATE_LIMIT="15/minute"
export N8N_EXECUTION_LIMIT="10/minute"

Available Actions

🟢 Read-Only Operations (Safe)

1. List Workflows

curl -X GET "$N8N_URL/api/v1/workflows" \
  -H "X-N8N-API-KEY: $N8N_API_KEY" \
  -H "Content-Type: application/json"

2. Get Workflow Details

curl -X GET "$N8N_URL/api/v1/workflows/{id}" \
  -H "X-N8N-API-KEY: $N8N_API_KEY" \
  -H "Content-Type: application/json"

3. Get Execution Status

curl -X GET "$N8N_URL/api/v1/executions/{id}" \
  -H "X-N8N-API-KEY: $N8N_API_KEY"

4. Get Executions History

curl -X GET "$N8N_URL/api/v1/workflows/{id}/executions?limit=10" \
  -H "X-N8N-API-KEY: $N8N_API_KEY"

🟡 Execute Operations (Requires Permission)

5. Execute Workflow (Manual)

Confirmation required: The skill will ask for approval before execution.

# Step 1: Review workflow
curl -X GET "$N8N_URL/api/v1/workflows/{id}" \
  -H "X-N8N-API-KEY: $N8N_API_KEY"

# Step 2: Execute (with confirmation)
curl -X POST "$N8N_URL/api/v1/workflows/{id}/executions" \
  -H "X-N8N-API-KEY: $N8N_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": {"contextData": {}, "manualExecution": true}}'

6. Execute Webhook

curl -X POST "https://your-n8n.com/webhook/{webhook-key}" \
  -H "Content-Type: application/json" \
  -d '{"data": {"input1": "value1"}}'

🔴 Dangerous Operations (Requires Explicit Confirmation)

⚠️ These operations require TWO confirmations:

  1. Display of what will be changed
  2. Typing confirmation phrase

7. Clone Workflow

# Step 1: Show what will be cloned
curl -X GET "$N8N_URL/api/v1/workflows/{source-id}" \
  -H "X-N8N-API-KEY: $N8N_API_KEY"

# Step 2: Execute with confirmation
curl -X POST "$N8N_URL/api/v1/workflows/{source-id}/clone" \
  -H "X-N8N-API-KEY: $N8N_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Cloned Workflow"}'

8. Update Workflow (PATCH)

# Step 1: Show current state
curl -X GET "$N8N_URL/api/v1/workflows/{id}" \
  -H "X-N8N-API-KEY: $N8N_API_KEY"

# Step 2: Show diff
# (Display what will change)

# Step 3: Execute with confirmation
curl -X PATCH "$N8N_URL/api/v1/workflows/{id}" \
  -H "X-N8N-API-KEY: $N8N_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"nodes": [{"parameters": {...}}]}'

9. Delete Workflow

# Step 1: Show workflow details
curl -X GET "$N8N_URL/api/v1/workflows/{id}" \
  -H "X-N8N-API-KEY: $N8N_API_KEY"

# Step 2: Type confirmation
# DELETE: Workflow Name - Type "I confirm deletion" to proceed

# Step 3: Execute
curl -X DELETE "$N8N_URL/api/v1/workflows/{id}" \
  -H "X-N8N-API-KEY: $N8N_API_KEY"

Input Validation

All inputs are validated before API calls:

URL Validation

function validateN8NUrl(url) {
  // Must be HTTPS
  if (!url.match(/^https:\/\/[a-z0-9.-]+(\.[a-z0-9.-]+)+$/i)) {
    throw new Error('Invalid N8N URL. Must be HTTPS and properly formatted.');
  }

  // No credentials in URL
  if (url.includes('@') || url.includes(':')) {
    throw new Error('URL must not contain credentials');
  }

  // No query parameters with secrets
  if (url.match(/\b(key|token|secret|password)\b/i)) {
    throw new Error('URL must not contain secret keywords');
  }

  return url;
}

Data Sanitization

function sanitizeData(data) {
  // Remove sensitive keys
  const sensitive = ['password', 'apiKey', 'secret', 'token', 'credential'];
  
  const sanitized = JSON.parse(JSON.stringify(data));
  
  function clean(obj) {
    for (const key in obj) {
      if (sensitive.some(s => key.toLowerCase().includes(s))) {
        obj[key] = '***REDACTED***';
      } else if (typeof obj[key] === 'object') {
        clean(obj[key]);
      }
    }
  }
  
  clean(sanitized);
  return sanitized;
}

Coding Use Cases

Use Case 1: CI/CD Integration (Safe)

# .github/workflows/n8n-trigger.yml
name: Trigger N8N Workflow

on:
  push:
    branches: [main]

jobs:
  trigger-n8n:
    runs-on: ubuntu-latest
    steps:
      - name: Trigger N8N workflow
        env:
          N8N_URL: ${{ secrets.N8N_URL }}
          N8N_API_KEY: ${{ secrets.N8N_API_KEY }}
        run: |
          curl -X POST "$N8N_URL/api/v1/workflows/${{ secrets.N8N_WORKFLOW_ID }}/executions" \
                -H "X-N8N-API-KEY: $N8N_API_KEY" \
                -H "Content-Type: application/json" \
                -d '{"data": {"contextData": {"commitSha": "${{ github.sha }}"}}}'

Use Case 2: Data Processing Pipeline

#!/usr/bin/env python3
import os
import requests

N8N_URL = os.environ.get('N8N_URL')
N8N_API_KEY = os.environ.get('N8N_API_KEY')

def execute_workflow(workflow_id, data):
    """Execute n8n workflow with input validation"""
    
    # Validate inputs
    if not N8N_URL or not N8N_API_KEY:
        raise ValueError('N8N_URL and N8N_API_KEY environment variables are required')
    
    if not N8N_URL.startswith('https://'):
        raise ValueError('N8N_URL must use HTTPS')
    
    # Sanitize data
    sanitized_data = sanitize(data)
    
    # Execute
    response = requests.post(
        f'{N8N_URL}/api/v1/workflows/{workflow_id}/executions',
        headers={
            'X-N8N-API-KEY': N8N_API_KEY,
            'Content-Type': 'application/json'
        },
        json={'data': {'contextData': sanitized_data}}
    )
    
    response.raise_for_status()
    return response.json()

def sanitize(data):
    """Remove sensitive data"""
    sensitive_keys = ['password', 'apiKey', 'secret', 'token']
    # ... sanitization logic
    return data

Security Best Practices

1. Environment Variables

DO:

# Set at system level
export N8N_URL="https://your-n8n.com"
export N8N_API_KEY="your-key"

# Or in script execution
N8N_URL="https://your-n8n.com" N8N_API_KEY="your-key" ./script.sh

DON'T:

# Never in config files
export N8N_URL="..."  # Saved in ~/.bashrc (risk if compromised)

2. Permission Principle

  • Use readonly mode by default
  • Only switch to restricted when necessary
  • Use full mode only in isolated environments
  • Review audit logs regularly

3. Confirmation Workflow

For dangerous operations:

  1. Show exactly what will happen
  2. Require typing confirmation phrase
  3. Log the action with full details
  4. Send notification (if configured)

4. Regular Audits

# Review recent activity
tail -100 /data/.openclaw/logs/n8n-audit.log

# Check for suspicious patterns
grep -i "delete\|remove\|dangerous" /data/.openclaw/logs/n8n-audit.log

# Monitor for errors
grep "error\|failed\|unauthorized" /data/.openclaw/logs/n8n-audit.log

Troubleshooting

Error: Environment Variables Not Set

ERROR: N8N_URL and N8N_API_KEY environment variables are required

Solution:

export N8N_URL="https://your-n8n.com"
export N8N_API_KEY="your-api-key"

Error: Invalid URL

ERROR: Invalid N8N URL. Must be HTTPS and properly formatted.

Solution:

  • Ensure URL starts with https://
  • No credentials in URL
  • No query parameters with secrets

Error: Rate Limit Exceeded

ERROR: Rate limit exceeded. Wait before retrying.

Solution:

  • Wait for the rate limit window to reset
  • Adjust rate limit configuration
  • Check audit logs for activity patterns

Error: Permission Denied

ERROR: Operation not permitted in current permission mode.

Solution:

  • Check current permission mode: echo $N8N_PERMISSION_MODE
  • Switch mode if necessary: export N8N_PERMISSION_MODE="restricted"

Security Checklist

Before using this skill in production, verify:

  • [ ] Environment variables are set at system level
  • [ ] N8N_URL uses HTTPS only
  • [ ] N8N_API_KEY is not stored in any file
  • [ ] Permission mode is set appropriately
  • [ ] Audit logging is enabled and working
  • [ ] Rate limiting is configured
  • [ ] First-time setup validation passed
  • [ ] Sandbox mode is enabled in OpenClaw (if applicable)
  • [ ] Dangerous operations require confirmation
  • [ ] Regular audit reviews are scheduled

OpenClaw Integration

Recommended Configuration

{
  "agents": {
    "n8n-automation": {
      "id": "n8n-automation",
      "name": "n8n Automation (Secure)",
      "skills": ["n8n-automation-secure"],
      "sandbox": "require",
      "tools": {
        "denylist": ["exec", "eval", "shell"]
      },
      "maxConcurrent": 1
    }
  }
}

Enable Skill

# Add skill to main agent
openclaw agent add-skill main n8n-automation-secure

# Or create dedicated agent
openclaw agent create n8n-automation \
  --skills n8n-automation-secure \
  --sandbox require \
  --max-concurrent 1

References

  • Documentation: references/security.md - Complete security guide
  • Validation Script: scripts/validate-setup.sh - Setup verification
  • Audit Logger: scripts/audit-logger.sh - Log management
  • N8N API Docs: https://docs.n8n.io/api/
  • OpenClaw Security: https://docs.openclaw.ai/security

Version History

  • 1.0.0 (2024-04-04)

- Initial secure release - Credential isolation - Input validation - Audit logging - Rate limiting - Granular permissions

License

MIT License - See LICENSE.md for details

Contributing

Security is the top priority. All contributions must:

  1. Maintain security guarantees
  2. Include audit logging
  3. Pass validation checks
  4. Update documentation
  5. Add tests for security features

Support

  • Security Issues: Report immediately via private channels
  • Issues: https://github.com/[your-repo]/issues
  • Documentation: references/ directory

⚠️ IMPORTANT: This skill prioritizes security over convenience. Read-only operations work immediately. Dangerous operations require explicit confirmation and appropriate permission levels.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

70.34%
按下载量换算1,097

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills