How to Configure Goose MariaDB Approval
You set up a goose mariadb approval flow by pausing AI agent commands until a human checks them. You pair local agent prompts with strict database user roles to keep your tables safe. Many teams start by giving their AI agent a standard developer database key. That broad key lets the agent run any command without a second look. When permissions are too wide, one bad prompt can wipe out live data or leak private rows. How a native goose mariadb approval setup works Goose is an AI agent that ru
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 a goose mariadb approval flow by pausing AI agent commands until a human checks them. You pair local agent prompts with strict database user roles to keep your tables safe. Many teams start by giving their AI agent a standard developer database key. That broad key lets the agent run any command without a second look. When permissions are too wide, one bad prompt can wipe out live data or leak private rows.
How a native goose mariadb approval setup works
Goose is an AI agent that runs local shell commands and talks to external tools. To reach a MariaDB database, the agent uses a local client or a custom tool script. The agent reads your task, writes a SQL statement, and tries to run it. In a basic setup, you turn on the local prompt check inside the agent settings. This native step makes the agent stop and wait for your input in the terminal. You read the proposed SQL text on your screen and type yes or no.
On the database side, admins create a dedicated MariaDB user account just for the agent. They limit this account to read-only grants on a few safe tables. If the agent needs to change data, admins grant write rules only on specific schemas. They also limit which host IP addresses can log in with that database account. This pairs local user checks with basic database grants.
Where native permissions and local prompts fall short
Native database grants and local agent prompts solve the first layer of risk. MariaDB roles stop unknown users from logging in to the server. Local agent prompts stop the AI from running surprise shell commands on a laptop. Together, they keep casual tests from breaking a staging database.
Still, this basic setup leaves a big gap in live operations. MariaDB checks who logs in, not what each query does in flight. Once an account has update or delete grants, the database allows every matching command. It cannot pause a dangerous delete statement to ask a team lead for sign-off. Also, local terminal prompts only ask the person running the agent on that machine. A developer can approve their own risky query by mistake or turn the prompt off.
Approval Chains & Escalation + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Shared keys create another problem for security teams. To run queries, the local machine must hold the raw database password in a file. Anyone with access to that laptop can read the key and log in directly. Native logs also lack clear context because every agent query uses the same database account. Admins cannot tell which team member or prompt triggered a heavy query. Plus, raw query results return straight to the agent context window. If a table holds emails, phone numbers, or card numbers, those fields enter the model history.
What to review before approving agent database queries
Teams need clear rules when they review queries from an AI agent. First, check that every select query includes a strict row limit. An open select on a huge table can slow down the whole database server. Second, look closely at the filter conditions on any update or delete statement. Make sure the query targets a single record ID instead of a whole table. Third, check which columns the query reads from sensitive tables. Even a safe select statement can pull emails, phone numbers, or national IDs into logs. Having a second person review write commands catches mistakes that the person prompting might miss.
Check MySQL queries and results on the wire
MySQL grants control who logs in. They do not check single queries or mask sensitive columns once a session starts. With hoop.dev, you run an open-source proxy, a sidecar for your MySQL. It runs next to MySQL, RDS, or Aurora and reads the MySQL wire protocol.
Multi-statement batches and prepared queries are split and checked one by one by hoop.dev guardrails. When a rule refuses a query, MySQL returns a native error packet with your message. On the response path, hoop.dev data masking rewrites string values in returned rows that match your rules. Every query and decision is logged per resource. See the MIT-licensed project on GitHub.
Frequently asked questions
Can MariaDB pause a single query for human approval on its own?
No, MariaDB checks grants right away and either runs or blocks the statement. It does not have a built-in queue to hold a query for a human check.
Why is a local agent prompt not enough for team compliance?
A local prompt lets the user approve their own request on their own screen. It does not require a peer check or keep a central log of approvals.
How can we keep sensitive columns out of the AI model context?
You can limit column grants in MariaDB or use data masking on query results. Masking rewrites matched fields like emails and card numbers in results before the agent reads them.
Related guides
In this post