{
  "skill_name": "search-reddit",
  "skill_path": "/workspace/skills/clawhub-search-reddit",
  "skill_directory": "/workspace/skills/clawhub-search-reddit",
  "is_safe": true,
  "max_severity": "MEDIUM",
  "findings_count": 2,
  "findings": [
    {
      "id": "llm_finding_search-reddit_0",
      "rule_id": "LLM_DATA_EXFILTRATION",
      "category": "data_exfiltration",
      "severity": "MEDIUM",
      "title": "Hardcoded API Key Exposure Risk in Documentation",
      "description": "The skill documentation instructs users to set OpenAI API keys via command-line configuration and environment variables. While this is standard practice, the examples show plaintext API key handling without warnings about secure storage, rotation, or access control. The skill also references a shared key configuration pattern that could lead to key reuse across multiple skills, increasing blast radius if compromised.",
      "file_path": "SKILL.md",
      "line_number": null,
      "snippet": "```bash\nclawdbot config set skills.entries.search-reddit.apiKey \"sk-YOUR-KEY\"\nexport OPENAI_API_KEY=\"sk-YOUR-KEY\"\nclawdbot config set skills.entries.openai.apiKey \"sk-YOUR-KEY\"\n```",
      "remediation": "Add security warnings in documentation: (1) Never commit API keys to version control, (2) Use secure credential storage mechanisms, (3) Implement key rotation policies, (4) Warn about shared key risks across skills, (5) Consider using credential management tools instead of environment variables.",
      "analyzer": "llm",
      "metadata": {
        "model": "claude-sonnet-4-5-20250929",
        "overall_assessment": "MODERATE RISK - This Reddit search skill has several security concerns primarily related to data handling and external API integration. The skill sends user queries to OpenAI's external API, creating a data exfiltration pathway that may not be obvious to users. API key management relies on environment variables and configuration commands without strong security guidance. The missing script files (search.js, the.py) prevent verification of actual execution behavior, creating uncertainty about tool usage and potential for tool shadowing. However, no critical threats like command injection, credential theft, or prompt injection were detected in the provided documentation. The skill appears to be a legitimate Reddit search integration, but requires better security documentation, complete file distribution, and user disclosure about external data transmission.",
        "primary_threats": [
          "Data Exfiltration via External API",
          "API Key Exposure Risk",
          "Missing Script Files (Tool Uncertainty)",
          "Incomplete Security Documentation"
        ],
        "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": "MEDIUM",
        "meta_confidence_reason": "This is a documentation quality issue, not a vulnerability. The code itself handles keys appropriately (reads from env/config, doesn't log them). Adding security guidance is a best practice.",
        "meta_exploitability": "N/A - Documentation improvement, not a security flaw",
        "meta_impact": "Low - Better documentation helps users avoid mistakes, but the code itself is not vulnerable"
      }
    },
    {
      "id": "llm_finding_search-reddit_1",
      "rule_id": "LLM_DATA_EXFILTRATION",
      "category": "data_exfiltration",
      "severity": "MEDIUM",
      "title": "External API Data Exfiltration via OpenAI Responses API",
      "description": "The skill sends user search queries and Reddit content to OpenAI's external API endpoint (/v1/responses) with web_search tool enabled. This creates a data flow where user queries, Reddit thread content, and potentially sensitive discussion topics are transmitted to a third-party service. While OpenAI is a legitimate service, this represents data exfiltration from the local environment to an external endpoint, and users may not be aware their search queries are being sent externally.",
      "file_path": "SKILL.md",
      "line_number": null,
      "snippet": "Uses OpenAI Responses API (`/v1/responses`) with the `web_search` tool:\n- Allowed domain: `reddit.com`\n- Enriches each thread by fetching Reddit JSON (`/r/.../comments/.../.json`)",
      "remediation": "(1) Add prominent disclosure in skill description that queries are sent to OpenAI's API, (2) Implement user consent mechanism before first API call, (3) Document OpenAI's data retention policies, (4) Consider adding option to use local/self-hosted alternatives, (5) Implement query sanitization to prevent accidental transmission of sensitive data.",
      "analyzer": "llm",
      "metadata": {
        "model": "claude-sonnet-4-5-20250929",
        "overall_assessment": "MODERATE RISK - This Reddit search skill has several security concerns primarily related to data handling and external API integration. The skill sends user queries to OpenAI's external API, creating a data exfiltration pathway that may not be obvious to users. API key management relies on environment variables and configuration commands without strong security guidance. The missing script files (search.js, the.py) prevent verification of actual execution behavior, creating uncertainty about tool usage and potential for tool shadowing. However, no critical threats like command injection, credential theft, or prompt injection were detected in the provided documentation. The skill appears to be a legitimate Reddit search integration, but requires better security documentation, complete file distribution, and user disclosure about external data transmission.",
        "primary_threats": [
          "Data Exfiltration via External API",
          "API Key Exposure Risk",
          "Missing Script Files (Tool Uncertainty)",
          "Incomplete Security Documentation"
        ],
        "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": "Code clearly shows HTTPS requests to api.openai.com with user queries in payload. This is documented behavior but lacks user disclosure about external transmission.",
        "meta_exploitability": "N/A - This is a transparency issue, not an exploitable vulnerability",
        "meta_impact": "Low - User queries are sent to legitimate service (OpenAI), but users should be informed"
      }
    }
  ],
  "scan_duration_seconds": 34.938164472579956,
  "duration_ms": 34938,
  "analyzers_used": [
    "static_analyzer",
    "llm_analyzer",
    "meta_analyzer"
  ],
  "timestamp": "2026-02-07T20:01:54.994948"
}