added setting errorVerbosity#20401
Conversation
Summary of ChangesHello @codeafridi, 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 enhances the user experience of the CLI by introducing a configurable error verbosity setting. Users can now choose to see only critical errors in the chat history, reducing visual clutter from transient or recoverable issues, while still having the option to view all feedback for detailed debugging. 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 introduces a new errorVerbosity setting with low and full options to control the detail of feedback messages in the UI. While the implementation across the settings schema and the main AppContainer component correctly filters messages and updates dynamically, a critical security vulnerability has been identified. The new logging paths may leak sensitive information, as raw error objects are logged to the debug logger without redaction, which could expose API keys or other credentials. It is strongly recommended to implement a redaction mechanism for error objects and sanitize feedback messages before logging them to prevent sensitive data exposure, adhering to the principle of defense-in-depth for user-provided data.
packages/cli/src/ui/AppContainer.tsx
Outdated
| debugLogger.warn( | ||
| `[Feedback Details for "${payload.message}"]`, | ||
| payload.error, | ||
| ); |
There was a problem hiding this comment.
The code logs the payload.error object directly to the debug logger. Error objects, especially those originating from network requests or external tools (like MCP servers), often contain sensitive information such as stack traces, environment variables, or credentials (e.g., API keys or tokens in request headers). These logs are written to a file (if GEMINI_DEBUG_LOG_FILE is set), which poses a risk of sensitive information leakage if the log file is shared for troubleshooting or accessed by unauthorized parties. Additionally, embedding payload.message directly into the log string allows for potential Log Injection if the message contains newline characters or format specifiers.
References
- Always treat user-provided data as untrusted and apply proper validation and sanitization at the point of use, even if it is believed to have been filtered or sanitized upstream. This follows the principle of defense-in-depth.
Fixes #20398
I added a new setting errorVerbosity with two options: low and full. In low mode, the chat UI now only shows real errors in the history and quietly hides info/warning “noise” from retries and recoverable tool failures .In full mode, it works like before and shows all feedback messages, so you still have a way to see everything when you’re debugging.