Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@bastani/atomic-codemode

Latest version: v0.10.13-alpha.1

Overview

Last scanned
27 Nov 2026
Published
27 Nov 2026
npm package Publisher: bastani
883 Stars
120 Forks
38 Versions
13.2K Downloads
TypeScript Repo language

Scan summary

@bastani/atomic-codemode was last scanned on 27 Nov 2026 at version 0.10.13-alpha.1. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 38 versions; the latest 5 were published on 27 Nov 2026.
  • Findings: No rules fired in version 0.10.13-alpha.1.
  • Downloads: 13,151 downloads.

Versions

38 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.10.13-alpha.1 LATEST 27 Nov 2026 No rules fired
0.10.12 27 Nov 2026 No rules fired
0.10.12-alpha.1 27 Nov 2026 No rules fired
0.10.11 27 Nov 2026 Not shown
0.10.11-alpha.4 27 Nov 2026 Not shown

No rules fired in 0.10.13-alpha.1

Findings

Findings for v0.10.13-alpha.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.10.13-alpha.1; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.


@bastani/atomic-codemode runs model-written JavaScript inside a QuickJS WebAssembly sandbox. Scripts call only the tools you inject, so intermediate tool calls stay out of the model's context while the script's output and return value come back cleanly. Atomic uses it for its built-in codemode tool, and the package supports Node.js, Bun, and Cloudflare Workers.

Atomic runs on this package and publishes it with every release at the same version.

Install

npm install @bastani/atomic-codemode

Inside an Atomic extension, you can import it without installing it because the running Atomic process provides it. See Libraries.

Quick start

Sandboxed scripts have access to tools (your injected tool functions), text() and image() (for structured output), store() and load() (for passing values between steps), exit(), and ALL_TOOLS:

import { readFile } from "node:fs/promises";
import { CodemodeSandbox } from "@bastani/atomic-codemode";

const sandbox = new CodemodeSandbox({
    timeoutMs: 60_000,
    tools: [
        {
            name: "read",
            execute: async (args, { signal }) => {
                const { path } = args as { path: string };
                return await readFile(path, { encoding: "utf8", signal });
            },
        },
    ],
});

const result = await sandbox.execute(`
    const source = await tools.read({ path: "package.json" });
    text("bytes " + source.length);
    return JSON.parse(source).name;
`);

console.log(result.output); // [{ type: "text", text: "bytes 1234" }]
if (result.ok) console.log(result.value); // "@bastani/atomic-codemode"
else console.error(result.error.kind, result.error.message);

await sandbox.close();

Subpath exports

  • @bastani/atomic-codemode: CodemodeSandbox for Node.js and Bun (runs QuickJS in a worker thread).
  • @bastani/atomic-codemode/portable: RemoteCodemodeSandbox, InlineCodemodeSandbox, and runtime-neutral helpers without Node.js worker threads.
  • @bastani/atomic-codemode/cloudflare: Durable Object sandbox bindings for Cloudflare Workers.
  • @bastani/atomic-codemode/declarations: TypeScript declaration generation for injected tool catalogs.
  • @bastani/atomic-codemode/source: Source-analysis helpers for inspecting model-written scripts.
  • @bastani/atomic-codemode/node-options and @bastani/atomic-codemode/worker: Worker-thread launch options and worker entrypoint.

Documentation

The full guide and API reference are in Atomic's docs: @bastani/atomic-codemode.

License

MIT. See LICENSE.

Derived from pi by Mario Zechner and Earendil Works; see NOTICE.md.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @bastani/atomic-codemode

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

Frame 2085668439 (1)
Group 1261154229