Skip to Content
🛠️ Công cụ AIAntigravityPreviewSecure Mode

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.

Secure Mode là gì?

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

Khi nào nên bật Secure Mode

✅ Nên bật

  • 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

❌ Có thể tắt

  • Development/sandbox environment
  • Personal projects
  • Khi cần tốc độ cao
  • Prototyping nhanh

Các tính năng bảo mật

File Access Control

Tính năngMô tả
Workspace isolationChỉ access files trong workspace
Read-only areasMột số paths chỉ được đọc
Sensitive files protectionProtection cho .env, secrets, etc.

Browser Security

Tính năngMô tả
Denylist enforcementBlock malicious URLs (server-side)
Allowlist controlChỉ access URLs được approve
Credential isolationKhông share credentials với main profile

Execution Control

Tính năngMô tả
Command approvalReview trước khi chạy commands
Dangerous command blockingBlock rm -rf, sudo, etc.
Resource limitsGiới hạn CPU/memory usage

Denylist

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

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

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

Mặc định

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

localhost

Thêm URL vào Allowlist

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

Wildcards

Allowlist hỗ trợ wildcards:

*.example.com # All subdomains api.example.com # Specific subdomain

Bật/Tắt Secure Mode

Qua Settings

  1. Mở Settings (Cmd+, / Ctrl+,)
  2. Tìm “Secure Mode”
  3. Toggle on/off

Qua Command

"Bật Secure Mode cho conversation này" "Tắt Secure Mode"

Secure Mode vs Regular Mode

AspectSecure ModeRegular Mode
File accessWorkspace onlyBroader access
Browser URLsAllowlist requiredPrompt per session
CommandsAlways approveSafe commands auto-run
SpeedSlower (more approvals)Faster
SafetyHigherStandard

Best Practices

🔐 Production Environments

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

  • Production databases
  • Customer data
  • Secret keys
  • Financial systems

📝 Maintain Allowlist

  • Chỉ thêm URLs bạn thực sự cần
  • Review allowlist định kỳ
  • Remove URLs không còn dùng

⚠️ Sensitive Operations

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

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

Logging và Auditing

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
Last updated on