QuotaCheap Playbook

Cursor Agent Security và Ops: sandbox, approvals, permissions và cost governance

Tìm hiểu Cursor Agent security theo docs chính thức: workspace trust, .cursorignore, terminal sandbox, approvals, MCP allowlist, network requests và cost g…

Coding agent càng nhiều quyền càng cần guardrail: workspace trust, .cursorignore, terminal approvals, MCP allowlist, network boundary, CI và cost visibility.

Hướng dẫn Cursor Agent security và operations theo docs chính thức: first-party/third-party tool calls, network requests, workspace trust, terminal sandbox, MCP approvals, .cursorignore, permission policy và cost governance cho agent workflow.

Cursor Agent càng hữu ích khi có nhiều quyền: đọc repo, sửa file, chạy terminal, dùng browser, gọi MCP tools, làm việc trong cloud agent, tạo PR.

Nhưng quyền càng nhiều thì security và ops càng quan trọng.

Một coding agent không chỉ là model.

Nó là actor có thể thay đổi code và chạm workflow thật.

Cursor Agent Security docs nói AI có thể hành xử bất ngờ vì prompt injection, hallucination và các vấn đề khác.

Cursor dùng guardrails để giới hạn hành động agent, và sensitive actions mặc định cần manual approval.

Đây là stance đúng.

Agent mạnh không nên chạy trong môi trường mù quyền.

Bài này gom các điểm security/ops quan trọng khi dùng Cursor Agent: workspace trust, .cursorignore, terminal sandbox, approvals, MCP allowlist, network boundary, CI/review và cost governance.

Threat model thực tế Rủi ro với coding agent không chỉ là “model viết code sai”.

Rủi ro thực tế gồm: Agent sửa file ngoài scope.

Agent chạy command destructive.

Agent đọc file chứa secret không cần thiết.

Prompt injection trong docs/webpage/tool output khiến agent làm sai.

MCP tool ghi dữ liệu ngoài hệ thống.

Cloud environment có token quá rộng.

PR agent tạo ra pass superficial review nhưng phá behavior.

Usage/cost tăng vì agent loop hoặc retry quá nhiều.

Nếu threat model chỉ tập trung vào model quality, bạn bỏ sót phần ops.

First party và third party tool calls Cursor phân biệt tool calls do Cursor cung cấp và tool calls third party qua MCP.

Theo docs security, first party tools có guardrails riêng; third party tools qua MCP cần approval connection và approval tool call trừ khi bạn pre approve bằng allowlist.

Điểm cần nhớ: File read/search thường ít rủi ro hơn write/execute.

File edit có thể tạo regression.

Terminal có thể tác động hệ thống.