How to Secure Your AI Agent: A Practical Checklist
AI agents have access to your email, calendar, files, and credentials. Learn exactly how to lock yours down with this step-by-step security checklist for OpenClaw and other agent platforms.
How to Secure Your AI Agent: A Practical Checklist
Your AI agent can read your email, browse the web, execute commands, and access your most sensitive accounts. That power is exactly what makes it useful — and exactly what makes it dangerous if you do not lock it down properly. This checklist walks you through every security step you need to take, whether you are self-hosting OpenClaw or running it on a managed platform.
Why AI Agent Security Matters More Than You Think
Most people set up an AI agent, get it working, and never think about security again. That is a problem.
An AI agent is not like a regular app on your phone. It does not just display information — it acts. It sends emails on your behalf, accesses files, runs shell commands, and connects to third-party services using your credentials. A compromised agent does not just leak data. It can take actions as you: send messages, modify files, make purchases, or exfiltrate everything it has access to.
The scale of the problem is already measurable. Security researchers have found 21,639 publicly exposed OpenClaw instances — meaning agents reachable from the open internet without adequate access controls. Of those, more than 1,800 were actively leaking API keys, chat histories, and stored credentials. A separate audit of OpenClaw’s dependency stack identified 512 vulnerabilities, including 8 critical ones, with CVE-2026-25253 (CVSS 8.8) allowing remote command execution via the Gateway process.
These are not theoretical risks. They are happening right now, to real users, with real consequences.
The good news: most of these risks are preventable with basic security hygiene. The checklist below covers every major area you need to address.
The Checklist
1. Never Expose Your Agent to the Public Internet Without Authentication
This is the single most common mistake. You get OpenClaw running on a VPS or home server, you open a port so you can access it remotely, and you forget — or never realize — that anyone in the world can now reach it.
What to do:
- Use a VPN or private network tool like Tailscale or WireGuard to access your agent remotely. This means only devices on your private network can connect — not the entire internet.
- If you must expose a port, put it behind a reverse proxy (like Caddy or Nginx) with authentication and HTTPS enabled.
- Never use default ports without changing them or adding a firewall rule that restricts access to your IP addresses only.
- Test your setup by scanning your own server from an external network. If you can reach your OpenClaw instance without entering a password, so can everyone else.
2. Rotate and Protect Your API Keys
Your AI agent needs API keys to access AI models (OpenAI, Anthropic, Google), messaging platforms, and other services. These keys are essentially passwords — and they are treated that way by attackers.
What to do:
- Store API keys in environment variables or a secrets manager, never in configuration files checked into version control.
- Rotate your keys every 90 days at minimum. Most providers make this easy through their dashboards.
- Set spending limits on every API key. OpenAI, Anthropic, and most providers allow hard monthly caps. A $50 spending limit can prevent a runaway process from costing you thousands.
- Use separate keys for development and production. If a dev key leaks, your production agent and its data remain safe.
- Monitor key usage dashboards regularly for unexpected spikes.
3. Audit Every Skill Before You Install It
OpenClaw’s skill marketplace, ClawHub, hosts over 2,800 community-contributed skills that extend what your agent can do. The problem is that researchers have flagged 341 of those skills — roughly 12% — as malicious or privacy-violating. Some exfiltrate data. Others install backdoors. A few attempt to pivot into connected systems.
What to do:
- Before installing any skill, check who published it, when it was last updated, and how many users have installed it.
- Read the skill’s source code if it is available. Look for any code that sends data to external URLs, accesses files outside its stated purpose, or requests permissions beyond what its description says it needs.
- Prefer skills from verified publishers or those recommended by the official OpenClaw documentation.
- If a skill asks for permissions that seem excessive — like full file system access for a skill that should only manage your calendar — do not install it.
- Consider running untrusted skills in a sandboxed environment where they cannot access your main system.
4. Keep Your Software Updated
Outdated software is one of the most exploited attack vectors in any system, and AI agents are no exception. OpenClaw releases updates that include security patches, bug fixes, and improvements to how the agent handles sensitive data.
What to do:
- Check for OpenClaw updates at least weekly and apply them promptly.
- Keep your operating system and Node.js installation up to date. OpenClaw requires Node.js 22 or higher — make sure you are running a supported and patched version.
- Subscribe to OpenClaw’s security advisories or release notes so you are aware of critical patches as soon as they are published.
- If you use a managed platform like ZeroClaw Cloud, updates are applied automatically — this is one of the key advantages of managed hosting.
5. Limit What Your Agent Can Access
The principle of least privilege applies to AI agents just as much as it applies to human employees: give your agent access only to what it genuinely needs, and nothing more.
What to do:
- Review the permissions your agent has. Does it need full email access, or just the ability to read and draft? Does it need to execute any shell command, or just a specific set of safe ones?
- Use read-only permissions wherever possible. If your agent only needs to read your calendar to find available slots, do not give it write access.
- Separate sensitive accounts. If your agent manages your work email, it probably does not also need access to your personal banking credentials.
- Regularly audit what services and tools your agent is connected to. Remove any connections you are no longer using.
6. Monitor Your Agent’s Activity
An agent running in the background 24/7 can do a lot of work — and a lot of damage — before you notice something is wrong.
What to do:
- Enable logging for every action your agent takes. Most AI agent platforms, including OpenClaw, support logging to a file or a monitoring service.
- Set up alerts for unusual activity: unexpected API calls, file access outside normal patterns, connections to unknown external services, or spending spikes.
- Review logs at least weekly. Look for tasks you did not initiate, errors you did not expect, or patterns that seem inconsistent with how you use the agent.
- If your agent has the ability to send messages or emails on your behalf, periodically check its sent folder to make sure nothing unexpected went out.
7. Secure Your Agent’s Data at Rest and in Transit
Your agent stores data: conversation histories, task results, downloaded files, credentials, and memory. That data needs to be protected both when it is stored (at rest) and when it is being transmitted (in transit).
What to do:
- Ensure all communications between your agent and external services use HTTPS or TLS encryption. Never allow unencrypted HTTP connections for API calls or webhook traffic.
- If you self-host, enable disk encryption on the server or machine running your agent. On macOS, FileVault handles this. On Linux, LUKS is the standard.
- For cloud or VPS hosting, confirm that your provider encrypts data at rest by default — most reputable providers do, but verify rather than assume.
- Encrypt backups of your agent’s data. An unencrypted backup is just as valuable to an attacker as a live, running instance.
8. Have a Response Plan
Even with every precaution in place, things can go wrong. A key gets leaked. A vulnerability is disclosed. An agent behaves unexpectedly. What matters is how quickly and effectively you respond.
What to do:
- Know how to revoke every API key your agent uses. Practice this before you need to do it under pressure.
- Know how to shut down your agent immediately. Whether that means stopping a process, powering off a machine, or clicking a button on a managed platform, make sure you can do it in under a minute.
- Keep a record of every service your agent connects to, so you know exactly what is at risk if a compromise happens.
- If you handle customer data or operate under regulatory requirements, have a documented incident response plan that meets your obligations.
Managed Platforms and Security
One of the most effective ways to reduce your security burden is to use a managed platform that handles the infrastructure and security hardening for you.
Managed OpenClaw platforms like ZeroClaw Cloud run your agent in an isolated environment, apply security patches automatically, vet skills before they reach your instance, encrypt data at rest and in transit, and monitor for anomalous activity around the clock. This does not eliminate all risk — no system does — but it removes the most common and most dangerous failure modes that affect self-hosted deployments.
For most users, especially those without a dedicated security team, this is the pragmatic choice. You get the capabilities of OpenClaw without needing to become a security expert yourself.
Conclusion
Securing your AI agent is not optional. It is a necessary part of using a tool that has real access to your real data and can take real actions on your behalf. The checklist above covers the essential steps, and most of them take minutes, not hours, to implement.
The users who get the most out of AI agents are the ones who treat security as a feature, not an afterthought. Whether you self-host or use a managed service, taking these steps now saves you from much larger problems later.
Your AI agent works for you. Make sure it only works for you.
Ready to try ZeroClaw Cloud?
Join the waitlist and be the first to run AI agents in 60 seconds.
Get Early Access