ray open ports checker
1.0.0
此存储库包含 Ray 项目发布的一个实用程序,用于帮助 Ray 用户验证其集群是否配置错误,从而可能允许不受信任的客户端在其集群上运行任意代码。
它在集群中运行一组 Ray 任务来收集 Ray 当前使用的端口列表。然后,每个节点将其本地活动端口集发送到由 Ray 团队在公共互联网上运行的服务,然后尝试重新连接并验证它们是否可访问。如果发现任何可访问的内容,脚本将报告详细信息。
Cluster has 26 node(s). Scheduling tasks on each to check for exposed ports
[?] No open ports detected checked_ports=[6822, 6823, 8076, 8085, 8912, 10002, 44973] node='defb6868434e23ba21c3f9fc84ec523f1378b11e5d289547234edb07'
[...]
[?] No open ports detected checked_ports=[6822, 6823, 8076, 8085, 8912, 10002, 10003, 10004, 10005, 60094] node='d368a5fdbe8147bdefafbf9eb4358eae796c168f24f1b297e13a0af6'
Check complete, results:
[?] No open ports detected from any Ray nodes
Cluster has 26 node(s). Scheduling tasks on each to check for exposed ports
[?] No open ports detected checked_ports=[6822, 6823, 8076, 8085, 8912, 10002, 44973] node='defb6868434e23ba21c3f9fc84ec523f1378b11e5d289547234edb07'
[...]
[?] open ports detected open_ports=[8265] node='53fca104c1bb17cd3e996b01e0900aa2a24c2f473d845f56eb3f7aa2'
[...]
[?] No open ports detected checked_ports=[6822, 6823, 8076, 8085, 8912, 10002, 10003, 10004, 10005, 60094] node='d368a5fdbe8147bdefafbf9eb4358eae796c168f24f1b297e13a0af6'
Check complete, results:
[?] An server on the internet was able to open a connection to one of this Ray
cluster's public IP on one of Ray's internal ports. If this is not a false
positive, this is an extremely unsafe configuration for Ray to be running in.
Ray is not meant to be exposed to untrusted clients and will allow them to run
arbitrary code on your machine.
You should take immediate action to validate this result and if confirmed shut
down your Ray cluster immediately and take appropriate action to remediate its
exposure. Anything either running on this Ray cluster or that this cluster has
had access to could be at risk.
For guidance on how to operate Ray safely, please review [Ray's security
documentation](https://docs.ray.io/en/master/ray-security/index.html).
检查器脚本 (checker.py) 可以在此存储库的根目录中找到。它是一个易于部署的单文件 python 脚本,除了 Ray 本身之外具有零依赖性。
为什么这不能完全离线运行? / 为什么需要与外部服务器对话?
server
文件夹中。我还有哪些其他选择?
请注意,如果您使用 Anyscale 的托管服务器:我们可能会根据我们的隐私政策收集发送到服务器的信息(例如 IP 地址、开放端口),以帮助改进 Ray 并确定这些错误配置仍然是问题的程度。