Skip to content

remove shell usage during builds - #45

Merged
godronus merged 1 commit into
mainfrom
fix/ICM-50655
Aug 28, 2026
Merged

remove shell usage during builds#45
godronus merged 1 commit into
mainfrom
fix/ICM-50655

Conversation

@godronus

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI lite review requested due to automatic review settings August 28, 2026 08:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes shell execution from local workspace compiler build steps to reduce command-injection risk, and adds regression coverage to ensure untrusted build configuration values can’t be executed via shell interpolation.

Changes:

  • Removed explicit shell usage when spawning cargo in the Rust workspace compiler (avoids shell-based command injection via .cargo/config.toml).
  • Added child_process "error" handlers for Rust/JS/AssemblyScript build spawns so missing toolchain binaries reject cleanly instead of crashing the server.
  • Added a regression test validating that an injected payload in .cargo/config.toml does not execute, and wired it into the default npm test script.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/tools/local/workspace/compiler/rustBuild.ts Stops spawning cargo through a shell and adds spawn error handling.
src/tools/local/workspace/compiler/jsBuild.ts Adds spawn error handling for npx-based JS builds.
src/tools/local/workspace/compiler/asBuild.ts Adds spawn error handling for npx-based AssemblyScript builds.
scripts/tests/test-compiler-injection.ts New regression test ensuring .cargo/config.toml target injection can’t execute shell payloads.
package.json Adds test:compiler-injection and includes it in the default test script.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@godronus
godronus requested a review from qrdl August 28, 2026 08:27
@godronus
godronus merged commit 730f0d1 into main Aug 28, 2026
4 checks passed
@godronus
godronus deleted the fix/ICM-50655 branch August 28, 2026 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants