Fix error when launching with arbitrary working dir#604
Fix error when launching with arbitrary working dir#604fzyzcjy wants to merge 2 commits intoworktree/ac8330from
Conversation
Summary of ChangesHello @fzyzcjy, 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 addresses issues related to script execution when the application is launched from a working directory other than the repository root. By explicitly defining script paths relative to the repository base and ensuring training scripts use absolute paths, it enhances the robustness and reliability of various utility functions, preventing 'file not found' errors in diverse execution environments. 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 addresses an issue with launching scripts from arbitrary working directories by converting relative script paths to absolute paths, correctly using a repo_base_dir for prefixing. However, a high-severity command injection vulnerability was identified in the fp8_cast_bf16 function within miles/utils/external_utils/command_utils.py, stemming from direct interpolation of user-supplied paths into a shell command string. This pattern of shell command construction remains a concern throughout the utility module. Additionally, suggestions have been made to improve path joining logic for better cross-platform compatibility by utilizing pathlib's features instead of string formatting.
No description provided.