T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/audit.py:128- Finding
Overly Broad Access to Sensitive OpenClaw Files
- Content
View full analysis
= 500: break files_scanned += 1 try: content = fp.read_text(errors="replace")[:16384] except OSError: continue for pattern, label in secret_patterns: if re.search(pattern, content): rel = str(fp.relative_to(oc_dir)) workspace_secrets.append((rel, label)) break # one finding per file ``` The scanner also recursively enumerates `.env` files across the entire OpenClaw state directory: ```python env_files = list(oc_dir.rglob(".env")) if env_files: gitignore = oc_dir / ".gitignore" protected = False if gitignore.is_file(): try: protected = ".env" in gitignore.read_text() except OSError: pass ``` The full-audit instructions further direct the agent to inspect sensitive configuration, cron prompts, credentials, and workspace knowledge: ```text Read ~/.openclaw/opencla ...[truncated 3336 chars]- Remediation
View remediation
