
Research
/Security News
Mini Shai-Hulud Campaign Hits Red Hat Cloud Services npm Packages
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.
@freestyle-sh/with-nodejs
Advanced tools
Node.js runtime via [NVM](https://github.com/nvm-sh/nvm) for [Freestyle](https://freestyle.sh) VMs.
Node.js runtime via NVM for Freestyle VMs.
npm install @freestyle-sh/with-nodejs freestyle-sandboxes
import { freestyle } from "freestyle-sandboxes";
import { VmNodeJs } from "@freestyle-sh/with-nodejs";
const { vm } = await freestyle.vms.create({
with: {
node: new VmNodeJs(),
},
});
const res = await vm.node.runCode({
code: "console.log(JSON.stringify({ hello: 'world' }));"
});
console.log(res);
// { result: { hello: 'world' }, stdout: '{"hello":"world"}\n', statusCode: 0 }
new VmNodeJs({
version: "22", // Optional: Node.js version (default: "24")
})
| Option | Type | Default | Description |
|---|---|---|---|
version | string | "24" | Node.js version to install via NVM. |
vm.node.runCode({ code: string })Executes JavaScript code in the Node.js runtime.
Returns: Promise<RunCodeResponse>
type RunCodeResponse<Result> = {
result: Result; // Parsed JSON from stdout (if valid JSON)
stdout?: string; // Raw stdout output
stderr?: string; // Raw stderr output
statusCode?: number; // Exit code
};
vm.node.install(options?)Installs npm packages.
// Install from package.json in current directory
await vm.node.install();
// Install from package.json in specific directory
await vm.node.install({ directory: "/app" });
// Install specific packages
await vm.node.install({ deps: ["lodash", "express"] });
// Install with specific versions
await vm.node.install({ deps: { "lodash": "^4.0.0", "express": "~5.0.0" } });
// Install as dev dependencies
await vm.node.install({ deps: ["typescript"], dev: true });
// Install globally
await vm.node.install({ global: true, deps: ["typescript"] });
Returns: Promise<InstallResult>
type InstallResult = {
success: boolean;
stdout?: string;
stderr?: string;
};
FAQs
Node.js runtime via [NVM](https://github.com/nvm-sh/nvm) for [Freestyle](https://freestyle.sh) VMs.
The npm package @freestyle-sh/with-nodejs receives a total of 366 weekly downloads. As such, @freestyle-sh/with-nodejs popularity was classified as not popular.
We found that @freestyle-sh/with-nodejs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.

Research
/Security News
The North Korean malware loader hides in a Packagist-listed package and its GitHub branch to fetch and execute remote code in a likely Contagious Interview-style lure.

Security News
The Rust project is moving toward formal rules on LLM use in contributions after months of internal debate over maintainer burden, code quality, and contributor experience.