T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/convert.py:114- Finding
Overbroad Collection and Export of Workspace Configuration Files
- Content
View full analysis
dict[str, str]: """Check workspace files for content that was promoted from learnings.""" promoted = {} for fname in ["CLAUDE.md", "AGENTS.md", "SOUL.md", "TOOLS.md", ".github/copilot-instructions.md"]: fpath = workspace / fname if fpath.exists(): content = fpath.read_text(errors="replace") content, _ = strip_secrets(content) # Only include if it references learnings or self-improvement if any(kw in content.lower() for kw in ["learning", "self-improv", "lrn-", "err-", "feat-", ".learnings"]): promoted[fname] = content return promoted ``` The collected files are subsequently copied in full into the generated pack: ```python if promoted_content: body_parts = [] for fname, content in promoted_content.items(): body_parts.append(f"## From {fname}\n\n{content}") write_content_file( output, "mind", "promoted-rules.md", "Promoted Rules & Conventions", f"Rules and patterns promoted from learnings to {len(promoted_content)} workspace files.", "\n\n---\n\n".join(body_parts) ) ``` ### Technical Analysis The converter attempts to detect content promoted from learning files by searching several workspace-level agent configuration files for broad keywords. However, finding any one keyword causes the complete file to be copied into `mind/promoted-rules.md`. This does not isolate explicitly promoted sections or verify that the rest of the file is relevant to the conversion. Files such as `CLAUDE.md`, `AGENTS.md`, `SOUL.md`, `TOOLS.md`, and `.github/copilot-instructions.md` may ...[truncated 1937 chars]- Remediation
View remediation
