fix(postgres): update execute-sql tool to avoid multi-statements parameter#2707
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refines the behavior of the Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates the description for the execute-sql tool across four prebuilt configuration files to explicitly state that it executes a 'single SQL statement'. The intention is to guide the LLM to use the tool correctly and prevent multi-statement errors. However, this change is purely cosmetic and does not provide any technical enforcement. The underlying Go implementation for the execute_sql tool remains vulnerable to SQL injection via prompt injection, as it passes the SQL string directly to the database driver without validation or parsing. This allows an attacker to manipulate the LLM to execute multiple statements or malicious single statements. Technical controls should be implemented in the Go code to enforce the single-statement restriction.
|
Hi @Matthieu68857 Can you please resolve the conflict before I merge it? Thank you!! |
It is done! |
|
/gcbrun |
|
/gcbrun |
|
/gcbrun |
🤖 I have created a release *beep* *boop* --- ## [0.30.0](v0.29.0...v0.30.0) (2026-03-20) ### Features * **cli:** Add migrate subcommand ([#2679](#2679)) ([12171f7](12171f7)) * **cli:** Add serve subcommand ([#2550](#2550)) ([1e2c7c7](1e2c7c7)) * **skill:** One skill per toolset ([#2733](#2733)) ([5b85c65](5b85c65)) * **source/oracledb:** Add Oracle DB for MCP tools and configurations, updated tools and documentation ([#2625](#2625)) ([e350fc7](e350fc7)) * **tools/looker:** Support git_branch tools for looker. ([#2718](#2718)) ([70ed8a0](70ed8a0)) * **tools/dataplex-search-entries:** Add `scope` support to search_entries tool ([#2740](#2740)) ([10af468](10af468)) ### Bug Fixes * **cloudloggingadmin:** Increase log injesting time and add auth test ([#2772](#2772)) ([50b4457](50b4457)) * **oracle:** Normalize encoded proxy usernames in go-ora DSN ([#2469](#2469)) ([b1333cd](b1333cd)) * **postgres:** Update execute-sql tool to avoid multi-statements parameter ([#2707](#2707)) ([58bc772](58bc772)) * **skills:** Improve flag validation and silence unit test output ([#2759](#2759)) ([f3da6aa](f3da6aa)) * **test:** Address flaky healthcare integration test run ([#2742](#2742)) ([9590821](9590821)) ### Reverts * **ci:** Implement conditional sharding logic in integration tests ([#2763](#2763)) ([1528d7c](1528d7c)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [0.30.0](v0.29.0...v0.30.0) (2026-03-20) ### Features * **cli:** Add migrate subcommand ([#2679](#2679)) ([12171f7](12171f7)) * **cli:** Add serve subcommand ([#2550](#2550)) ([1e2c7c7](1e2c7c7)) * **skill:** One skill per toolset ([#2733](#2733)) ([5b85c65](5b85c65)) * **source/oracledb:** Add Oracle DB for MCP tools and configurations, updated tools and documentation ([#2625](#2625)) ([e350fc7](e350fc7)) * **tools/looker:** Support git_branch tools for looker. ([#2718](#2718)) ([70ed8a0](70ed8a0)) * **tools/dataplex-search-entries:** Add `scope` support to search_entries tool ([#2740](#2740)) ([10af468](10af468)) ### Bug Fixes * **cloudloggingadmin:** Increase log injesting time and add auth test ([#2772](#2772)) ([50b4457](50b4457)) * **oracle:** Normalize encoded proxy usernames in go-ora DSN ([#2469](#2469)) ([b1333cd](b1333cd)) * **postgres:** Update execute-sql tool to avoid multi-statements parameter ([#2707](#2707)) ([58bc772](58bc772)) * **skills:** Improve flag validation and silence unit test output ([#2759](#2759)) ([f3da6aa](f3da6aa)) * **test:** Address flaky healthcare integration test run ([#2742](#2742)) ([9590821](9590821)) ### Reverts * **ci:** Implement conditional sharding logic in integration tests ([#2763](#2763)) ([1528d7c](1528d7c)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> 5ef1c0d
🤖 I have created a release *beep* *boop* --- ## [0.30.0](googleapis/mcp-toolbox@v0.29.0...v0.30.0) (2026-03-20) ### Features * **cli:** Add migrate subcommand ([googleapis#2679](googleapis#2679)) ([12171f7](googleapis@12171f7)) * **cli:** Add serve subcommand ([googleapis#2550](googleapis#2550)) ([1e2c7c7](googleapis@1e2c7c7)) * **skill:** One skill per toolset ([googleapis#2733](googleapis#2733)) ([5b85c65](googleapis@5b85c65)) * **source/oracledb:** Add Oracle DB for MCP tools and configurations, updated tools and documentation ([googleapis#2625](googleapis#2625)) ([e350fc7](googleapis@e350fc7)) * **tools/looker:** Support git_branch tools for looker. ([googleapis#2718](googleapis#2718)) ([70ed8a0](googleapis@70ed8a0)) * **tools/dataplex-search-entries:** Add `scope` support to search_entries tool ([googleapis#2740](googleapis#2740)) ([10af468](googleapis@10af468)) ### Bug Fixes * **cloudloggingadmin:** Increase log injesting time and add auth test ([googleapis#2772](googleapis#2772)) ([50b4457](googleapis@50b4457)) * **oracle:** Normalize encoded proxy usernames in go-ora DSN ([googleapis#2469](googleapis#2469)) ([b1333cd](googleapis@b1333cd)) * **postgres:** Update execute-sql tool to avoid multi-statements parameter ([googleapis#2707](googleapis#2707)) ([58bc772](googleapis@58bc772)) * **skills:** Improve flag validation and silence unit test output ([googleapis#2759](googleapis#2759)) ([f3da6aa](googleapis@f3da6aa)) * **test:** Address flaky healthcare integration test run ([googleapis#2742](googleapis#2742)) ([9590821](googleapis@9590821)) ### Reverts * **ci:** Implement conditional sharding logic in integration tests ([googleapis#2763](googleapis#2763)) ([1528d7c](googleapis@1528d7c)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> 5ef1c0d
🤖 I have created a release *beep* *boop* --- ## [0.30.0](googleapis/mcp-toolbox@v0.29.0...v0.30.0) (2026-03-20) ### Features * **cli:** Add migrate subcommand ([googleapis#2679](googleapis#2679)) ([12171f7](googleapis@12171f7)) * **cli:** Add serve subcommand ([googleapis#2550](googleapis#2550)) ([1e2c7c7](googleapis@1e2c7c7)) * **skill:** One skill per toolset ([googleapis#2733](googleapis#2733)) ([5b85c65](googleapis@5b85c65)) * **source/oracledb:** Add Oracle DB for MCP tools and configurations, updated tools and documentation ([googleapis#2625](googleapis#2625)) ([e350fc7](googleapis@e350fc7)) * **tools/looker:** Support git_branch tools for looker. ([googleapis#2718](googleapis#2718)) ([70ed8a0](googleapis@70ed8a0)) * **tools/dataplex-search-entries:** Add `scope` support to search_entries tool ([googleapis#2740](googleapis#2740)) ([10af468](googleapis@10af468)) ### Bug Fixes * **cloudloggingadmin:** Increase log injesting time and add auth test ([googleapis#2772](googleapis#2772)) ([50b4457](googleapis@50b4457)) * **oracle:** Normalize encoded proxy usernames in go-ora DSN ([googleapis#2469](googleapis#2469)) ([b1333cd](googleapis@b1333cd)) * **postgres:** Update execute-sql tool to avoid multi-statements parameter ([googleapis#2707](googleapis#2707)) ([58bc772](googleapis@58bc772)) * **skills:** Improve flag validation and silence unit test output ([googleapis#2759](googleapis#2759)) ([f3da6aa](googleapis@f3da6aa)) * **test:** Address flaky healthcare integration test run ([googleapis#2742](googleapis#2742)) ([9590821](googleapis@9590821)) ### Reverts * **ci:** Implement conditional sharding logic in integration tests ([googleapis#2763](googleapis#2763)) ([1528d7c](googleapis@1528d7c)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> 5ef1c0d
🤖 I have created a release *beep* *boop* --- ## [0.30.0](googleapis/mcp-toolbox@v0.29.0...v0.30.0) (2026-03-20) ### Features * **cli:** Add migrate subcommand ([googleapis#2679](googleapis#2679)) ([12171f7](googleapis@12171f7)) * **cli:** Add serve subcommand ([googleapis#2550](googleapis#2550)) ([1e2c7c7](googleapis@1e2c7c7)) * **skill:** One skill per toolset ([googleapis#2733](googleapis#2733)) ([5b85c65](googleapis@5b85c65)) * **source/oracledb:** Add Oracle DB for MCP tools and configurations, updated tools and documentation ([googleapis#2625](googleapis#2625)) ([e350fc7](googleapis@e350fc7)) * **tools/looker:** Support git_branch tools for looker. ([googleapis#2718](googleapis#2718)) ([70ed8a0](googleapis@70ed8a0)) * **tools/dataplex-search-entries:** Add `scope` support to search_entries tool ([googleapis#2740](googleapis#2740)) ([10af468](googleapis@10af468)) ### Bug Fixes * **cloudloggingadmin:** Increase log injesting time and add auth test ([googleapis#2772](googleapis#2772)) ([50b4457](googleapis@50b4457)) * **oracle:** Normalize encoded proxy usernames in go-ora DSN ([googleapis#2469](googleapis#2469)) ([b1333cd](googleapis@b1333cd)) * **postgres:** Update execute-sql tool to avoid multi-statements parameter ([googleapis#2707](googleapis#2707)) ([58bc772](googleapis@58bc772)) * **skills:** Improve flag validation and silence unit test output ([googleapis#2759](googleapis#2759)) ([f3da6aa](googleapis@f3da6aa)) * **test:** Address flaky healthcare integration test run ([googleapis#2742](googleapis#2742)) ([9590821](googleapis@9590821)) ### Reverts * **ci:** Implement conditional sharding logic in integration tests ([googleapis#2763](googleapis#2763)) ([1528d7c](googleapis@1528d7c)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> 5ef1c0d
🤖 I have created a release *beep* *boop* --- ## [0.30.0](googleapis/mcp-toolbox@v0.29.0...v0.30.0) (2026-03-20) ### Features * **cli:** Add migrate subcommand ([googleapis#2679](googleapis#2679)) ([12171f7](googleapis@12171f7)) * **cli:** Add serve subcommand ([googleapis#2550](googleapis#2550)) ([1e2c7c7](googleapis@1e2c7c7)) * **skill:** One skill per toolset ([googleapis#2733](googleapis#2733)) ([5b85c65](googleapis@5b85c65)) * **source/oracledb:** Add Oracle DB for MCP tools and configurations, updated tools and documentation ([googleapis#2625](googleapis#2625)) ([e350fc7](googleapis@e350fc7)) * **tools/looker:** Support git_branch tools for looker. ([googleapis#2718](googleapis#2718)) ([70ed8a0](googleapis@70ed8a0)) * **tools/dataplex-search-entries:** Add `scope` support to search_entries tool ([googleapis#2740](googleapis#2740)) ([10af468](googleapis@10af468)) ### Bug Fixes * **cloudloggingadmin:** Increase log injesting time and add auth test ([googleapis#2772](googleapis#2772)) ([50b4457](googleapis@50b4457)) * **oracle:** Normalize encoded proxy usernames in go-ora DSN ([googleapis#2469](googleapis#2469)) ([b1333cd](googleapis@b1333cd)) * **postgres:** Update execute-sql tool to avoid multi-statements parameter ([googleapis#2707](googleapis#2707)) ([58bc772](googleapis@58bc772)) * **skills:** Improve flag validation and silence unit test output ([googleapis#2759](googleapis#2759)) ([f3da6aa](googleapis@f3da6aa)) * **test:** Address flaky healthcare integration test run ([googleapis#2742](googleapis#2742)) ([9590821](googleapis@9590821)) ### Reverts * **ci:** Implement conditional sharding logic in integration tests ([googleapis#2763](googleapis#2763)) ([1528d7c](googleapis@1528d7c)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> 5ef1c0d
🤖 I have created a release *beep* *boop* --- ## [0.30.0](googleapis/mcp-toolbox@v0.29.0...v0.30.0) (2026-03-20) ### Features * **cli:** Add migrate subcommand ([googleapis#2679](googleapis#2679)) ([12171f7](googleapis@12171f7)) * **cli:** Add serve subcommand ([googleapis#2550](googleapis#2550)) ([1e2c7c7](googleapis@1e2c7c7)) * **skill:** One skill per toolset ([googleapis#2733](googleapis#2733)) ([5b85c65](googleapis@5b85c65)) * **source/oracledb:** Add Oracle DB for MCP tools and configurations, updated tools and documentation ([googleapis#2625](googleapis#2625)) ([e350fc7](googleapis@e350fc7)) * **tools/looker:** Support git_branch tools for looker. ([googleapis#2718](googleapis#2718)) ([70ed8a0](googleapis@70ed8a0)) * **tools/dataplex-search-entries:** Add `scope` support to search_entries tool ([googleapis#2740](googleapis#2740)) ([10af468](googleapis@10af468)) ### Bug Fixes * **cloudloggingadmin:** Increase log injesting time and add auth test ([googleapis#2772](googleapis#2772)) ([50b4457](googleapis@50b4457)) * **oracle:** Normalize encoded proxy usernames in go-ora DSN ([googleapis#2469](googleapis#2469)) ([b1333cd](googleapis@b1333cd)) * **postgres:** Update execute-sql tool to avoid multi-statements parameter ([googleapis#2707](googleapis#2707)) ([58bc772](googleapis@58bc772)) * **skills:** Improve flag validation and silence unit test output ([googleapis#2759](googleapis#2759)) ([f3da6aa](googleapis@f3da6aa)) * **test:** Address flaky healthcare integration test run ([googleapis#2742](googleapis#2742)) ([9590821](googleapis@9590821)) ### Reverts * **ci:** Implement conditional sharding logic in integration tests ([googleapis#2763](googleapis#2763)) ([1528d7c](googleapis@1528d7c)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> 5ef1c0d
🤖 I have created a release *beep* *boop* --- ## [0.30.0](googleapis/mcp-toolbox@v0.29.0...v0.30.0) (2026-03-20) ### Features * **cli:** Add migrate subcommand ([googleapis#2679](googleapis#2679)) ([12171f7](googleapis@12171f7)) * **cli:** Add serve subcommand ([googleapis#2550](googleapis#2550)) ([1e2c7c7](googleapis@1e2c7c7)) * **skill:** One skill per toolset ([googleapis#2733](googleapis#2733)) ([5b85c65](googleapis@5b85c65)) * **source/oracledb:** Add Oracle DB for MCP tools and configurations, updated tools and documentation ([googleapis#2625](googleapis#2625)) ([e350fc7](googleapis@e350fc7)) * **tools/looker:** Support git_branch tools for looker. ([googleapis#2718](googleapis#2718)) ([70ed8a0](googleapis@70ed8a0)) * **tools/dataplex-search-entries:** Add `scope` support to search_entries tool ([googleapis#2740](googleapis#2740)) ([10af468](googleapis@10af468)) ### Bug Fixes * **cloudloggingadmin:** Increase log injesting time and add auth test ([googleapis#2772](googleapis#2772)) ([50b4457](googleapis@50b4457)) * **oracle:** Normalize encoded proxy usernames in go-ora DSN ([googleapis#2469](googleapis#2469)) ([b1333cd](googleapis@b1333cd)) * **postgres:** Update execute-sql tool to avoid multi-statements parameter ([googleapis#2707](googleapis#2707)) ([58bc772](googleapis@58bc772)) * **skills:** Improve flag validation and silence unit test output ([googleapis#2759](googleapis#2759)) ([f3da6aa](googleapis@f3da6aa)) * **test:** Address flaky healthcare integration test run ([googleapis#2742](googleapis#2742)) ([9590821](googleapis@9590821)) ### Reverts * **ci:** Implement conditional sharding logic in integration tests ([googleapis#2763](googleapis#2763)) ([1528d7c](googleapis@1528d7c)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> 5ef1c0d
…meter (googleapis#2707) ## Description This PR updates the `execute-sql` tool to avoid multi-statement execution parameters. ## PR Checklist - [x] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) - [ ] Make sure to add `!` if this involve a breaking change Co-authored-by: Averi Kitsch <akitsch@google.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [0.30.0](googleapis/mcp-toolbox@v0.29.0...v0.30.0) (2026-03-20) ### Features * **cli:** Add migrate subcommand ([googleapis#2679](googleapis#2679)) ([12171f7](googleapis@12171f7)) * **cli:** Add serve subcommand ([googleapis#2550](googleapis#2550)) ([1e2c7c7](googleapis@1e2c7c7)) * **skill:** One skill per toolset ([googleapis#2733](googleapis#2733)) ([5b85c65](googleapis@5b85c65)) * **source/oracledb:** Add Oracle DB for MCP tools and configurations, updated tools and documentation ([googleapis#2625](googleapis#2625)) ([e350fc7](googleapis@e350fc7)) * **tools/looker:** Support git_branch tools for looker. ([googleapis#2718](googleapis#2718)) ([70ed8a0](googleapis@70ed8a0)) * **tools/dataplex-search-entries:** Add `scope` support to search_entries tool ([googleapis#2740](googleapis#2740)) ([10af468](googleapis@10af468)) ### Bug Fixes * **cloudloggingadmin:** Increase log injesting time and add auth test ([googleapis#2772](googleapis#2772)) ([50b4457](googleapis@50b4457)) * **oracle:** Normalize encoded proxy usernames in go-ora DSN ([googleapis#2469](googleapis#2469)) ([b1333cd](googleapis@b1333cd)) * **postgres:** Update execute-sql tool to avoid multi-statements parameter ([googleapis#2707](googleapis#2707)) ([58bc772](googleapis@58bc772)) * **skills:** Improve flag validation and silence unit test output ([googleapis#2759](googleapis#2759)) ([f3da6aa](googleapis@f3da6aa)) * **test:** Address flaky healthcare integration test run ([googleapis#2742](googleapis#2742)) ([9590821](googleapis@9590821)) ### Reverts * **ci:** Implement conditional sharding logic in integration tests ([googleapis#2763](googleapis#2763)) ([1528d7c](googleapis@1528d7c)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com>
Description
This PR updates the
execute-sqltool to avoid multi-statement execution parameters.PR Checklist
!if this involve a breaking change