Bỏ qua để đến nội dung

Secure Mode

Secure Mode là chế độ bảo mật nâng cao của Antigravity, cung cấp các kiểm soát nghiêm ngặt hơn cho file access và browser interactions.

Khi bật Secure Mode, Antigravity sẽ:

  • Hạn chế truy cập file ngoài workspace
  • Kiểm soát chặt browser actions
  • Yêu cầu approval cho các operations nhạy cảm
  • Làm việc với code production
  • Xử lý dữ liệu nhạy cảm
  • Môi trường enterprise/corporate
  • Khi cần audit trail rõ ràng
  • Development/sandbox environment
  • Personal projects
  • Khi cần tốc độ cao
  • Prototyping nhanh
Tính năng Mô tả
Workspace isolation Chỉ access files trong workspace
Read-only areas Một số paths chỉ được đọc
Sensitive files protection Protection cho .env, secrets, etc.
Tính năng Mô tả
Denylist enforcement Block malicious URLs (server-side)
Allowlist control Chỉ access URLs được approve
Credential isolation Không share credentials với main profile
Tính năng Mô tả
Command approval Review trước khi chạy commands
Dangerous command blocking Block rm -rf, sudo, etc.
Resource limits Giới hạn CPU/memory usage

Denylist được enforce server-side bởi Google’s BadUrlsChecker:

  • Block phishing sites
  • Block malware sources
  • Block known dangerous URLs

Denylist luôn được ưu tiên - không thể bypass bằng allowlist.

Allowlist là file local bạn kiểm soát:

~/.antigravity/allowlist.txt
localhost
127.0.0.1
*.mycompany.com
staging.myapp.com

Allowlist mặc định chỉ chứa:

localhost

Cách 1: Khi được prompt

  • Agent sẽ hỏi khi truy cập URL mới
  • Click “Always allow” để thêm vào allowlist

Cách 2: Edit file trực tiếp

  • Mở ~/.antigravity/allowlist.txt
  • Thêm URLs, mỗi URL một dòng

Allowlist hỗ trợ wildcards:

*.example.com # All subdomains
api.example.com # Specific subdomain
  1. Mở Settings (Cmd+, / Ctrl+,)
  2. Tìm “Secure Mode”
  3. Toggle on/off
"Bật Secure Mode cho conversation này"
"Tắt Secure Mode"
Aspect Secure Mode Regular Mode
File access Workspace only Broader access
Browser URLs Allowlist required Prompt per session
Commands Always approve Safe commands auto-run
Speed Slower (more approvals) Faster
Safety Higher Standard

Luôn bật Secure Mode khi làm việc với:

  • Production databases
  • Customer data
  • Secret keys
  • Financial systems
  • Chỉ thêm URLs bạn thực sự cần
  • Review allowlist định kỳ
  • Remove URLs không còn dùng

Dù có Secure Mode, vẫn nên:

  • Review mọi database queries
  • Double-check file deletions
  • Verify before pushing to production

Secure Mode cung cấp:

  • Action logs - Mọi action được log
  • Approval history - Ai đã approve gì
  • Access attempts - Log các lần truy cập bị block

Logs hữu ích cho:

  • Security audits
  • Debugging
  • Compliance requirements