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ì?
Phần tiêu đề “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
Phần tiêu đề “Khi nào nên bật Secure Mode”✅ Nên bật
Phần tiêu đề “✅ 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
Phần tiêu đề “❌ 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
Phần tiêu đề “Các tính năng bảo mật”File Access Control
Phần tiêu đề “File Access Control”| 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. |
Browser Security
Phần tiêu đề “Browser Security”| 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 |
Execution Control
Phần tiêu đề “Execution Control”| 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
Phần tiêu đề “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
Phần tiêu đề “Allowlist”Allowlist là file local bạn kiểm soát:
localhost127.0.0.1*.mycompany.comstaging.myapp.comMặc định
Phần tiêu đề “Mặc định”Allowlist mặc định chỉ chứa:
localhostThêm URL vào Allowlist
Phần tiêu đề “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
Phần tiêu đề “Wildcards”Allowlist hỗ trợ wildcards:
*.example.com # All subdomainsapi.example.com # Specific subdomainBật/Tắt Secure Mode
Phần tiêu đề “Bật/Tắt Secure Mode”Qua Settings
Phần tiêu đề “Qua Settings”- Mở Settings (
Cmd+,/Ctrl+,) - Tìm “Secure Mode”
- Toggle on/off
Qua Command
Phần tiêu đề “Qua Command”"Bật Secure Mode cho conversation này""Tắt Secure Mode"Secure Mode vs Regular Mode
Phần tiêu đề “Secure Mode vs Regular 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 |
Best Practices
Phần tiêu đề “Best Practices”🔐 Production Environments
Phần tiêu đề “🔐 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
Phần tiêu đề “📝 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
Phần tiêu đề “⚠️ 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
Phần tiêu đề “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