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
98b2961 to
c509961
Compare
Signed-off-by: Jan Pokorný <JenomPokorny@gmail.com>
Signed-off-by: Jan Pokorný <JenomPokorny@gmail.com>
03a3b93 to
8ce7284
Compare
Signed-off-by: Jan Pokorný <JenomPokorny@gmail.com>
|
/gemini review |
|
@claude review |
|
Claude finished @JanPokorny's task in 3m 2s —— View job Code Review
Good overall approach — prebaking the VM image is a meaningful improvement to setup times. The refactoring of CI into a single workflow is also cleaner. Here are the findings, roughly ordered by severity. Bug: WSL image filename mismatch
But And f"https://github.com/i-am-bee/agentstack/releases/download/v{version}/microshift-vm-{arch}.tar.gz"The release workflow would fail to find the file to upload, and users downloading the default URL would get a 404. The build task just needs to output Bug: Platform detection failure mode
.stdout.decode()
.strip()
.splitlines()[0] # IndexError if emptySecurity: No checksum verification on base image download
iso_checksum = "none"Skipping checksum verification on the Debian cloud image means a MITM or CDN compromise could silently inject a malicious base image into all locally built VMs and release artifacts. The Debian project publishes SHA256 checksums alongside their images — worth pinning. Fix this → CI: 10-minute timeout for QEMU VM build is likely insufficient
timeout-minutes: 10Building a full VM image with Packer in 10 minutes requires KVM acceleration. GitHub-hosted Architecture: WSL build is x86_64-only
guestmount -a "./dist/x86_64/microshift-vm-x86_64.qcow2" ...
>./dist/x86_64/microshift-vm-x86_64.wslARM64 Windows (Surface Pro X, Copilot+ PCs) runs WSL2 natively. This is a known limitation and fine to keep as a todo, but worth documenting in a comment. CI:
|
There was a problem hiding this comment.
Code Review
This pull request introduces changes to the setup environment, agentstack-cli, microshift-vm, helm values, mise configuration, and tasks. The changes include adding inputs for installing VM dependencies and maximizing disk space in the setup environment, modifying the agent metadata extraction process in agentstack-cli, updating dependencies and adding lima and wsl image options in agentstack-cli platform commands, and adding a microshift-vm build task. Review comments highlight security concerns with hardcoded passwords and disabled checksum verification, suggest simplifying the .wslconfig file writing logic, and point out a mismatch in the generated file extension for the WSL image. The reviewer also notes that setting raw = true globally in the [settings] section will disable template expansion and cause tasks that rely on templating to fail.
|
@claude fix:
Question: is the root password "packer" retained in the resulting VM image as Gemini claims? If yes, remove the root password in the resulting VM, as Lima uses cloud-init to inject SSH keys. |
|
Claude finished @JanPokorny's task in 4m 25s —— View job Done
Summary of changes (commit
|
- Fix WSL image filename: build outputs .tar.gz (consistent with release.yml and platform.py download URL) - Update --wsl-image CLI help text to explicitly mention .tar.gz format - Add microshift-vm to VSCode workspace definition - Rename local-hostname microshift-builder -> microshift-vm in cloud-init meta-data - Simplify .wslconfig write logic: remove unnecessary io.StringIO indirection - Add SHA512SUMS checksum verification for Debian base image in Packer config - Set generateResolvConf = false in WSL wsl.conf (resolv.conf is managed manually) - Lock root password (passwd -l root) at end of install.sh to prevent packer build password persisting in distributed image Co-authored-by: Jan Pokorný <JanPokorny@users.noreply.github.com>
|
@claude Fix: change |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
Signed-off-by: Jan Pokorný <JenomPokorny@gmail.com>
Summary
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.