{
  "skill_name": "n8n-api",
  "skill_path": "./skills/clawhub-n8n-api",
  "skill_directory": "./skills/clawhub-n8n-api",
  "is_safe": false,
  "max_severity": "HIGH",
  "findings_count": 2,
  "findings": [
    {
      "id": "llm_finding_n8n-api_0",
      "rule_id": "LLM_DATA_EXFILTRATION",
      "category": "data_exfiltration",
      "severity": "HIGH",
      "title": "Hardcoded API credentials in environment variables without secure storage guidance",
      "description": "The skill instructs users to store sensitive n8n API keys in environment variables or a plaintext configuration file (.n8n-api-config) without any guidance on secure credential management. API keys provide full access to n8n workflows, executions, and potentially sensitive automation data. Storing these in plaintext environment variables or unencrypted files exposes them to credential theft through process enumeration, file system access, or accidental commits to version control.",
      "file_path": "SKILL.md",
      "line_number": null,
      "snippet": "```bash\nexport N8N_API_BASE_URL=\"https://your-instance.app.n8n.cloud/api/v1\"\nexport N8N_API_KEY=\"your-api-key-here\"\n```\nRecommended storage in `.n8n-api-config` file without encryption guidance.",
      "remediation": "1. Recommend using secure credential storage mechanisms (OS keychain, encrypted credential managers)\n2. Add warnings about not committing .n8n-api-config to version control\n3. Suggest using temporary session-based credentials where possible\n4. Provide guidance on file permissions (chmod 600) for credential files\n5. Consider integrating with secure secret management tools",
      "analyzer": "llm",
      "metadata": {
        "model": "claude-sonnet-4-5-20250929",
        "overall_assessment": "The n8n-api skill provides legitimate functionality for interacting with n8n's REST API but has several security concerns primarily related to credential management and input validation. The most significant issue is the recommendation to store API keys in plaintext environment variables or unencrypted files without secure storage guidance (HIGH severity). The skill also lacks input validation guidance for webhook paths, creating potential command injection risks (MEDIUM severity), and provides unrestricted API access without least-privilege recommendations (MEDIUM severity). Minor issues include missing metadata fields and lack of rate limiting guidance (LOW severity). The skill does not contain malicious code or intentional backdoors, but the credential handling practices could lead to API key exposure. Overall, this skill requires security hardening around credential management and input validation before production use.",
        "primary_threats": [
          "Data Exfiltration/Exposure (credential theft risk)",
          "Command Injection (webhook path construction)",
          "Unrestricted API Access"
        ],
        "aitech": "AITech-8.2",
        "aitech_name": "Data Exfiltration / Exposure",
        "aisubtech": "AISubtech-8.2.3",
        "aisubtech_name": "Data Exfiltration via Agent Tooling",
        "scanner_category": "SECURITY VIOLATION",
        "meta_validated": true,
        "meta_confidence": "HIGH",
        "meta_confidence_reason": "This is a legitimate security concern - the skill provides no guidance on secure credential handling. However, severity is MEDIUM not HIGH because: (1) this is documentation/guidance, not actual hardcoded credentials in code, (2) environment variables are a standard practice for API keys, (3) the skill is for legitimate n8n API access, not credential theft.",
        "meta_exploitability": "Low - Requires user to follow insecure practices and expose their own credentials",
        "meta_impact": "Medium - If credentials are exposed, attacker gains full n8n API access to workflows and data"
      }
    },
    {
      "id": "llm_finding_n8n-api_2",
      "rule_id": "LLM_COMMAND_INJECTION",
      "category": "command_injection",
      "severity": "MEDIUM",
      "title": "Command injection risk in webhook path construction",
      "description": "The webhook trigger examples construct URLs using path parameters without validation or sanitization guidance. If the {webhook-path} variable is derived from user input or untrusted sources, it could lead to command injection when used in curl commands via shell interpolation. The skill shows direct variable substitution in bash commands without input validation.",
      "file_path": "SKILL.md",
      "line_number": null,
      "snippet": "```bash\ncurl -s -X POST \"$N8N_API_BASE_URL/../webhook/{webhook-path}\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"key\":\"value\"}'\n```\nNo validation of {webhook-path} parameter before shell execution.",
      "remediation": "1. Add input validation examples for webhook paths (alphanumeric, hyphens only)\n2. Recommend using curl's --data-urlencode for user-provided values\n3. Show proper shell quoting techniques to prevent injection\n4. Warn against using unsanitized user input in URL construction\n5. Provide safe parameter substitution examples",
      "analyzer": "llm",
      "metadata": {
        "model": "claude-sonnet-4-5-20250929",
        "overall_assessment": "The n8n-api skill provides legitimate functionality for interacting with n8n's REST API but has several security concerns primarily related to credential management and input validation. The most significant issue is the recommendation to store API keys in plaintext environment variables or unencrypted files without secure storage guidance (HIGH severity). The skill also lacks input validation guidance for webhook paths, creating potential command injection risks (MEDIUM severity), and provides unrestricted API access without least-privilege recommendations (MEDIUM severity). Minor issues include missing metadata fields and lack of rate limiting guidance (LOW severity). The skill does not contain malicious code or intentional backdoors, but the credential handling practices could lead to API key exposure. Overall, this skill requires security hardening around credential management and input validation before production use.",
        "primary_threats": [
          "Data Exfiltration/Exposure (credential theft risk)",
          "Command Injection (webhook path construction)",
          "Unrestricted API Access"
        ],
        "aitech": "AITech-9.1",
        "aitech_name": "Model or Agentic System Manipulation",
        "aisubtech": "AISubtech-9.1.4",
        "aisubtech_name": "Injection Attacks (SQL, Command Execution, XSS)",
        "scanner_category": "INJECTION ATTACK",
        "meta_validated": true,
        "meta_confidence": "MEDIUM",
        "meta_confidence_reason": "This is a valid concern for AI agents executing shell commands, but the actual risk depends on how the agent constructs these commands. The examples use placeholders `{webhook-path}` which are meant to be replaced, not executed as-is. However, guidance on safe parameter handling would improve security.",
        "meta_exploitability": "Medium - Requires AI agent to construct commands with unsanitized user input",
        "meta_impact": "High - Command injection could allow arbitrary command execution"
      }
    }
  ],
  "scan_duration_seconds": 38.52156949043274,
  "duration_ms": 38521,
  "analyzers_used": [
    "static_analyzer",
    "behavioral_analyzer",
    "llm_analyzer",
    "trigger_analyzer",
    "meta_analyzer"
  ],
  "timestamp": "2026-02-01T18:42:38.505534"
}