T09 · Insecure Skill Coding Practices
- Location
scripts/skill_pitch_amplifier.py:201- Finding
Undisclosed External Transmission of Confidential Reporting Clues and Local Knowledge-Graph Data
- Content
View full analysis
Optional[OpenAI]: api_key = os.environ.get("OPENAI_API_KEY") or os.environ.get("GLM_API_KEY") if not api_key: return None base_url = None if os.environ.get("GLM_API_KEY") and not os.environ.get("OPENAI_API_KEY"): base_url = "https://open.bigmodel.cn/api/coding/paas/v4" kwargs: Dict[str, Any] = {"api_key": api_key} if base_url: kwargs["base_url"] = base_url return OpenAI(**kwargs) LLM_CLIENT = _build_llm_client() ``` Entity extraction transmits the complete, unredacted user input: ```python response = LLM_CLIENT.chat.completions.create( model=DEFAULT_MODEL, messages=[{"role": "system", "content": system_prompt}, {"role": "user", "content": user_text}], temperature=0.1, timeout=40, ) ``` Pitch generation transmits the user input a second time together with locally retrieved graph context: ```python response = LLM_CLIENT.chat.completions.create( model=DEFAULT_MODEL, messages=[ {"role": "system", "content": system_prompt}, {"role": "user", "content": f"Original idea:\n{user_text}\n\nGraph context:\n{graph_context}"}, ], temperature=0.7, timeout=60, ) ``` The final snippet represents the source code's data flow in English: the actual implementation interpolates the same `user_text` and `graph_context` variables into the outbound user message. ### Technical Analysis The Skill is intended to convert an initial reporting clue into a graph-grounded editorial pitch. Reporting clues can contain unpublished allegations, sou ...[truncated 3589 chars]- Remediation
View remediation
