T05 · Unauthorized Access and Privilege Escalation
- Location
ingest_docs.py:89- Finding
Unrestricted ingestion and persistent storage of sensitive workspace and session data
- Content
View full analysis
4000: text_chunks = chunk_text(content) else: text_chunks = [content] for i, chunk in enumerate(text_chunks): metadata = { "type": "workspace", "source": str(relative_path), "file_path": str(file_path), "file_size": len(content), "chunk_index": i, "total_chunks": len(text_chunks), "file_extension": file_path.suffix.lower(), "ingested_at": datetime.now().isoformat() } doc_id = rag.add_document(chunk, metadata) ``` ```python # ingest_sessions.py elif item_type == 'toolCall': tool_name = item.get('name', 'unknown') args = str(item.get('arguments', ''))[:100] texts.append(f"[Tool: {tool_name}({args})]") elif item_type == 'toolResult': result = str(item.get('text', item.get('result', ''))).strip() if len(result) > 500: result = result[:500] + "..." texts.append(f"[Tool Result: {result}]") ``` ```pyt ...[truncated 2099 chars]- Remediation
View remediation
