T09 · Insecure Skill Coding Practices
- Location
technical/deepseek-integration.md:68- Finding
Undeclared External Transmission of Customer and Commercial Data
- Content
View full analysis
str: """Synchronous API call""" import httpx payload = { "model": self.config.model, "messages": messages, "max_tokens": kwargs.get("max_tokens", self.config.max_tokens), "temperature": kwargs.get("temperature", self.config.temperature), **kwargs } async with httpx.AsyncClient(timeout=self.config.timeout) as client: response = await self._request_with_retry( client, "POST", f"{self.config.base_url}/chat/completions", json=payload ) ``` The streaming implementation sends the same message structure: ```python payload = { "model": self.config.model, "messages": messages, "max_tokens": kwargs.get("max_tokens", self.config.max_tokens), "temperature": kwargs.get("temperature", self.config.temperature), "stream": True, **kwargs } async with httpx.AsyncClient(timeout=self.config.timeout) as client: async with client.stream( "POST", f"{self.config.base_url}/chat/completions", json=payload ) as response: ``` The quotation prompt places customer and transaction information into those messages: ```python QUOTE_GENERATION_USER_TEMPLATE = """ ## Customer Information Customer Name: {customer_name} Country/Region: {country} Procur ...[truncated 3630 chars]- Remediation
View remediation
