T09 · Insecure Skill Coding Practices
- Location
scripts/extract_memories.py:183- Finding
Automatic Transmission of Session and Vault Content to Configurable External Services
- Content
View full analysis
str: import requests prompt = f"从以下对话中提取有价值的记忆(用户偏好、决策、重要发现)。\n输出格式:preference|knowledge|event一句话总结
详细内容\n\n内容:\n{content[:1000]}" try: resp = requests.post(f"{LLM_BASE_URL}/chat/completions", headers={"Authorization":f"Bearer {LLM_API_KEY}"}, json={"model":LLM_MODEL,"messages":[{"role":"user","content":prompt}],"temperature":0.1,"max_tokens":500},timeout=30) return resp.json()["choices"][0]["message"]["content"] if resp.status_code==200 else "" except Exception as e: print(f" LLM extract failed: {e}") return "" ``` The embedding client similarly transmits raw text: ```python def _lm_studio_embed(text: str) -> ...[truncated 3066 chars]- Remediation
View remediation
