Security FAQ
These controls limit what DBGorilla, and engineers using DBGorilla, can do to a production database. They cover the collector, the MCP integration, natural-language queries and the CI review bot on GitHub and GitLab. The current status of each control is in the Control status table.
Summary
Section titled “Summary”- DBGorilla has no direct network path to your database. Everything goes through the collector, which runs in your network, connects with a read-only role you create, and makes outbound connections only.
- The agents interact with your database only through a fixed set of tools. None of those tools
can write to your database. One,
run_experiment, runs code with full rights on a temporary clone that holds your schema and optimizer statistics but no rows. - You can turn off command execution entirely from the collector config, in your infrastructure, and DBGorilla cannot turn it back on.
- Anything DBGorilla proposes is a recommendation. A person still reviews and applies every change.
Collector
Section titled “Collector”What does the collector connect as?
Section titled “What does the collector connect as?”The collector connects with a dedicated read-only database role that you create and control. The
grants are pg_monitor, plus USAGE and SELECT on the schemas you want captured, which is the
same class of access a database monitoring agent already has in most environments. The collector cannot escalate
beyond the privileges of that role. The exact grants are in
Prepare PostgreSQL.
What does the collector read, and what load does it add?
Section titled “What does the collector read, and what load does it add?”Host, network, storage and I/O metrics, query statistics from pg_stat_statements, topology and
schema. The additional load on the instance is negligible; in most environments it reads the same
statistics that existing monitoring already reads.
Can the agent write to my database through the collector?
Section titled “Can the agent write to my database through the collector?”No. The agent only interacts with your database through tools, and none of the tools it has can write. There is no tool for arbitrary SQL, no tool for DDL, and no tool that modifies or removes data. The collector is the single choke point for everything DBGorilla reads or runs, and it is entirely under your control.
Can command execution be disabled entirely?
Section titled “Can command execution be disabled entirely?”Yes. The [commands] block in collector.toml is optional and lives in your infrastructure. With
commands off, the collector will not execute any command on your behalf: the agents are limited
to the metrics and metadata the collector reports. When commands are on, they permit three
read-oriented operations:
explain: plan-onlyEXPLAIN. The query is never executed.execute_query: a singleSELECTin a read-only transaction that is always rolled back, capped at 1,000 rows with a 30-second statement timeout.collect_statistics: captures optimizer statistics for named tables, and no table rows. On PostgreSQL the statistics include each column’s most common values and histogram boundaries, which are values from your data, and code run in an experiment can read them.
enabled is the default for components that do not decide for themselves. A [[component]]
carrying its own commands list uses that list and ignores the switch, in both directions, so to
turn commands off everywhere set enabled = false and leave commands unset on every component.
Commands can also be restricted rather than removed, with allowed = ["explain"]. In every case,
anything that runs is bounded by the privileges of the read-only role.
Natural-language queries depend on this. The feature generates SQL but cannot run it, so with
commands off it has nothing to execute against and nothing to validate against. It also has a
switch of its own, feature.ask_data_enabled, which your administrator can change at any time
without a redeploy.
What network access does the collector need?
Section titled “What network access does the collector need?”Outbound to otlp.dbgorilla.com and auth.dbgorilla.com on port 443, and no other destinations.
Every connection the collector makes is outbound. It also listens on port 4318, for an intake it
uses internally. It binds that port on every network interface of its container or pod and accepts
data there without authentication, so do not publish the port, and on Kubernetes restrict it with a
NetworkPolicy. Connections to your database use the TLS mode set in ssl_mode; verify-full is
the recommended mode.
IDE and MCP integration
Section titled “IDE and MCP integration”Can an agent in my IDE run arbitrary SQL against my database?
Section titled “Can an agent in my IDE run arbitrary SQL against my database?”No. No raw SQL tool is exposed over MCP. Agents in your IDE cannot compose and execute arbitrary statements against your database through the integration.
What does the agent receive?
Section titled “What does the agent receive?”Context only: query performance data, index usage, run frequency, topology and schema. An
experiment on PostgreSQL can also return the optimizer statistics collect_statistics copied, which
include values from your data. This
removes the need for an engineer to run EXPLAIN ANALYZE against the primary on an agent’s behalf.
Can DBGorilla run EXPLAIN ANALYZE on production?
Section titled “Can DBGorilla run EXPLAIN ANALYZE on production?”No. DBGorilla SaaS runs plan-only EXPLAIN through the collector, and only when you have enabled
[commands]. EXPLAIN ANALYZE executes the query, and DBGorilla does not do that against your
database.
How are MCP keys and API keys scoped?
Section titled “How are MCP keys and API keys scoped?”MCP keys are scoped to a single user. Each user has one MCP key at a time; it is shown in the app, and regenerating or deleting it there revokes the previous one immediately. API keys are scoped to a single tenant. Both are encrypted at rest.
Do you support OAuth?
Section titled “Do you support OAuth?”Yes. Clients that support it, such as Claude Desktop connectors, authenticate to the DBGorilla MCP server with OAuth rather than a bearer key. Other clients use a per-user bearer key.
Natural-language queries
Section titled “Natural-language queries”This path is typically used by analysts to query production data that has not yet reached the warehouse. Three controls apply before a query runs, and a fourth disables the path entirely:
- The generated query is shown for preview before it executes.
- The collector runs the statement in a read-only session, so the database refuses anything
that would modify or remove data. A second statement after a semicolon is rejected. On
MySQL the read-only session does not stop DDL: a login granted
CREATEcan create a table this way, and it is kept. The grants on the login are what stop it. - Results are capped at 1,000 rows and a 30-second statement timeout, enforced at the collector.
- Turning commands off everywhere in the collector config disables natural-language queries entirely.
CI review bot
Section titled “CI review bot”What can the bot do to my repository?
Section titled “What can the bot do to my repository?”It reviews pull requests and merge requests and posts comments. It does not apply changes to any database. Its findings are advisory.
A person can also ask for a pull request from a recommendation. On an open recommendation, every
built-in role, Developer included, sees a Generate a PR button. The button stays disabled until
a GitHub repository is linked to the database, as described in
Link the repository to its database.
The DBGorilla GitHub App opens the pull request on a new branch, as dbgorilla[bot], and leaves it
for a person to merge. DBGorilla does not merge it. See
Generate a PR.
What does DBGorilla keep from my GitLab?
Section titled “What does DBGorilla keep from my GitLab?”Two tokens that belong to a bot user: one that posts the review, and a read-only one that reads the projects you turn on. Both are encrypted at rest. DBGorilla refuses a token that belongs to a person, so reviews are never posted as a teammate. The Maintainer token that adds a project’s webhook is used for that one request and never stored.
Webhook deliveries are verified before DBGorilla acts on them, with a signature on GitLab versions that sign webhooks and with a per-project secret otherwise. See Set up on GitLab.
Recommendations and where workloads run
Section titled “Recommendations and where workloads run”Are recommendations tested before I see them?
Section titled “Are recommendations tested before I see them?”Not always. When your collector allows collect_statistics, which every sample config does, a
change can be tested in an experiment before it reaches you. The experiment runs on an empty,
version-matched copy of your schema with your real optimizer statistics restored, in DBGorilla
infrastructure, at our cost, not against your production instance. A recommendation that was
tested cites the result in its evidence. Nothing requires the test: configuration and auditing
changes, for example, reach you without one, and so does any recommendation an agent creates
through the create_recommendation tool.
collect_statistics copies those statistics and no table rows. On PostgreSQL the statistics
include each column’s most common values and histogram boundaries, which are values from your data.
Without it, recommendations reach you without that test.
Data handling
Section titled “Data handling”What does the model layer see?
Section titled “What does the model layer see?”Metadata, schema and query patterns. Table rows are not sent to the model layer and are not written to
logs. When an experiment runs on PostgreSQL, the model layer can also read the optimizer
statistics collect_statistics copied, and those include each column’s most common values and
histogram boundaries.
Is my data used to train models?
Section titled “Is my data used to train models?”No. Customer data is never used to train models.
Control status
Section titled “Control status”| Control | Status |
|---|---|
| Collector connects read-only, with permissions equivalent to a database monitoring agent | Enforced today |
| DBGorilla has no direct network path to your database; every connection the collector makes is outbound | Enforced today. The collector listens on port 4318 inside its container or pod, without authentication; keep that port unreachable. |
Command execution can be turned off from the collector config, in your infrastructure, by setting enabled = false and leaving commands unset on every component | Enforced today |
| No raw SQL tool exposed over MCP | Enforced today |
EXPLAIN is plan-only; EXPLAIN ANALYZE is not run | Enforced today |
| Generated statements run in a read-only session, one statement per request | Enforced today. On MySQL, DDL is stopped only by the login’s grants. |
| Query preview before a generated query executes | Enforced today |
| Row-count limit (1,000) and 30-second timeout on natural-language query results | Enforced at the collector. Not yet configurable in the application. |
| Recommendations validated in an experiment, on a copy of your schema with no rows, before they are surfaced | Available when the collector allows collect_statistics, which every sample config does. Not enforced: a recommendation can be surfaced without an experiment. |
| MCP keys scoped to a single user; API keys scoped to a single tenant; both encrypted at rest | Enforced today |
| OAuth authentication for MCP clients that support it | Available today |
| CI review bot posts review comments and applies no changes to any database | Enforced today |
| Generate a PR on a recommendation, for a GitHub repository linked to the database | Available today to every built-in role. Disabled until a repository is linked. The DBGorilla GitHub App opens the pull request and leaves it for a person to merge. |
| GitLab bot and read-only tokens encrypted at rest; tokens belonging to a person refused; Maintainer token never stored | Enforced today |
| Audit log, with export | Available today on Business and Enterprise plans. |
| Single sign-on (SAML / OIDC) | Available today on Business and Enterprise plans. SCIM and custom roles on Enterprise. |
Contact
Section titled “Contact”Security questions, vulnerability disclosures and requests for further review: security@dbgorilla.com.