You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(runtime): support Node.js 25 for remote setup and development - #546
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
📜 Recent review details
⏰ Context from checks skipped due to timeout: 2
GitHub Check: Check ubuntu-22.04
GitHub Check: Check windows-latest
🧰 Additional context used
🪛 ast-grep (0.45.3)
crates/updater/src/ssh/tests.rs
[error] 37-38: Passing non-literal (user-controlled or interpolated) data to a shell invoked via std::process::Command::new("sh"|"bash"|...) with -c allows command injection. Avoid spawning a shell: pass the program and each argument separately to Command::new(program).arg(arg) so the OS never re-parses the string, or strictly allowlist/escape any value that must reach a shell.
Context: Command::new("/bin/sh")
.args(["-c", &format!("{mocks}{}", script(&r).unwrap())])
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Comment @coderabbitai help to get the list of available commands.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #545
问题与改动
Homebrew Node.js 25.4.0 能被远端登录 shell 正确找到,但 SSH 安装器的版本白名单只允许 22.19+(22.x)和 24.x,导致远程服务安装以错误码 55 退出。本 PR 增加明确的 25.x 支持;22.x 的最低版本和其他 major 的拒绝行为保持不变。
验证
在 macOS arm64、独立 Node.js 25.4.0 环境中执行:
cargo test --locked -p codexhost-updater:23 个测试通过。cargo clippy --locked -p codexhost-updater --all-targets -- -D warnings:通过。cargo fmt --all --check:通过。npm run build:typescript、npm run build:renderer:通过。npx vitest run --config tests/vitest.config.js tools/dev-desktop/run.test.mjs packages/renderer-extension/test/settings/remote-failure-messages.test.ts:28 个测试通过。npx vitest run --config tests/vitest.config.js tests/release/npm-package.test.mjs:38 个测试通过。git diff --check和提交钩子:通过。实机:codexhost 0.13.2 的本地安装器加入相同的 Node 25 放行条件后,远端 Homebrew Node.js 25.4.0 的
codexhost remote status显示state: ready、runtime.state: running、runtime.protocol: codexhost、issues: []。本机 Desktop 为 26.1013.31256(build 20586)。未在 Windows/Linux 或所有 Harness 上执行完整端到端验证。