fix: use correct --type flag for brev create command#477
Conversation
The --gpu flag is not a valid brev CLI option; replaced with --type to match the current brev CLI API.
📝 WalkthroughWalkthroughThe deploy function in the Brev CLI tool updates the instance creation command, changing the GPU specification flag from Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@bin/nemoclaw.js`:
- Line 130: The command injection risk comes from interpolating untrusted
variables into a shell string in the run(...) call; update the code that invokes
run(`brev create ${name} --type "${gpu}"`) to avoid shell interpolation by using
a safe API that accepts the executable and argument list (e.g., spawn/execFile)
or by validating/whitelisting inputs first; specifically, validate/whitelist gpu
values (e.g., allowed types) and sanitize/validate name (reject or escape
dangerous chars) and then call the subprocess with separate args rather than a
single interpolated string so the shell cannot interpret injected
operators—locate the run invocation in bin/nemoclaw.js and replace it with a
safe argument-based invocation using the validated variables.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 93687f3b-a3c1-40be-8101-3d3169337f70
📒 Files selected for processing (1)
bin/nemoclaw.js
|
✨ Thanks for submitting this PR with a clear fix, it addresses an issue with the brev create command and proposes a fix to improve the Brev platform integration, which could make it easier for users to get started with NemoClaw on Brev. |
|
Thanks for catching this — the |
The --gpu flag is not a valid brev CLI option; replaced with --type to match the current brev CLI API.
Summary
Related Issue
Changes
Type of Change
Testing
make checkpasses.npm testpasses.make docsbuilds without warnings. (for doc-only changes)Checklist
General
Code Changes
make formatapplied (TypeScript and Python).Doc Changes
update-docsagent skill to draft changes while complying with the style guide. For example, prompt your agent with "/update-docscatch up the docs for the new changes I made in this PR."Summary by CodeRabbit