
Research
/Security News
Shai Hulud Strikes Again (v2)
Another wave of Shai-Hulud campaign has hit npm with more than 500 packages and 700+ versions affected.
@arcjet/inspect
Advanced tools
@arcjet/inspectArcjet utilities for inspecting decisions made by an SDK.
Arcjet attaches lots of metadata to every decision. This package exists to more easily interact with Arcjet decisions for common patterns.
You can access metadata on decisions directly but you can use this package for common patterns.
This package is ESM only. Install with npm in Node.js:
npm install @arcjet/inspect
import http from "node:http";
import arcjet, { detectBot } from "@arcjet/next";
import { isMissingUserAgent } from "@arcjet/inspect";
// Get your Arcjet key at <https://app.arcjet.com>.
// Set it as an environment variable instead of hard coding it.
const arcjetKey = process.env.ARCJET_KEY;
if (!arcjetKey) {
throw new Error("Cannot find `ARCJET_KEY` environment variable");
}
const aj = arcjet({
key: arcjetKey,
rules: [
// `detectBot` lets you manage automated clients and bots.
detectBot({ allow: [], mode: "LIVE" }),
],
});
const server = http.createServer(async function (
request: http.IncomingMessage,
response: http.ServerResponse,
) {
const decision = await aj.protect(request);
if (decision.isDenied()) {
response.writeHead(403, { "Content-Type": "application/json" });
response.end(JSON.stringify({ message: "Forbidden" }));
return;
}
if (decision.results.some(isMissingUserAgent)) {
response.writeHead(403, { "Content-Type": "application/json" });
response.end(JSON.stringify({ message: "You are a bot!" }));
return;
}
response.writeHead(200, { "Content-Type": "application/json" });
response.end(JSON.stringify({ message: "Hello world" }));
});
server.listen(8000);
FAQs
Arcjet utilities for inspecting decisions made an the SDK
We found that @arcjet/inspect demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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
Another wave of Shai-Hulud campaign has hit npm with more than 500 packages and 700+ versions affected.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.