Cloud Agent 網路安全
基於 Cursor 官方 Security & Network 文件解釋 Privacy Mode、secret protection、signed commits、egress、artifact host 和 IP allowlist。
Cloud Agent 網路安全的核心不是“開或關網路”,而是明確程式碼、金鑰、artifacts、外部訪問和團隊策略各自的邊界。
閱讀目標:讀完本章,你應該能為 Cloud Agent 設定一套可審計的網路和安全策略,並能解釋 artifact host、allowlist 和 team lock 的取捨。
1. Privacy Mode 和資料邊界
Cloud Agents 可在 Privacy Mode 下使用。官方說明中,Cursor 不會用你的程式碼訓練模型,只會為執行 agent 保留程式碼。
需要注意:
- 如果 Privacy Mode 關閉,Cursor 會收集 prompts 和 dev environments 用於改進產品。
- 如果啟動 Cloud Agent 時關閉 Privacy Mode,執行中再開啟 Privacy Mode,這個 agent 會繼續按關閉狀態跑完。
- 採購、法務和安全評審要看“agent 啟動時”的配置,而不是隻看當前 dashboard 狀態。
2. Secret protection
提供給 Cloud Agents 的 secrets 會在 at rest 和 in transit 狀態加密。
你可以把 secret 標記為 Redacted,獲得額外保護:
| 保護 | 行為 |
|---|---|
| commit / file scan | commit message 和檔案中如果包含該 secret,會被拒絕 |
| model redaction | secret 會從 model tool calls 中遮蔽,不展示給模型,也不進入 chat transcripts |
這能降低兩類風險:憑據被寫進版本控制,以及憑據進入模型上下文。
Redacted secret 不等於可以隨意擴權。它只是一道保護層,仍然要控制誰能建立 agent、誰能 follow-up、哪些 MCP 可用、網路能訪問哪裡。
3. Signed commits
Cloud Agents 會用 HSM-backed Ed25519 key 給每個 commit 簽名。GitHub 和 GitLab 上會顯示 Verified badge。
實際意義:
- 團隊能確認 commit 來自 Cursor Cloud Agent。
- 對要求 signed commits 的 branch protection rules,Cloud Agent PR 可自動滿足。
- 不需要額外配置。
這解決的是“commit 來源可信”,不是“程式碼一定安全”。仍然要做 diff review、CI、security review 和產品驗收。
4. 必須知道的風險
Cloud Agent 的執行邊界和本地 foreground agent 不一樣:
| 事項 | 邊界 |
|---|---|
| Repo 許可權 | 要給 Cursor GitHub App 對目標 repo 的 read-write 許可權 |
| 執行環境 | 程式碼在 Cursor AWS infrastructure 的 isolated VMs 中執行,並在 agent 可訪問期間存在 VM disk 上 |
| 網路 | 預設有 internet access,可用 egress controls 限制 |
| 命令執行 | terminal commands 會自動執行,便於迭代測試 |
| Prompt injection | 自動命令 + 網路訪問會帶來資料外傳風險 |
| Privacy toggle | 執行中切換 Privacy Mode 不影響已啟動 agent 的模式 |
所以,Cloud Agent 的預設能力比本地需要逐條審批命令的 foreground agent 更適合長任務,也更需要網路和許可權邊界。
5. Network access modes
在 Cloud Agents dashboard 的 Security 區域,可以配置 outbound network access。
| Mode | 行為 | 適合 |
|---|---|---|
| Allow all network access | 不限制外部 host | 低敏 repo、快速試用、非生產環境 |
| Default + allowlist | 預設域名 + 自定義 allowlist | 大多數團隊場景 |
| Allowlist only | 只允許顯式加入 allowlist 的域名 | 高敏專案、企業鎖定策略 |
即使在 Allowlist only 模式,仍會保留一小組必要域名,以保證 Cloud Agents 基本功能可用,包括 Cursor 自身服務和 SCM providers。
6. Artifact uploads
Cloud Agents 會把 screenshots、videos、log references 這類 artifacts 上傳到:
cloud-agent-artifacts.s3.us-east-1.amazonaws.com
如果使用 Default + allowlist 或 Allowlist only,要把這個 exact host 加入 allowlist,否則 artifacts 上傳失敗。agent session 和其他 tool calls 仍會繼續,但 PR embeds、dashboard previews 或通知附件會缺失。
不要用 *.s3.us-east-1.amazonaws.com 代替 exact host。wildcard 會放開該 region 的所有 bucket,給 prompt-injected agent 留出外傳路徑。
My Machines 和 Self-hosted Pool 上傳 artifacts 也走同一個 host。自託管部署時,要確保 worker 到公網之間的防火牆允許它。
7. User、team 和 Enterprise lock
network access 可以由個人使用者和團隊管理員配置。
| 層級 | 行為 |
|---|---|
| User-level | 使用者設定應用到自己建立的所有 Cloud Agents |
| Team default | 使用者沒有設定時,團隊預設生效 |
| Enterprise lock | 管理員鎖定後,團隊設定覆蓋所有使用者,使用者不能改 |
優先順序:
- Enterprise lock 最高。
- 未鎖定時,user setting 優先於 team default。
- 使用者沒有設定時,team default 生效。
團隊級 allowlist 和 desktop Agent sandbox default network allowlist 是同一套 allowlist,沒有第二份列表要維護。
8. Sandbox network policy 關係
Default + allowlist 中的 default domains 和 desktop Agent sandbox 的 default network allowlist 相同。
團隊管理員在 dashboard 配的 allowlist 同時影響:
- Cloud Agent network access。
- desktop Agent sandbox network policy。
這有好處:統一治理。也有風險:不要只為了某個 Cloud Agent 放開一個域名,卻忘了它也影響 sandbox 預設網路策略。
9. Egress IP ranges
Cloud Agents 從特定 IP ranges 發起網路連線。官方提供 JSON endpoint:
https://cursor.com/docs/ips.json
響應包含:
| 欄位 | 含義 |
|---|---|
version | schema version |
modified | IP ranges 更新時間 |
cloudAgents | 按 cluster 分組的 Cloud Agent CIDR |
gitEgressProxy | git egress proxy IPs |
這些 IP ranges 可用於 clone / push、下載依賴、訪問外部 API 和 web resources。
官方不建議把 IP allowlist 當作主要安全機制。如果必須這樣做,要定期監控 JSON endpoint,因為 Cloud Agent IP 會因擴容和運維變化。
10. Git egress proxy
Git host 場景優先使用 Cursor 的 git egress proxy allow list 配置。它會把 git traffic 透過更窄的一組 IP 路由,並支援 GitHub、GitLab 等 git hosts。
如果必須直接加入 allowlist,官方當前列出的穩定 proxy IP 是:
184.73.225.1343.209.66.1252.44.113.131
這些 IP 變更時,使用 IP allow lists 的團隊會提前收到通知。
商業級驗收
上線前至少確認:
- Privacy Mode 是否在 agent 啟動前符合團隊要求。
- secrets 是否使用 dashboard 管理,並對關鍵 secret 啟用 Redacted。
- GitHub / GitLab branch protection 是否接受 Cloud Agent signed commits。
- 網路模式是否從 Allow all 收斂到 Default + allowlist 或 Allowlist only。
- artifact exact host 是否加入 allowlist,且沒有用 S3 wildcard 放大出口。
- team allowlist 與 sandbox network policy 的共享影響已評估。
- Enterprise team 是否需要 Lock Network Access Policy。
- IP allowlist 不是唯一防線,且有監控
ips.json的機制。
官方來源
- Cursor Cloud Agent Security & Network —— 官方 Privacy Mode、secret protection、signed commits、network access、artifact uploads、IP ranges 和 git egress proxy。
- Cursor Cloud Agent Capabilities —— 官方 artifacts 背景。
- Cursor My Machines —— 官方 self-hosted worker networking。
- Cursor Self-Hosted Pool —— 官方 pool networking。