T09 · Insecure Skill Coding Practices
- Location
main.py:82- Finding
Sensitive legal information is transmitted to an external LLM without explicit disclosure or consent
- Content
View full analysis
str: """Call LLM API with fallback""" if not DEEPSEEK_API_KEY: return generate_fallback_response(system_prompt, user_prompt) try: async with httpx.AsyncClient(timeout=60) as client: resp = await client.post( DEEPSEEK_API_URL, headers={ "Authorization": f"Bearer {DEEPSEEK_API_KEY}", "Content-Type": "application/json", }, json={ "model": "deepseek-chat", "messages": [ {"role": "system", "content": system_prompt}, {"role": "user", "content": user_prompt}, ], "temperature": 0.2, "max_tokens": 4096, }, ) resp.raise_for_status() data = resp.json() return data["choices"][0]["message"]["content"] ``` The user-controlled question is passed to this function without redaction: ```python answer = await call_llm(system_prompt, question) ``` ### Technical Analysis When `DEEPSEEK_API_KEY` is configured, the application sends the complete user submission to `https://api.deepseek.com/v1/chat/completions`. The intended use cases include contract review, labor disputes, debt collection, intellectual property, and corporate compliance. Submissions may therefore contain: - Personal identifiers and contact information - Employment and health-related information - Confidential contract provisions - Financial and debt information - Litigation strategy or privileged legal communications - Trade secrets and internal corporate records No redaction, data ...[truncated 2015 chars]- Remediation
View remediation
