T09 ยท Insecure Skill Coding Practices
- Location
scripts/v4/synthesize-proposal.sh:480- Finding
Conversation excerpts are transmitted to a remote LLM under the default configuration
- Content
View full analysis
= 0.5: severity = 'high' if confidence >= 0.85 else ('medium' if confidence >= 0.7 else 'low') context_preview = clean_text[:120].replace('\n', ' ') events.append({ 'session': session['session_id'], 'agent': session.get('agent', ''), 'pattern': ptype, 'context': context_preview, 'severity': severity, 'confidence': round(effective_confidence, 2), 'directed_at_agent': is_directed_at_agent, 'timestamp': msg.get('timestamp', ''), }) ``` The excerpts are included in the LLM prompt: ```bash _ANA_SUMMARY=$(jq -r '{ sessions: .sessions_analyzed, quality: .quality_score, insights: (.key_insights // [] | .[0:5]), top_frustration: (.frustration_events // [] | .[0:3] | map({pattern, severity, context})), exec_loops: (.exec_loops // [] | .[0:3] | map({command_base, count})), violations: (.rule_violations // [] | .[0:3] | map({rule, violation, count})) }' "$ANALYSIS_FILE" 2>/dev/null || echo '{}') _LLM_PROMPT="You are reviewing a self-evolving AI agent's weekly behavior analysis. Based on the following structured data, provide 2-3 specific, actionable improvement proposals. Analysis data: ${_ANA_SUMMARY}" _LLM_RESPONSE=$(echo "$_LLM_PROMPT" | bash "$LLM_CALL_SH" \ --provider "${_SEA_LLM_PROVIDER}" \ --system "You are an expert AI behavior analyst. Generate specific, evidence-based AGENTS.md improvement proposals." \ 2>/tmp/sea-v4/llm-call.log) ``` The resulting p ...[truncated 2237 chars]- Remediation
View remediation
