docs: Add page standardization to external tool integrations#2667
docs: Add page standardization to external tool integrations#2667dishaprakash wants to merge 0 commit intopage-standardizationfrom
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Link Resolution NoteLocal links and directory changes work differently on GitHub than on the docsite. You must ensure fixes pass the GitHub check and also work with Summary
Errors per inputErrors in DEVELOPER.md
Errors in docs/en/build-with-mcp-toolbox/alloydb/mcp_quickstart.mdErrors in docs/en/build-with-mcp-toolbox/bigquery/local_quickstart.mdErrors in docs/en/build-with-mcp-toolbox/looker/looker_gemini_oauth/_index.mdErrors in docs/en/integrations/alloydb-admin/alloydb-create-cluster.md
Errors in docs/en/integrations/alloydb-admin/alloydb-create-instance.md
Errors in docs/en/integrations/alloydb-admin/alloydb-create-user.md
Errors in docs/en/integrations/alloydb/alloydb-ai-nl.mdErrors in docs/en/integrations/bigquery/bigquery-sql.mdErrors in docs/en/integrations/bigtable/_index.mdErrors in docs/en/integrations/bigtable/bigtable-sql.mdErrors in docs/en/integrations/cloud-sql-admin/cloudsqlcloneinstance.mdErrors in docs/en/integrations/cloud-sql-admin/cloudsqlcreatebackup.mdErrors in docs/en/integrations/cloud-sql-pg/_index.mdErrors in docs/en/integrations/cloudhealthcare/_index.mdErrors in docs/en/integrations/cloudloggingadmin/_index.mdErrors in docs/en/integrations/cloudmonitoring/_index.mdErrors in docs/en/integrations/dataplex/_index.mdErrors in docs/en/integrations/firestore/_index.mdErrors in docs/en/integrations/looker/_index.mdErrors in docs/en/integrations/redis/_index.mdErrors in docs/en/integrations/serverless-spark/_index.mdErrors in docs/en/integrations/serverless-spark/serverless-spark-create-pyspark-batch.mdErrors in docs/en/integrations/spanner/_index.mdErrors in docs/en/integrations/valkey/_index.mdErrors in docs/en/user-guide/connect-to/client-sdks/javascript-sdk/core/index.md
Errors in docs/en/user-guide/connect-to/client-sdks/python-sdk/langchain/index.mdErrors in docs/en/user-guide/connect-to/client-sdks/python-sdk/llamaindex/index.mdErrors in docs/en/user-guide/connect-to/ides/alloydb_pg_admin_mcp.mdErrors in docs/en/user-guide/connect-to/ides/alloydb_pg_mcp.mdErrors in docs/en/user-guide/connect-to/ides/bigquery_mcp.mdErrors in docs/en/user-guide/connect-to/ides/cloud_sql_mssql_mcp.mdErrors in docs/en/user-guide/connect-to/ides/cloud_sql_pg_mcp.mdErrors in docs/en/user-guide/connect-to/ides/firestore_mcp.mdErrors in docs/en/user-guide/connect-to/ides/spanner_mcp.mdErrors in docs/en/user-guide/connect-to/mcp-client/_index.md
Errors in docs/en/user-guide/monitoring/telemetry/index.md |
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 significantly improves the consistency and maintainability of the documentation for external tool integrations by enforcing a standardized page structure and introducing an automated linting process. It also enhances the Oracle SQL tool with a new read-only flag for better control over database operations, alongside routine dependency updates. Highlights
Changelog
Ignored Files
Activity
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
|
53cd203 to
435acc6
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces a commendable standardization for tool documentation pages, including a new linting script to enforce the structure, and updates across numerous documentation files to improve consistency. However, the oracle-execute-sql tool, despite a new readOnly configuration option, still presents a significant security concern due to potential SQL injection vulnerabilities from a lack of parameterization and insecure logging of sensitive SQL queries. Additionally, the feature enhancement for the oracle-execute-sql tool, while improving security, falls outside the PR's stated scope of documentation and should ideally be handled in a separate, feature-focused pull request.
I am having trouble creating individual review comments. Click here to see my feedback.
internal/tools/oracle/oracleexecutesql/oracleexecutesql.go (106)
The tool executes an arbitrary SQL string provided as a parameter (sqlParam) without any form of parameterization or sanitization. While the tool is designed to execute SQL, the lack of a mechanism to pass parameters separately from the SQL template encourages insecure coding practices in the caller (e.g., an LLM or another service) and makes it vulnerable to SQL injection if the query is constructed by concatenating untrusted input. Update the tool's interface to accept both a SQL template and a set of parameters. Pass these parameters to the source.RunSQL method instead of passing nil. This allows callers to use parameterized queries, which is the standard defense against SQL injection.
internal/tools/oracle/oracleexecutesql/oracleexecutesql.go (99)
The tool logs the entire SQL query at the Debug level. If the SQL query contains sensitive data (e.g., passwords, PII, or API keys in INSERT or UPDATE statements), this information will be written to the logs in plain text. Avoid logging the entire SQL query, or implement a masking mechanism to redact sensitive information before logging. Alternatively, log only the fact that a query was executed without including the query string itself.
internal/tools/oracle/oracleexecutesql/oracleexecutesql.go (40-47)
The introduction of the readOnly field is a good security enhancement, making the tool's behavior consistent with other SQL tools in the project. However, there are a couple of issues with this change:
- Missing Documentation: The documentation for this tool in
docs/en/integrations/oracle/oracle-execute-sql.mdhas not been updated to reflect this new configuration option. Please update the documentation to include details about thereadOnlyfield, its default value (true), and how to set it tofalsefor write operations. - Breaking Change: Changing the default behavior to be read-only is a breaking change for any existing configurations that use this tool for write operations. According to the repository's contribution guidelines, breaking changes should be clearly marked. Please update the PR title and commit messages to indicate a breaking change (e.g., using
feat(oracle)!:).
Description
This PR adds page standardization rules for the tool pages.
The proposed standard for tool pages is:
Frontmatter title must end with "Tool"
#H1 heading as title acts as the heading## About(Required)## Compatible Sources(Optional)## Requirements(Optional)## Parameters(Optional)## Example(Required)## Output Format(Optional)## Reference(Optional)## Advanced Usage(Optional)## Troubleshooting(Optional)## Additional Resources(Optional)This structure was chosen as the tools page vary widely between integrations
If the
## Compatible Sourcesheading is used, the {{< compatible-sources >}} shortcode must be placed directly beneath it.The existing lint-docs.yml GHA Workflow is updated to conduct this CI check alongside the source pages.
PR Checklist
CONTRIBUTING.md
bug/issue
before writing your code! That way we can discuss the change, evaluate
designs, and agree on the general idea
!if this involve a breaking change🛠️ Fixes #<issue_number_goes_here>