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 introduces a significant enhancement to the Agent Stack platform by enabling the use of prebaked VM images for both Lima and WSL environments. This change aims to drastically reduce the initial setup and startup time of the platform by providing images with Microshift, Helm, and other essential components already installed. The Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
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
|
There was a problem hiding this comment.
Code Review
This pull request introduces a significant improvement by adding support for pre-baked platform VM images, aiming to drastically reduce startup times through a new build process and updates to the platform start command. However, it also introduces several critical security vulnerabilities in the platform.py command, including a command injection vulnerability when importing images, multiple path traversal vulnerabilities via the vm_name parameter that could allow overwriting arbitrary files on the host, and the hardcoding of several default credentials and an encryption key. Additionally, there are functional issues such as a potential bug in platform.py where the service enabling logic for k3s incorrectly assumes crio is present, an inconsistency in provision.sh with a hardcoded Helm version instead of using the variable defined in build.sh, and a fragile architecture detection mechanism in tasks.toml. Addressing these security and functional concerns is crucial before merging.
4dda19f to
a759978
Compare
6a4fe58 to
38c8088
Compare
Signed-off-by: Jan Pokorný <JenomPokorny@gmail.com>
98b2961 to
c509961
Compare
Signed-off-by: Jan Pokorný <JenomPokorny@gmail.com>
Signed-off-by: Jan Pokorný <JenomPokorny@gmail.com>
| name: Build WSL image | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 30 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: ./.github/actions/setup | ||
| with: | ||
| install_vm_deps: 'build' | ||
| maximize_space: 'true' | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Install libguestfs-tools | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y libguestfs-tools | ||
| sudo chmod +r /boot/vmlinuz-* | ||
|
|
||
| - name: Build WSL image | ||
| run: mise run microshift-vm:build:wsl | ||
| env: | ||
| LIBGUESTFS_BACKEND: direct | ||
|
|
||
| - name: Upload WSL artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: microshift-vm-wsl | ||
| path: apps/microshift-vm/dist/x86_64/*.wsl | ||
| if-no-files-found: error |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 17 hours ago
In general, the fix is to explicitly set permissions at the workflow or job level so that the GITHUB_TOKEN has only the minimal scopes required. When in doubt, start with contents: read at the job (or workflow) level and add more granular write permissions only if the job needs them.
For this specific workflow, the build-wsl job checks out the repository, installs packages, builds a WSL image, and uploads an artifact. None of these steps require write access to repository contents, PRs, or issues. Therefore, adding permissions: contents: read to the build-wsl job is sufficient and should not change existing functionality. Concretely, in .github/workflows/microshift-vm-wsl.yml, add a permissions block under build-wsl: (same indentation as name: and runs-on:) so that the job’s token is restricted to read-only access to repository contents.
| @@ -7,6 +7,8 @@ | ||
| build-wsl: | ||
| name: Build WSL image | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| timeout-minutes: 30 | ||
| steps: | ||
| - uses: actions/checkout@v4 |
Signed-off-by: Jan Pokorný <JenomPokorny@gmail.com>
Signed-off-by: Jan Pokorný <JenomPokorny@gmail.com>
Summary
Linked Issues
Documentation
If this PR adds new feature or changes existing. Make sure documentation is adjusted accordingly. If the docs is not needed, please explain why.