T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/mission_control.py:147- Finding
Undisclosed Access to WorkBuddy Memory Outside the Declared Project Boundary
- Content
View full analysis
Path | None: """Find the .workbuddy/memory directory for daily logs.""" candidates = [] if project_root: candidates.append(Path(project_root) / ".workbuddy" / "memory") candidates.extend([ Path.cwd() / ".workbuddy" / "memory", Path.home() / "Agent" / "WorkBuddy" / "Claw" / ".workbuddy" / "memory", ]) for c in candidates: if c.is_dir(): return c return None ``` ```python def _compute_leverage_ratio( memory_dir: Path | None = None, lookback_days: int = LEVERAGE_LOOKBACK_DAYS, ) -> dict[str, Any]: result = { "strategic": 0, "tactical": 0, "maintenance": 0, "total": 0, "ratio": 0.0, "status": "no_data", "emoji": "⚪", } if memory_dir is None: memory_dir = _find_memory_dir() if memory_dir is None or not memory_dir.is_dir(): return result today = datetime.now(timezone.utc).replace(tzinfo=None) for offset in range(lookback_days): day = today - timedelta(days=offset) log_file = memory_dir / f"{day.strftime('%Y-%m-%d')}.md" if not log_file.exists(): continue try: content = log_file.read_text(encoding="utf-8") except Exception: continue for line in content.splitlines(): match = LEVERAGE_PATTERN.search(line) if match: emoji = match.group() if emoji == LEVERAGE_STRATEGIC: result["strategic"] += 1 elif emoji == LEVERAGE_TACTICAL: result["tactical"] += 1 elif emoji == LEVERAGE_MAINTENANCE: resu ...[truncated 2272 chars]- Remediation
View remediation
