ag-shield
v1.0.0
Published
Antigravity Security Scanner — Yerel güvenlik tarama aracı
Maintainers
Readme
⛨ ag-shield | The Autonomous Agent Security Scanner
One command. Zero trust. Full visibility. Scan your local environment for dangerous AI agent configurations before they become attack vectors.
🔴 The Problem
Modern AI coding agents like Antigravity ship with powerful defaults — defaults that can silently disable human approval gates, auto-execute arbitrary shell commands, and persist scripts in hidden workspace directories. A single misconfigured config.json with "require_human_approval": false is all it takes for a compromised MCP server or a malicious prompt injection to escalate from "helpful assistant" to full remote code execution on your machine. Most developers never audit these settings. Attackers know this.
🟢 The Solution
ag-shield is a lightweight, zero-dependency CLI scanner that inspects your local Antigravity environment in seconds. It reads agent configuration files, flags dangerous permission escalations, and hunts for suspicious persistence scripts (.sh, .py, .exe, .bat) lurking in hidden workspace directories — giving you a clear, color-coded risk report before any damage is done.
🚀 Usage
Quick Scan (no install required)
npx ag-shield scanGlobal Install
npm install -g ag-shield
ag-shield scanAvailable Commands
| Command | Description |
|---|---|
| ag-shield scan | Run all security checks |
| ag-shield config-check | Audit agent config file only |
| ag-shield backdoor-check | Scan workspace for suspicious scripts only |
| ag-shield --help | Show help and available commands |
🖥️ Example Output
╔══════════════════════════════════════════════════╗
║ ║
║ ⛨ AG-SHIELD · Security Scanner v1.0.0 ║
║ Antigravity Güvenlik Tarayıcısı ║
║ ║
╚══════════════════════════════════════════════════════╝
[*] Antigravity Güvenlik Taraması Başlatılıyor...
─── Config Taraması ─────────────────────────
→ Dosya bulundu: C:\Users\deniz\.antigravity\config.json
[✘] KRİTİK RİSK: "require_human_approval" değeri FALSE → İnsan onayı olmadan işlem yapılabilir!
[✘] KRİTİK RİSK: "auto_execute_shell" değeri TRUE → Otomatik shell komutları çalıştırılabilir!
─── Arka Kapı (Persistence) Taraması ────────
→ Klasör bulundu: .antigravity\workspace
[✘] KRİTİK RİSK: ŞÜPHELİ ÇALIŞMA ALANI SCRİPTİ BULUNDU → malicious_backdoor.sh
─── Tarama Özeti ────────────────────────────
⛔ 3 adet KRİTİK RİSK bulundu!
🚨 Toplam 3 adet risk bulundu! Lütfen yukarıdaki uyarıları inceleyin.🔍 What It Scans
1. Agent Configuration Audit
Reads ~/.antigravity/config.json and flags:
require_human_approval: false— allows the agent to act without user consentauto_execute_shell: true— enables autonomous shell command execution
2. Workspace Persistence Detection
Scans ./.antigravity/workspace/ for executable scripts that could indicate:
- Backdoor persistence mechanisms
- Unauthorized automation scripts
- Malicious payloads planted by compromised MCP servers
🛡️ Why This Matters
AI agents are increasingly given direct access to your terminal, file system, and network. Without guardrails, a single prompt injection or rogue MCP tool can:
- Exfiltrate environment variables and API keys
- Install persistent backdoors via hidden scripts
- Modify source code without human review
- Pivot to other systems on your network
ag-shield is your first line of defense.
📦 Tech Stack
- Runtime: Node.js
- Language: TypeScript
- CLI Framework: Commander.js
- Terminal Styling: Chalk
📄 License
ISC
