OS cmd injection fixed - #43
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR hardens local workspace build and scaffolding tooling against OS command injection by avoiding shell-backed process execution in the Linux/Docker (production) path, and documents the incident and remediation in the project changelog.
Changes:
- Switched
npxinvocations in JS/TS and AssemblyScript build flows from unconditionalshell: truetoshell: process.platform === "win32". - Updated scaffolding to call
npxviaexecFilewith an args array (instead ofexecwith a concatenated command string), withshellonly on Windows. - Bumped
@gcoredev/fastedge-sdk-jsand@modelcontextprotocol/sdkdependency versions and added a detailed security entry incontext/CHANGELOG.md.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/tools/local/workspace/compiler/jsBuild.ts | Removes Linux/Docker shell execution from the JS/TS build npx spawn path. |
| src/tools/local/workspace/compiler/asBuild.ts | Applies the same shell-avoidance pattern to AssemblyScript builds. |
| src/tools/local/scaffolding/scaffolds.ts | Uses execFile("npx", args) to avoid interpolating user-controlled output paths into shell command strings. |
| package.json | Updates key dependencies alongside the security fix. |
| context/CHANGELOG.md | Documents root cause, fix strategy, and residual considerations. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 6 changed files in this pull request and generated no new comments.
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
package.json:24
- Dependency versions were updated in package.json, but pnpm-lock.yaml is present in the repo and isn’t updated in this PR. This can lead to non-reproducible installs (and CI failures if installs are lockfile-frozen). Please regenerate and commit the updated lockfile for these version bumps.
"dependencies": {
"@gcoredev/fastedge-sdk-js": "^2.5.1",
"@modelcontextprotocol/sdk": "^1.30.0",
qrdl
approved these changes
Aug 26, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.