Add ExtensionDetails dialog and support install#20845
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 significantly enhances the user experience for managing extensions within the CLI by introducing a dedicated 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
|
|
Size Change: +10.7 kB (+0.04%) Total Size: 26.2 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Code Review
This pull request introduces an ExtensionDetails dialog, displayed when a user selects an extension from the registry list, providing more information and an install button. While the feature is well-implemented, a critical security vulnerability has been identified. The installAction function, now reachable via this new UI, has insufficient validation logic to prevent command injection if a malicious URL is provided. It is recommended to strengthen the validation and ensure safe execution of external commands to address this risk.
| onSelect: (extension) => { | ||
| debugLogger.debug(`Selected extension: ${extension.extensionName}`); | ||
| onSelect: async (extension) => { | ||
| await installAction(context, extension.url); |
There was a problem hiding this comment.
The installAction function, which is now called when an extension is selected in the gallery, contains a flawed validation logic that could lead to command injection.
In installAction (lines 478-489), the code checks for disallowed characters ([;&|'" ]) only if the input is NOT a valid URL. However, a valid URL can still contain these characters (e.g., in the pathname) and remain a valid URL according to the new URL() constructor. For example, https://example.com/repo.git;touch/tmp/pwned is a valid URL but could lead to command execution if passed to a shell command in downstream functions like cloneFromGit.
While the registry is currently a trusted source, this flaw also affects the /extensions install <source> command which takes arbitrary user input. An attacker could trick a user into installing an extension from a malicious URL, leading to remote code execution.
|
I'm seeing compile issues. |
bc5680a to
db4594e
Compare
scidomino
left a comment
There was a problem hiding this comment.
The description says "confirm returned to search page and extension has been installed" but it doesn't return to the search page. I think the description is wrong, not the code.
Summary
Add an extension details view on enter in the /extensions registry and add support for installing extensions
Screen.Recording.2026-03-02.at.6.12.10.PM.mov
Details
Related Issues
Fixes https://github.com/google-gemini/maintainers-gemini-cli/issues/1402
How to Validate
in settings.json:
/extensions explorePre-Merge Checklist