
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@entropy0/express
Advanced tools
Entropy0 Trust Control Plane middleware for Express.js — gate requests through trust evaluation before your server processes them.
Entropy0 Trust Control Plane middleware for Express.js.
Evaluates an incoming request's target domain through the Entropy0 /v1/decide endpoint and routes it to the appropriate handler based on the recommended action — before your application logic runs.
Try it live → — scan any domain instantly, no sign-up required. Get a free API key at entropy0.ai/signup — no credit card required.
npm install @entropy0/express
import express from "express";
import { entropy0Guard } from "@entropy0/express";
const app = express();
app.use(
entropy0Guard({
apiKey: process.env.ENTROPY0_API_KEY!,
policy: "balanced",
})
);
app.get("/proxy", (req, res) => {
// Only reached if action is "proceed" or "proceed_with_caution"
// req.entropy0 contains the full decision if caution was flagged
res.json({ ok: true });
});
app.use(
"/outbound",
entropy0Guard({
apiKey: process.env.ENTROPY0_API_KEY!,
policy: "strict",
// Extract target from a query param instead of req.hostname
getTarget: (req) => {
const url = req.query.url as string;
return url ? { type: "url", value: url } : null;
},
// Describe the interaction context
getInteraction: (req) => ({
kind: "fetch",
mode: "read_only",
sensitivity: req.user?.role === "admin" ? "high" : "medium",
}),
onProceed: (_req, _res, next, _result) => next(),
onCaution: (req, res, next, result) => { req.entropy0 = result; next(); },
onSandbox: (_req, res) => res.status(403).json({ blocked: true, reason: "sandbox" }),
onEscalate: (_req, res) => res.status(403).json({ blocked: true, reason: "review_required" }),
onDeny: (_req, res) => res.status(403).json({ blocked: true, reason: "deny" }),
// Fail open on API errors (default) — swap for fail closed if needed
onError: (_req, _res, next, err) => {
console.error("Entropy0 check failed:", err);
next();
},
timeoutMs: 3000,
})
);
| Action | Default behavior | Meaning |
|---|---|---|
proceed | next() | Normal interaction is safe |
proceed_with_caution | next() + attaches req.entropy0 | Continue with reduced trust assumptions |
sandbox | 403 | Interact only in an isolated environment |
escalate_to_human | 403 | Pause automation and request human review |
deny | 403 | Do not proceed under this policy |
All handlers are overridable. Override onSandbox or onEscalate to queue for review instead of blocking.
Full type exports — DecisionResult, TargetDescriptor, InteractionDescriptor, Entropy0Options.
req.entropy0 is automatically typed via Express namespace augmentation.
FAQs
Entropy0 Trust Control Plane middleware for Express.js — gate requests through trust evaluation before your server processes them.
We found that @entropy0/express demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.