How to secure an OpenHands deployment for enterprise-level source code?
We are considering deploying OpenHands for our backend team, but security is our top priority. Since the agent has the power to execute shell commands and browse the web, what are the best practices to ensure it doesn't accidentally leak secrets or perform unauthorized actions? I know it uses Docker, but is that enough isolation for a corporate environment?
2025-02-10 in Cyber Security by Derek Vance
| 9157 Views
All answers to this question.
Security is a core focus for the OpenHands community. Beyond the default Docker container, you should strictly limit the directories you mount to the sandbox. Only give the agent access to the specific repo it needs to work on. Additionally, using "Secret Scanning" guardrails is a must—you can configure the agent's environment to block any outgoing web requests that look like API keys or tokens. In our setup, we also run the sandbox in an isolated VPC with no external internet access except for a whitelist of documentation sites. This "hardened" approach makes it much safer for handling sensitive internal codebases.
Answered 2025-03-15 by Alice Henderson
Does OpenHands have a built-in way to require human approval for certain "high-risk" commands? For example, I’d want to manually verify any git push or rm -rf commands before they are executed.
Answered 2025-03-20 by Bradley Norton
-
Yes, Bradley, you can run it in an "interactive" mode where the agent pauses and asks for permission before running terminal commands. This "Human-in-the-loop" feature is vital for the early stages of adoption. It builds trust while preventing the agent from going off the rails if it hallucinates a destructive command.
Commented 2025-03-22 by Gregory Hayes
The best part about OpenHands is that because it's open source, you can audit the entire execution engine itself to ensure there are no hidden backdoors or data-collection scripts.
Answered 2025-04-02 by Laura Peterson
-
That's a huge point. For a security team, "trust but verify" is easier when you have the source code. It’s much easier to pass a compliance audit with an open tool like this.
Commented 2025-04-05 by Alice Henderson
Write a Comment
Your email address will not be published. Required fields are marked (*)

