How to Configure OpenHands Oracle Approval

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up openhands oracle approval by enabling agent confirmation prompts and assigning narrow database roles. This step pauses the AI coding agent before it runs SQL statements against your data. Teams often start by giving the agent a broad role with full write permissions. That shortcut lets an automated agent drop tables or read sensitive rows without a human check. How openhands oracle approval works in native setups OpenHands runs as an autonomous coding agent inside a local or cloud

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

You set up openhands oracle approval by enabling agent confirmation prompts and assigning narrow database roles. This step pauses the AI coding agent before it runs SQL statements against your data. Teams often start by giving the agent a broad role with full write permissions. That shortcut lets an automated agent drop tables or read sensitive rows without a human check.

How openhands oracle approval works in native setups

OpenHands runs as an autonomous coding agent inside a local or cloud container. The agent reads your task, writes code, and runs shell commands or database queries. In a standard setup, you turn on confirmation mode inside the agent settings. This mode forces the agent to pause before it runs any bash command or script. A human engineer must read the proposed command and click approve in the user interface.

On the database side, admins configure an Oracle user account for the agent session. You create a specific role that holds only the permissions needed for the current task. Then you grant select or update rights on single tables rather than the whole schema. The agent uses stored credentials from its container to log in its session with Oracle. When confirmation mode and strict roles work together, the human checks the script before execution.

Why native roles and agent prompts leave gaps

Native agent confirmation prompts and database roles solve the basic problem of blind execution. Database roles stop the agent from touching tables outside its assigned schema. Confirmation mode gives engineers a chance to spot bad scripts before the agent runs them. Still, this native setup still leaves large operational gaps for engineering teams.

First, OpenHands confirmation mode asks for approval at the container command level. If the agent runs a Python script, you only approve the file execution command. You do not see the exact SQL statements hidden inside that script at runtime. Second, static Oracle roles decide who logs in, not what single statements do in flight. Once the session starts, an approved role allows thousands of queries without further human checks. If a table holds emails, phone numbers, or card numbers, the query returns everything. Native roles do not rewrite matched fields in results to hide sensitive data from agents.

Approval Chains & Escalation + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Best practices for safer agent database workflows

Teams can reduce risk by splitting agent tasks into read and write phases. During the debugging phase, assign an Oracle role that only has read permissions. Never store admin keys inside the agent container where a bad prompt could read them. Rotate the database password after the agent finishes its assigned coding ticket.

Engineers should also require query reviews for any statement that alters data or schema structure. Instead of approving whole script files, teams need visibility into each individual SQL query. Keep audit logs of every user who approves an agent action during a session. Clear logs help security teams trace which human approved a specific database change.

Govern statements and responses across databases and APIs

Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.

First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.

Frequently asked questions

Can OpenHands run SQL queries without human review?

Yes, if you run the agent in full autonomous mode with saved database credentials. You must turn on confirmation mode or use external checks to pause queries for review.

How should we scope Oracle roles for an AI coding agent?

Create a dedicated role with select permissions on only the tables needed for the task. Avoid granting broad admin rights or full schema write permissions to automated agent sessions.

Does agent confirmation mode hide sensitive data in query results?

No, confirmation mode only pauses commands before they run in the container. Once you approve a query, the database returns raw emails, phone numbers, and card numbers.

The query runs. The emails stay hidden.