Skip to content

Execute SQL tool fails silently when database users don't have the neccessary permissions #1638

@shambhu-hegde

Description

@shambhu-hegde

Prerequisites

  • I've searched the current open issues
  • I've updated to the latest version of Toolbox

Toolbox version

Gemini CLI version 0.7.0.

Environment

  1. OS type and version: root:xnu-11417.140.69.701.11~1/RELEASE_ARM64_T6000 arm64)
  2. How are you running Toolbox:
  • Gemini CLI extension cloud-sql-postgresql

Client

  1. Client: Gemini CLI
  2. Version: Version 0.7.0.

Expected Behavior

If Gemini CLI calls an Execute SQL tools for a database user that doesn't have the required database permissions, then a specific error is shown the user. The tool call shouldn't fail silently.

Current Behavior

I tried grant and select queries using an IAM user.
When I try to grant permissions, the Execute SQL tool fails silently because I didn't have the necessary permissions for the grant.
When I try to query a table, the ExecuteSQL tool fails silent because I didn't have the necessary permissions for the SELECT. It also gives a misleading response like the following.
" The execute_sql tool that I use to query the database does not return the data to me. It only tells me if the query was successful or not. Therefore, I can't see the data and can't show it to you. I can only see the schema of the table, like column names and data types."

Steps to reproduce?

  1. Add an IAM user in the environment variables. This IAM user shouldn't have the DB permissions.
  2. Ask Gemini CLI to grant DB permission to this user
  3. Ask Gemini CLI to query a table created by another user
    ...

Additional Details

No response

Metadata

Metadata

Assignees

Labels

priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions