Seu agente IA é uma bomba de segurança (toca em TUDO, sem permissão)
Agente IA acessa tudo no PC (senhas, arquivos, dados). Você sabe o que ele toca? Geiger = visibilidade.
Equipe OpenClaw · Time de Engenharia & Produto
A Equipe OpenClaw é formada por engenheiros, designers e especialistas em IA dedicados a construir a melhor plataforma de agentes conversacionais para negócios brasileiros. Combinamos expertise…
Seu agente IA é uma bomba de segurança (toca em TUDO, sem permissão)
Você é founder/CTO de SaaS.
Seu SaaS: agente IA em produção (WhatsApp, suporte, vendas, automação).
Seu agente hoje: Roda em infraestrutura (seu servidor, ou cliente's machine).
Seu assumption (DANGEROUS):
- "Agente só faz o que eu programei (sem surpresas)"
- "Se agente não toca dados, está seguro"
- "Permissões não importam (agente é trusted)"
- "Não preciso auditar agente (ele é código meu)"
- "Se algo ruim acontece, vou ver no log"
Your reality (security wake-up call):
-
Agente IA pode tocar EM TUDO (no seu PC, servidor, infraestrutura)
- Files: Pode ler, escrever, deletar (sem limite)
- Passwords: Pode acessar (environment variables, keystores, vaults)
- Database: Pode consultar, modificar (depende de conexão)
- APIs: Pode chamar (usando credenciais)
- System: Pode executar comandos (se permissão dada)
- Result: Agente é tão poderoso quanto você (e você não sabe o quê faz)
-
What Geiger discovered (security research):
- AI agents running on machines touch more than expected
- Visibility is near-zero (you can't see what agent touches)
- Audit trail is missing (no log of agent actions)
- Permissions are implicit (agent inherits user's permissions)
- Risk: Compromised agente = compromised system (everything is exposed)
- Solution: Geiger = see what agent can access
The signal (September 2024):
- GitHub project: "Geiger – See every AI agent on your machine"
- Key insight: If you can't see agent's touches, you can't secure it
- Implication: Your agente is a security risk (you don't know the attack surface)
- Opportunity: Implement visibility + audit trail
Your problem (quantified):
Agente IA permission model (current, dangerous):
Agent starts: ├─ Inherits user's permissions (same as you) ├─ Can read user's files (emails, documents, configs) ├─ Can modify system files (if admin) ├─ Can access network (APIs, databases, external services) ├─ Can execute code (shell commands, scripts) ├─ Visibility: Zero (no audit log of what happened) ├─ Detection: None (no alert if agente does something wrong) └─ Result: Silent compromise (agente goes rogue, you don't know)
Scenario 1: Agente bug (accidental) ├─ Agente supposed to: Read customer email ├─ Agente actually: Modifies customer database ├─ You discover: After 1,000 customers affected ├─ Impact: Data corruption, legal liability, customer lawsuit ├─ Detection: Too late (damage already done) └─ Cause: No visibility into agente's actions
Scenario 2: Agente compromised (malicious) ├─ Attacker injected prompt (via user input) ├─ Agente now: Exfiltrates all customer data ├─ You discover: Via CNPJ fine (R$ 500K+) ├─ Impact: Reputational, financial, legal damage ├─ Detection: Way too late └─ Cause: No audit trail, no permission boundaries
Scenario 3: Agente drift (gradual) ├─ Agente initially: Calls API correctly ├─ Over time: Starts making extra calls (optimization gone wrong) ├─ Impact: Cloud costs spike (R$ 50K → R$ 500K/month) ├─ You discover: When billing arrives ├─ Detection: Days/weeks late └─ Cause: No visibility into agente's API calls
Your risk (quantified): ├─ Scenario 1 (bug): R$ 100K-500K (legal, customer refunds) ├─ Scenario 2 (compromise): R$ 500K-5M (LGPD fine, lawsuits) ├─ Scenario 3 (drift): R$ 50K-200K (wasted compute, lost efficiency) ├─ Timeline: Days to months to discover ├─ Probability: High (most agentes have no audit trail) └─ Prevention: Implement visibility (Geiger-like solution)
Why agente permissions are a disaster (and nobody talks about it)
The problem: Implicit trust model (inherited permissions)
How agente permissions work today (DANGEROUS):
Agent permission model (status quo):
-
Agent starts (user initiates) ├─ Inherits user's OS permissions (full access) ├─ Inherits application's API credentials (all endpoints) ├─ Inherits database connection strings (all tables) ├─ Result: Agent is as powerful as user (no restriction) └─ Problem: No sandboxing, no boundaries
-
Agent runs (autonomous) ├─ Can read any file (user's home directory, configs, secrets) ├─ Can modify any file (if executable by user) ├─ Can call any API (using stored credentials) ├─ Can query any database (using connection string) ├─ Can execute shell commands (if user can execute) ├─ Can access network (any outbound connection) ├─ Visibility: Zero (no logging of these actions) └─ Problem: Silent, unrestricted access
-
Agent goes wrong (bug, compromise, drift) ├─ Scenario A (bug): Agent does unexpected action │ ├─ Example: Agent supposed to READ database, but DELETES │ ├─ Visibility: None (you don't know it happened) │ ├─ Discovery: Hours or days later (when customer complains) │ └─ Damage: Irreversible (data already deleted) │ ├─ Scenario B (prompt injection): Agent receives malicious prompt │ ├─ Example: User tricks agent into exfiltrating data │ ├─ Visibility: None (looks like normal agente action) │ ├─ Discovery: After data breach (when CNPJ investigates) │ └─ Damage: LGPD fine (10-50M or 2-5% revenue) │ ├─ Scenario C (drift): Agent optimization gone wrong │ ├─ Example: Agent calls API 100x more often (to "optimize") │ ├─ Visibility: None (you don't see individual calls) │ ├─ Discovery: When bill arrives (R$ 500K instead of R$ 50K) │ └─ Damage: Wasted money, negative cash flow │ └─ Common factor: No visibility = no early detection = late mitigation
Consequence: ├─ You can't audit agente's actions (no logging) ├─ You can't restrict agente's permissions (inherited from user) ├─ You can't detect agente's mistakes (no alerting) ├─ You can't prove agente's innocence (no evidence) └─ Result: Security risk is you (not agente), because you can't see/control it
Why this is worse than human employee:
Human employee: ├─ Can audit their work (emails, files, access logs) ├─ Can ask them "why did you do X?" (accountability) ├─ Can restrict their permissions (need approval for sensitive data) ├─ Can train them (error = learning opportunity) ├─ Can detect mistakes (they tell you, or you notice) └─ Risk: Medium (human has context, judgment, honesty)
AI agent: ├─ Can't audit their "thinking" (LLM is black box) ├─ Can't ask agent "why?" (it won't explain reasoning) ├─ Can't restrict permissions (inherited from system) ├─ Can't train it (retraining is expensive, full model update) ├─ Can't detect mistakes (agent doesn't know it's wrong) └─ Risk: High (agent has no context, poor judgment, no honesty)
Conclusion: ├─ Human employee < AI agent (in terms of risk) ├─ You need MORE oversight for agente (not less) ├─ You need visibility + audit trail (non-negotiable) └─ You need permission boundaries (not inherited permissions)
Solution 1: Implement visibility (like Geiger)
What Geiger does (and why it matters)
Geiger = Agent activity monitor (like Process Monitor for agents)
Geiger shows:
-
Every system call agent makes ├─ File access (read, write, delete, execute) ├─ Network connections (DNS, HTTP, sockets) ├─ Process execution (shell commands, external programs) ├─ Environment access (environment variables, config files) └─ Result: Full visibility into agent's actions
-
Every API call agent makes ├─ Which endpoint (GET /api/users, POST /api/payment) ├─ Which parameters (what data was sent) ├─ Which response (what was returned) ├─ Which authentication (which credentials were used) └─ Result: Audit trail of agent's API usage
-
Every resource agent accesses ├─ Which files (full path, read/write/execute) ├─ Which databases (table, query, rows affected) ├─ Which secrets (credentials, API keys, tokens) ├─ Which cache (memory, external cache access) └─ Result: Resource usage map
-
Alerts on suspicious behavior ├─ Accessing unauthorized files (not expected) ├─ Calling unexpected APIs (outside design) ├─ Exfiltrating data (large volume, new destination) ├─ Executing code (shell, system commands) ├─ Accessing secrets (credentials, keys) └─ Result: Early detection of problems
Benefit: ├─ You can see what agent is doing (real-time visibility) ├─ You can audit agent's history (audit trail) ├─ You can detect anomalies (unusual patterns) ├─ You can prove compliance (evidence for audits) ├─ You can debug issues (trace what went wrong) └─ Result: Confidence that agente is behaving correctly
How to implement visibility (practical)
Step 1: Add logging to agente
Where to log: ├─ File access: Every open(), read(), write(), delete() ├─ API calls: Every HTTP request/response ├─ Database queries: Every SQL statement ├─ Shell execution: Every exec(), subprocess() ├─ Credential access: Every secret retrieval └─ Time: Timestamp each action
What to log: ├─ Action (read, write, delete, execute, call) ├─ Resource (filename, URL, table, command) ├─ Parameters (what was read, what was written) ├─ Result (success, error, returned data size) ├─ Duration (how long did it take) ├─ User context (who triggered this, what was the request) └─ Agent context (what was agent trying to do)
How to log: ├─ To file (rotate, encrypt, archive) ├─ To centralized logging (CloudWatch, Datadog, ELK) ├─ To audit database (immutable, append-only) └─ To alerts (real-time, anomalies)
Example (Python agente): python import logging
logger = logging.getLogger('agent_audit')
def agent_read_file(filepath): logger.info(f"FILE_READ: {filepath}") # ... actual read ... logger.info(f"FILE_READ_SUCCESS: {filepath}, size={bytes_read}")
def agent_call_api(endpoint, params): logger.info(f"API_CALL: {endpoint}, params={params}") # ... actual call ... logger.info(f"API_RESPONSE: {endpoint}, status={status}, size={response_size}")
Step 2: Restrict agente's permissions (least privilege)
Instead of: Agent inherits all user permissions Do: Agent gets minimal permissions needed
Example (Linux containerized agente): ├─ Run in container (not on host) ├─ Mount only needed directories (not /home, /root) ├─ Drop capabilities (no root, no network_admin) ├─ Restrict syscalls (seccomp, AppArmor) ├─ Limit resources (CPU, memory, disk, network bandwidth) ├─ Use read-only filesystem (except temp directory) └─ Result: Agent can't access anything beyond its scope
Example (API permissions): ├─ Agent user has limited API key (not admin key) ├─ API key has scope (only specific endpoints) ├─ API key has rate limits (100 req/min, not unlimited) ├─ API key has IP whitelist (only expected sources) ├─ API key expires (rotate regularly) └─ Result: Even if API key compromised, damage is limited
Example (database permissions): ├─ Agent user has read-only access (not write) ├─ Agent user can see only specific tables (not all) ├─ Agent user can't execute stored procedures (limited to SELECT) ├─ Agent user can't modify schema (no ALTER, DROP) ├─ Database has row-level security (only sees own data) └─ Result: Agent can read, can't destroy
Step 3: Alert on suspicious behavior
Set up alerts for:
-
Unauthorized access ├─ Agent accessing file outside expected directory ├─ Agent calling API endpoint it shouldn't ├─ Agent querying table it shouldn't └─ Alert: Immediate (stop agent, investigate)
-
Unusual volume ├─ Agent making 10x more API calls than normal ├─ Agent reading 1GB of data (expected 1MB) ├─ Agent deleting 1M rows (expected 10) └─ Alert: High (rate-limit agent, investigate)
-
Data exfiltration ├─ Agent copying data to external API ├─ Agent writing to unexpected S3 bucket ├─ Agent sending customer data via email └─ Alert: Critical (block immediately, lockdown)
-
Privilege escalation ├─ Agent requesting admin API key ├─ Agent executing shell commands ├─ Agent accessing /etc/passwd └─ Alert: Critical (kill agent, investigate)
-
Anomalous behavior ├─ Agent accessing resource at unusual time ├─ Agent making API calls from unusual IP ├─ Agent using unusual pattern (differs from baseline) └─ Alert: Medium (monitor closely, investigate)
Solution 2: Restrict agente's permissions (least privilege principle)
Implementation strategies
Strategy 1: Containerization (sandboxing)
Docker container: ├─ Isolated filesystem (agent can't see host files) ├─ Isolated network (agent can only talk to allowed hosts) ├─ Isolated processes (agent can't kill other processes) ├─ Resource limits (CPU: 1 core, RAM: 1GB, Disk: 10GB) ├─ Read-only /etc (can't modify system config) ├─ Temp /tmp directory only for writing └─ Result: Agent is confined, can't affect host
Kubernetes pod: ├─ Network policy (only talk to certain services) ├─ Resource quota (CPU, memory limits) ├─ Security context (no root, read-only root) ├─ Pod security policy (restricts capabilities) ├─ RBAC (agent can't access other pods, secrets) └─ Result: Multi-tenant safe environment
Strategy 2: API-level permissions (scoped credentials)
Instead of: ├─ Agent uses API admin key (can do anything)
Do: ├─ Agent has scoped API token: ├─ Endpoints: Only /api/support/, /api/sales/ ├─ Methods: Only GET, POST (no DELETE) ├─ Rate limit: 100 req/min (not unlimited) ├─ Data: Only customer's own data (row-level filtering) ├─ Expiry: 1 day (rotate daily) └─ Signing: Each request is signed (immutable)
Result: ├─ Even if agent goes rogue: Limited damage ├─ Can't access other customers' data ├─ Can't delete anything ├─ Can't spam API (rate limited) └─ Can't use old token (expires)
Strategy 3: Database-level permissions (restricted user)
Instead of: ├─ Agent uses database admin user (can do anything)
Do: ├─ Agent has restricted database user: ├─ Tables: Only customers, tickets, conversations ├─ Columns: Only non-sensitive (not passwords, keys) ├─ Operations: Only SELECT, INSERT, UPDATE (no DELETE) ├─ Rows: Only customer's own data (via row security) ├─ Schema: Can't modify (no ALTER, DROP) └─ Functions: Can't execute stored procedures (no EXECUTE)
Result: ├─ Agent can read and create data (normal operation) ├─ Agent can't delete data (can't destroy) ├─ Agent can't see other customers (isolated) ├─ Agent can't access passwords (sensitive columns excluded) └─ Agent can't modify schema (can't hack structure)
Conclusion: Your agente needs security architecture (not just code)
The lesson from Geiger research:
- Visibility is zero (most agentes have no audit trail)
- Permissions are inherited (agente has full user access)
- Risk is high (compromise = full system compromise)
- Detection is late (problems found days/weeks later)
- Solution exists (implement visibility + restrict permissions)
Your decision (3 paths):
-
Do nothing (status quo, dangerous)
- Agente has full permissions
- No audit trail
- Risk: High (R$ 500K-5M potential loss)
- Probability: High (happens to 30%+ of SaaS)
- Recommendation: Don't do this
-
Implement visibility (moderate effort, high value)
- Add logging to agente (all actions recorded)
- Set up alerting (unusual behavior detected)
- Audit regularly (check logs weekly)
- Cost: R$ 10K-20K (engineering + tooling)
- Benefit: Early detection, compliance evidence
- Timeline: 2-4 weeks
- ROI: Prevents R$ 500K+ loss (100x payback)
-
Full security architecture (high effort, best protection)
- Implement visibility (logging + alerting)
- Restrict permissions (containerization, scoped APIs, DB users)
- Add monitoring (anomaly detection, baseline behavior)
- Test regularly (penetration testing, chaos engineering)
- Cost: R$ 50K-100K (architecture + testing)
- Benefit: Production-grade security
- Timeline: 2-3 months
- ROI: Prevents R$ 5M+ loss + reputation damage (100x+ payback)
At OpenClaw, we help SaaS implement agente security (not just code):
- AUDIT: Current agente security posture (what can it touch?)
- DESIGN: Security architecture (visibility, permissions, monitoring)
- IMPLEMENT: Logging + alerting (catch problems early)
- RESTRICT: Permissions (least privilege, scoped credentials)
- MONITOR: Agente behavior (anomalies, baselines, alerts)
- TEST: Security (penetration testing, scenarios, chaos)
- COMPLY: Audit trail (LGPD, SOC2, ISO27001)
Result: Agente que é seguro por design (não por esperança). Audit trail completo. Zero surpresas.
Seu agente toca em TUDO (senhas, arquivos, APIs, dados)?
Você tem visibilidade do que ele faz (ou está cego)?
Você tem permissões restritas (ou herda tudo do usuário)?
Você detecta problemas early (ou descobrem via CNPJ/cliente)?
Você quer segurança enterprise pra seu agente (não just hope)?
Se quer expert guidance (agent security architecture, visibility, permissions, audit trail, monitoring, compliance):
Publicado em 9 de setembro de 2026