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 並確定這些錯誤配置仍然是一個問題的程度。