T09 · Insecure Skill Coding Practices
- Location
scripts/enricher.py:78- Finding
Standalone LLM Enrichment Bypasses Document-Disclosure Consent Controls
- Content
View full analysis
6000: text = text[:6000] + "\n\n[... truncated for analysis ...]" payload = json.dumps({ "model": model, "messages": [ {"role": "system", "content": SYSTEM_PROMPT}, {"role": "user", "content": USER_PROMPT_TEMPLATE.format(text=text)}, ], "temperature": 0.2, "max_tokens": 800, }).encode("utf-8") req = urllib.request.Request( api_url, data=payload, headers={ "Content-Type": "application/json", "Authorization": f"Bearer {api_key}", }, method="POST", ) resp = urllib.request.urlopen(req, timeout=60) ``` ```python def enrich(chunks_path, output_path): """Main enrichment logic with resume support.""" api_key, api_url, model = get_api_config() if not api_key: print("ERROR: DOC_READER_API_KEY not set. Cannot run enrichment.") print("Set the environment variable or use archive-only mode.") sys.exit(1) ``` ### Technical Analysis The declared security model requires all of the following before document chunks are externally transmitted: 1. An API key. 2. An explicitly configured API endpoint. 3. An explicitly conf ...[truncated 2087 chars]- Remediation
View remediation
