T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/apply_feishu_multi_agent.py:75- Finding
Global Session Visibility Violates Least-Privilege Boundaries
- Content
View full analysis
list[str]: changes: list[str] = [] tools = ensure_dict_path(config, ["tools"]) sessions = ensure_dict_path(tools, ["sessions"]) if sessions.get("visibility") != "all": sessions["visibility"] = "all" changes.append("set tools.sessions.visibility=all") agent_to_agent = ensure_dict_path(tools, ["agentToAgent"]) if agent_to_agent.get("enabled") is not True: agent_to_agent["enabled"] = True changes.append("set tools.agentToAgent.enabled=true") existing_allow = agent_to_agent.get("allow") if not isinstance(existing_allow, list): existing_allow = [] agent_to_agent["allow"] = existing_allow for role in roles: if role["agentId"] not in existing_allow: existing_allow.append(role["agentId"]) changes.append(f"allow agentToAgent: {role['agentId']}") return changes ``` The audit utility also treats global visibility as mandatory: ```python allow = set(dotted_get(config, ["tools", "agentToAgent", "allow"], []) or []) sessions_visibility = dotted_get(config, ["tools", "sessions", "visibility"]) agent_to_agent_enabled = dotted_get(config, ["tools", "agentToAgent", "enabled"]) if sessions_visibility != "all": failures.append("tools.sessions.visibility should be 'all'") if agent_to_agent_enabled is not True: failures.append("tools.agentToAgent.enabled should be true") ``` Generated configuration contains the same setting: ```python "tools": { "sessions": {"visibility": "all"}, "agentToAgent": {"enabled": True, "allow": allow}, }, ``` ### Technical Analysis The Skill enabl ...[truncated 1674 chars]- Remediation
View remediation
