T09 · Insecure Skill Coding Practices
- Location
business_mind_tree.py:99- Finding
Unredacted Sensitive Business Data Is Transmitted to an External AI Provider
- Content
View full analysis
tuple: """Primary council backend. Uses OPENROUTER_API_KEY.""" try: from openai import OpenAI except ImportError: raise RuntimeError( "openai package not installed. " "Run: pip install openai --break-system-packages" ) api_key = os.environ.get("OPENROUTER_API_KEY") if not api_key: raise RuntimeError("OPENROUTER_API_KEY not set in environment") or_model = _to_or_model(model) client = OpenAI(api_key=api_key, base_url="https://openrouter.ai/api/v1") resp = client.chat.completions.create( model=or_model, max_tokens=max_tokens, messages=[ {"role": "system", "content": system}, {"role": "user", "content": user}, ], extra_headers={ "HTTP-Referer": os.environ.get("OPENROUTER_APP_URL", "https://github.com/openclaw"), "X-Title": os.environ.get("OPENROUTER_APP_NAME", "Multi-Council Decision Engine"), }, ) ``` The transmitted user value is assembled without filtering: ```python def _run_council(name: str, prompt: str, context: str = "") -> dict: """Generic council runner. Returns structured analysis dict.""" if name not in COUNCILS: return {"council": name, "ok": False, "error": f"unknown council: {name}"} cfg = COUNCILS[name] user = prompt.strip() if context.strip(): user += f"\n\nAdditional context:\n{context.strip()}" ``` ### Technical Analysis The Skill sends the complete caller-supplied prompt and optional context to OpenRouter over its chat-completions API. Gate functions can place venture pro ...[truncated 2726 chars]- Remediation
View remediation
