T05 · Unauthorized Access and Privilege Escalation
- Location
self_governor.py:46- Finding
Unrestricted Workspace Reconnaissance Exceeds the Skill's Declared Scope
- Content
View full analysis
List[Dict]: """从项目中扫描角色模板""" if project_dir is None: project_dirs = [ os.path.expanduser("~/ai-security/research"), os.path.expanduser("~/.openclaw/workspace/skills"), os.path.expanduser("~/.openclaw/workspace"), ] else: project_dirs = [project_dir] roles = [] keywords = ["role", "agent", "skill", "capability", "职责", "能力"] for pdir in project_dirs: if not os.path.exists(pdir): continue for root, dirs, files in os.walk(pdir): dirs[:] = [d for d in dirs if not d.startswith('.')] for f in files: if f.endswith(('.md', '.yaml', '.json')): path = os.path.join(root, f) try: with open(path, 'r', encoding='utf-8', errors='ignore') as fp: content = fp.read().lower() for kw in keywords: if kw in content: roles.append({ "file": path, "name": f, "type": self._detect_type(f, content), "keywords": self._extract_keywords(content) }) break except: pass ``` ### Technical Analysis When no project directory is explicitly supplied, the self-governance module recursively traverses the entire OpenClaw workspace, its Skill directory, and the external research directory. I ...[truncated 2366 chars]- Remediation
View remediation
