npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@arnilo/prism-coding-security

v0.3.0

Published

Optional execution approval, path containment, and disposable Docker/OCI sandbox adapters for Prism coding tools.

Downloads

5,193

Readme

@arnilo/prism-coding-security

Optional execution approval, path containment, and sandbox adapters for @arnilo/prism-coding-agent, including one disposable Docker/OCI sandbox reference.

Usage

import {
  createCodingApprovalPolicy,
  createDockerSandbox,
  createSandboxCodingComposition,
} from "@arnilo/prism-coding-security";
import { createGitTools } from "@arnilo/prism-coding-agent";

const policy = createCodingApprovalPolicy({
  roots: [workspaceRoot],
  approve: async ({ action }) => hostUi.confirm(action),
});

const sandbox = await createDockerSandbox({
  docker: "/usr/bin/docker",
  image: "registry.example/prism-code@sha256:<host-pinned-digest>",
  sourceRoot: workspaceRoot,
  user: "10001:10001",
  network: { mode: "none" },
});

// Allow-list egress (deny-all; inert until start):
import { createEgressPolicy, createAllowListEgressProxy, composeEgressSandboxNetwork } from "@arnilo/prism-coding-security";
const egressPolicy = createEgressPolicy({ presets: ["npm-registry"], allow: [{ host: "api.github.com", port: 443, protocol: "https" }] });
const proxy = createAllowListEgressProxy({ policy: egressPolicy, audit: (record) => host.recordEgress(record) });
await proxy.start();
const network = composeEgressSandboxNetwork(proxy.attestation(), "egress-net");
// Host must restrict the network so the proxy is the only reachable path.

// Required workspaceMode. Sandbox: shell + FS share one disposable tree.
const { tools, composition } = createSandboxCodingComposition(workspaceRoot, {
  workspaceMode: "sandbox",
  sandbox,
  executionPolicy: policy,
  repository: { exclude: [".git", "node_modules", "dist"] },
});

// Same-tree Git (opt-in):
createGitTools(composition.workspaceRoot, {
  execFile: sandbox.execFile.bind(sandbox),
  commitIdentity: { name: "bot", email: "[email protected]" },
});

// Host mode never claims containment:
createSandboxCodingComposition(hostCwd, { workspaceMode: "host", executionPolicy: policy });

workspaceMode is required ("host" | "sandbox"). Mixed sandbox-shell + host-FS wiring throws unless allowMixedWorkspaceWiring: true (warnings; all capabilities false). Every composition carries a frozen SandboxCapabilities object (workspaceCoherent, filesystemIsolated, networkIsolated, processIsolated, privilegeIsolated, egressRestricted): workspace coherence derives from wiring, isolation derives only from validated adapter capability metadata, omission/malformed metadata resolves false, and the deprecated containmentClaim is a conservative projection — authorize from the individual capabilities, never the boolean alone. Built-ins report truthfully: Docker claims filesystem/process isolation and network isolation only for mode none; native reports filesystemIsolated/processIsolated/privilegeIsolated false and is never a security boundary for untrusted code. Prefer createSandboxCodingComposition() for metadata; createSandboxCodingTools() returns tools only. Approval caching defaults to none. Docker reference requires a host-pinned image digest, absolute Docker executable, and never pulls images or inherits host environment.

Protected real-Docker checks: PRISM_TEST_DOCKER_SANDBOX=1 PRISM_TEST_DOCKER_BIN=/usr/bin/docker PRISM_TEST_DOCKER_IMAGE='name@sha256:...' npm test -w @arnilo/prism-coding-security.

See Coding execution approval and sandboxing, Coding agent tools, and Host security.