P1
Security
Credential cache 没有按 Space 隔离
app/services/channel_registry.rb · line 87–93
credential_cache 仅以 channel name 为 key。同一进程处理多个 Space 时,后续请求可能复用前一个 Space 的凭据。这会造成跨租户信息泄漏,且现有测试使用单一 Space,无法捕获。
87def credentials_for(name, space:)
88 credential_cache[name] ||= load_credentials(name, space)
88 cache_key = [space.id, name]
89 credential_cache[cache_key] ||= load_credentials(name, space)
90end