awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
patriksimek avatar

patriksimek/vm2

0
View on GitHub↗

Vm2

vm2 is a Node.js JavaScript sandbox and runtime virtualizer designed to execute untrusted code. It functions as a secure code evaluator and module isolator that protects the host process by creating an isolated execution environment with restricted access to the Node.js runtime.

The system distinguishes itself through a security framework that utilizes object proxying and deep freezing to prevent sandboxed scripts from modifying the host global context or shared objects. It implements strict module access control using allow-lists and path restrictions to govern which built-in or external dependencies can be loaded.

The project covers broad capability areas including resource management, where it caps memory allocation for buffers and enforces execution timeouts to prevent denial-of-service attacks. It also provides filesystem access restrictions and tools for cross-sandbox interoperability and console output redirection.

A command-line interface is available for executing JavaScript files directly within the isolated sandbox environment.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Features

  • Isolated Code Execution - Provides a secure environment for executing untrusted third-party JavaScript code while protecting the host Node.js process.
  • Node.js Sandboxing - Protects the host Node.js process from malicious scripts by limiting memory, execution time, and global object access.
  • Runtime Virtualizers - Acts as a runtime virtualizer that protects the host global context through object proxying and property freezing.
  • Script Execution Timeouts - Implements watchdog mechanisms to terminate embedded scripts that exceed a specified execution time limit.
  • Buffer Memory Caps - Caps the size of memory allocation requests for buffers to prevent malicious scripts from causing memory exhaustion.
  • Sandbox Module Loader Emulators - Mimics a standard module loader to provide configurable control over which external dependencies are accessible to sandboxed code.
  • Dynamic Script Execution - Evaluates and runs JavaScript source code or precompiled scripts within a controlled context at runtime.
  • Module Access Control - Filters requested Node.js modules through a predefined allow-list of names and paths before loading.
  • Object Protections - Restricts the ability of sandboxed scripts to attach new functions to objects, preventing prototype pollution and unauthorized modifications.
  • Proxy Objects - Wraps host objects in proxies to intercept property access and prevent unauthorized mutations or leaks.
  • Sandboxed JavaScript Execution - Provides an isolated execution environment for running untrusted JavaScript code with restricted Node.js runtime access.
  • Module Access Restrictions - Prevents untrusted scripts from importing unauthorized or protected Node.js modules via access restrictions.
  • Filesystem Access Restrictions - Provides mechanisms to restrict sandboxed code to specific directories or file paths to prevent unauthorized disk access.
  • Buffer Allocation Limits - Provides mechanisms to cap the size of individual memory allocation requests for buffers to prevent resource exhaustion.
  • Object Freezing - Recursively freezes shared objects to ensure they are read-only and prevent sandboxed scripts from modifying host state.
  • Object Sealing and Freezing - Implements object sealing and freezing to make proxied objects read-only, preventing property modification or deletion.
  • Module Loading Filters - Restricts which built-in and external Node.js modules can be imported using strict allow-lists.
  • Sandbox Resource Caps - Enforces execution timeouts and memory ceilings to protect the host system from denial-of-service attacks by untrusted scripts.
  • Execution Resource Limiters - Sets memory limits and execution timeouts to protect the host process from resource exhaustion and DoS attacks.
  • Runtime Context Isolation - Creates isolated execution environments by managing distinct global objects and heaps for each script run.
  • Compiled Script Caches - Caches pre-compiled script representations to accelerate repeated execution and reduce redundant processing.
  • Canonical Path Resolution - Implements canonical path resolution to ensure file paths are absolute and unique, preventing directory traversal attacks.
  • Ahead-Of-Time Compilation - Implements ahead-of-time compilation of source code into a cached binary format to reduce repeated execution overhead.
  • Context-Isolated Invocations - Provides a secure way to call functions inside the sandbox by cloning arguments to protect the host global context.
  • Inter-Sandbox Communication - Allows secure data exchange and callback invocation between multiple isolated sandbox environments.
  • Secure Code Evaluators - Executes scripts with strict memory and execution time limits to prevent denial-of-service attacks on the host.
  • Sandboxing - Advanced virtual machine/sandbox for Node.js.
4,083 stars·326 forks·JavaScript·MIT·30 views

Star history

Star history chart for patriksimek/vm2Star history chart for patriksimek/vm2

How this analysis was created: This summary and feature list are AI-generated from collected project material and can contain mistakes. Stars, license and language are imported from GitHub. Inclusion does not mean that we have tested or audited this project. Check the source documentation for any feature you depend on. Learn more on our About page.

Projects sharing features with Vm2

These projects share indexed features with Vm2. Shared tags can include platform or build tooling; verify the primary use case before treating a result as a replacement.
  • rhaiscript/rhairhaiscript avatar

    rhaiscript/rhai

    5,453View on GitHub↗

    Rhai is an embedded scripting engine and dynamically typed language designed for integration into Rust applications. It functions as an abstract syntax tree compiler and native interop layer, allowing developers to map Rust types and functions into a scripting environment for bidirectional communication. The project serves as a framework for creating customizable domain-specific languages. It allows for the definition of custom operators, syntax, and restricted execution environments, enabling the creation of specialized languages with tailored functional sets. The engine covers a broad rang

    Rustembeddedembedded-scripting-languageno-std
    View on GitHub↗5,453
  • hyperlight-dev/hyperlighthyperlight-dev avatar

    hyperlight-dev/hyperlight

    4,462View on GitHub↗

    Hyperlight is an embedded virtual machine manager designed to execute guest binaries within hardware-isolated code sandboxes. It utilizes a KVM micro-VM manager to run untrusted third-party code, enforcing strict memory boundaries to prevent unauthorized host access. The project features a guest-host function bridge that facilitates bidirectional communication and a state snapshot tool for saving and restoring the memory state of a sandbox to reduce startup latency. The system includes a toolchain for guest binary cross-compilation and mechanisms for managing resource constraints, such as fi

    Rusthyper-vhypervisorkvm
    View on GitHub↗4,462
  • atmosphere/atmosphereAtmosphere avatar

    Atmosphere/atmosphere

    3,780View on GitHub↗

    Atmosphere is a Java-based framework for building and coordinating AI agents. It provides a real-time transport layer for streaming data via WebSockets, SSE, gRPC, and WebTransport, alongside a multi-agent orchestration framework for managing agent fleets through sequential, parallel, and graph-based execution workflows. The project features a durable workflow engine that persists agent state as snapshots, allowing long-running tasks to survive system restarts and incorporate human-in-the-loop approvals. It also implements Model Context Protocol servers to expose tools, resources, and prompt

    Javaacpagentic-aiembabel
    View on GitHub↗3,780
  • vndee/llm-sandboxvndee avatar

    vndee/llm-sandbox

    1,082View on GitHub↗

    This project provides a secure, containerized execution engine designed to run untrusted code within isolated environments. It functions as a library for integrating code interpretation into autonomous agents and intelligent assistant workflows, ensuring that host systems remain protected while enabling dynamic data processing and file manipulation. The platform distinguishes itself through a multi-backend architecture that abstracts diverse container runtimes, allowing for flexible deployment and automated backend failover. It supports interactive, multi-turn workflows by maintaining persist

    Pythoncode-generationcode-interpreterlarge-language-models
    View on GitHub↗1,082
Compare all 30 related projects→

Frequently asked questions

What does patriksimek/vm2 do?

vm2 is a Node.js JavaScript sandbox and runtime virtualizer designed to execute untrusted code. It functions as a secure code evaluator and module isolator that protects the host process by creating an isolated execution environment with restricted access to the Node.js runtime.

What are the main features of patriksimek/vm2?

The main features of patriksimek/vm2 are: Isolated Code Execution, Node.js Sandboxing, Runtime Virtualizers, Script Execution Timeouts, Buffer Memory Caps, Sandbox Module Loader Emulators, Dynamic Script Execution, Module Access Control.

Which projects share features with patriksimek/vm2?

Projects with overlapping indexed features include: rhaiscript/rhai — Rhai is an embedded scripting engine and dynamically typed language designed for integration into Rust applications.… hyperlight-dev/hyperlight — Hyperlight is an embedded virtual machine manager designed to execute guest binaries within hardware-isolated code… vndee/llm-sandbox — This project provides a secure, containerized execution engine designed to run untrusted code within isolated… atmosphere/atmosphere — Atmosphere is a Java-based framework for building and coordinating AI agents. It provides a real-time transport layer… alibaba/qlexpress — QLExpress is a dynamic scripting engine and expression language for the Java platform. It functions as a runtime… doodlewind/jshistory-cn — This project is a translated historical chronicle and programming language reference documenting the technical…